1#![allow(non_upper_case_globals)]
2
3use rustc_span::symbol::PREDEFINED_SYMBOLS_COUNT;
4
5#[doc(no_inline)]
6pub use rustc_span::sym::*;
7
8macro_rules! val {
9 ($name:ident) => {
10 stringify!($name)
11 };
12 ($name:ident $value:literal) => {
13 $value
14 };
15}
16
17macro_rules! generate {
18 ($($name:ident $(: $value:literal)? ,)*) => {
19 pub const EXTRA_SYMBOLS: &[&str] = &[
21 $(
22 val!($name $($value)?),
23 )*
24 ];
25
26 $(
27 pub const $name: rustc_span::Symbol = rustc_span::Symbol::new(PREDEFINED_SYMBOLS_COUNT + ${index()});
28 )*
29 };
30}
31
32generate! {
37 Applicability,
38 AsyncReadExt,
39 AsyncWriteExt,
40 BACKSLASH_SINGLE_QUOTE: r"\'",
41 Binary,
42 CLIPPY_ARGS,
43 CLIPPY_CONF_DIR,
44 CRLF: "\r\n",
45 Cargo_toml: "Cargo.toml",
46 Current,
47 DOUBLE_QUOTE: "\"",
48 Deserialize,
49 EarlyContext,
50 EarlyLintPass,
51 IntoIter,
52 Itertools,
53 LF: "\n",
54 LateContext,
55 Lazy,
56 Lint,
57 LowerExp,
58 LowerHex,
59 MAX,
60 MIN,
61 MsrvStack,
62 Octal,
63 OpenOptions,
64 Other,
65 PathLookup,
66 Regex,
67 RegexBuilder,
68 RegexSet,
69 Start,
70 Symbol,
71 SyntaxContext,
72 TBD,
73 UpperExp,
74 UpperHex,
75 V4,
76 V6,
77 Visitor,
78 Weak,
79 abs,
80 ambiguous_glob_reexports,
81 app,
82 append,
83 applicability,
84 arg,
85 as_bytes,
86 as_deref,
87 as_deref_mut,
88 as_mut,
89 as_path,
90 assert_failed,
91 author,
92 borrow,
93 borrow_mut,
94 build_hasher,
95 by_ref,
96 bytes,
97 capacity,
98 cargo_clippy: "cargo-clippy",
99 cast,
100 cast_const,
101 cast_mut,
102 ceil,
103 ceil_char_boundary,
104 chain,
105 chars,
106 check_attributes,
107 checked_abs,
108 checked_add,
109 checked_isqrt,
110 checked_mul,
111 checked_pow,
112 checked_rem_euclid,
113 checked_sub,
114 clamp,
115 clippy_utils,
116 clone_into,
117 cloned,
118 cognitive_complexity,
119 collapsible_else_if,
120 collapsible_if,
121 collect,
122 const_ptr,
123 contains,
124 copied,
125 copy_from,
126 copy_from_nonoverlapping,
127 copy_to,
128 copy_to_nonoverlapping,
129 core_arch,
130 count_ones,
131 create,
132 create_new,
133 cx,
134 cycle,
135 cyclomatic_complexity,
136 de,
137 deprecated_in_future,
138 diagnostics,
139 disallowed_types,
140 drain,
141 dump,
142 ends_with,
143 enum_glob_use,
144 enumerate,
145 err,
146 exp,
147 expect_err,
148 expn_data,
149 extend,
150 filter,
151 filter_map,
152 find,
153 find_map,
154 finish,
155 finish_non_exhaustive,
156 first,
157 flat_map,
158 flatten,
159 floor,
160 floor_char_boundary,
161 fold,
162 for_each,
163 from_be_bytes,
164 from_bytes_with_nul,
165 from_bytes_with_nul_unchecked,
166 from_le_bytes,
167 from_ne_bytes,
168 from_ptr,
169 from_raw,
170 from_str_radix,
171 fs,
172 fuse,
173 futures_util,
174 get,
175 get_mut,
176 get_or_insert,
177 get_or_insert_with,
178 get_unchecked,
179 get_unchecked_mut,
180 has_significant_drop,
181 hidden_glob_reexports,
182 hygiene,
183 ilog,
184 insert,
185 insert_str,
186 inspect,
187 int_roundings,
188 into,
189 into_bytes,
190 into_ok,
191 into_owned,
192 io,
193 is_ascii,
194 is_char_boundary,
195 is_digit,
196 is_empty,
197 is_err,
198 is_file,
199 is_none,
200 is_none_or,
201 is_ok,
202 is_partitioned,
203 is_some,
204 is_some_and,
205 is_sorted_by_key,
206 isqrt,
207 itertools,
208 join,
209 kw,
210 lazy_static,
211 leading_zeros,
212 lint_vec,
213 ln,
214 lock,
215 lock_api,
216 log,
217 log10,
218 log2,
219 macro_use_imports,
220 map_break,
221 map_continue,
222 map_or,
223 map_or_else,
224 map_while,
225 match_indices,
226 matches,
227 max,
228 max_by,
229 max_by_key,
230 max_value,
231 maximum,
232 min,
233 min_by,
234 min_by_key,
235 min_value,
236 minimum,
237 mode,
238 module_name_repetitions,
239 msrv,
240 msrvs,
241 mut_ptr,
242 mutex,
243 needless_return,
244 next_back,
245 next_if,
246 next_if_eq,
247 next_tuple,
248 nth,
249 ok,
250 ok_or,
251 once_cell,
252 open,
253 or_default,
254 or_else,
255 or_insert,
256 or_insert_with,
257 outer_expn,
258 panic_str,
259 parse,
260 partition,
261 paths,
262 peek,
263 peek_mut,
264 peekable,
265 pow,
266 powf,
267 powi,
268 product,
269 push,
270 push_str,
271 read,
272 read_exact,
273 read_line,
274 read_to_end,
275 read_to_string,
276 read_unaligned,
277 read_volatile,
278 redundant_imports,
279 redundant_pub_crate,
280 regex,
281 rem_euclid,
282 repeat,
283 replace,
284 replacen,
285 reserve,
286 resize,
287 restriction,
288 rev,
289 rfind,
290 rmatch_indices,
291 rmatches,
292 round,
293 rposition,
294 rsplit,
295 rsplit_once,
296 rsplit_terminator,
297 rsplitn,
298 rsplitn_mut,
299 rustc_errors,
300 rustc_lint,
301 rustc_lint_defs,
302 rustc_middle,
303 rustc_span,
304 rustfmt_skip,
305 rwlock,
306 saturating_abs,
307 saturating_pow,
308 scan,
309 seek,
310 serde,
311 set_len,
312 set_mode,
313 set_readonly,
314 signum,
315 single_component_path_imports,
316 skip_while,
317 slice_mut_unchecked,
318 slice_unchecked,
319 sort,
320 sort_by,
321 sort_unstable_by,
322 span_lint_and_then,
323 split,
324 split_at,
325 split_at_checked,
326 split_at_mut,
327 split_at_mut_checked,
328 split_inclusive,
329 split_once,
330 split_terminator,
331 split_whitespace,
332 splitn,
333 splitn_mut,
334 sqrt,
335 starts_with,
336 std_detect,
337 step_by,
338 strlen,
339 style,
340 subsec_micros,
341 subsec_nanos,
342 sum,
343 symbol,
344 take,
345 take_while,
346 tcx,
347 then,
348 then_some,
349 to_ascii_lowercase,
350 to_ascii_uppercase,
351 to_be_bytes,
352 to_digit,
353 to_le_bytes,
354 to_lowercase,
355 to_ne_bytes,
356 to_os_string,
357 to_owned,
358 to_path_buf,
359 to_uppercase,
360 tokio,
361 trim,
362 trim_end,
363 trim_end_matches,
364 trim_start,
365 trim_start_matches,
366 truncate,
367 try_for_each,
368 unreachable_pub,
369 unsafe_removed_from_name,
370 unused,
371 unused_braces,
372 unused_extern_crates,
373 unused_import_braces,
374 unused_trait_names,
375 unwrap_err,
376 unwrap_err_unchecked,
377 unwrap_or_default,
378 unwrap_or_else,
379 unwrap_unchecked,
380 unzip,
381 utils,
382 visit_str,
383 visit_string,
384 wake,
385 warnings,
386 wildcard_imports,
387 with_capacity,
388 wrapping_offset,
389 write,
390 write_unaligned,
391 write_volatile,
392 writeln,
393 zip,
394}