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 MaybeDef,
62 MsrvStack,
63 Octal,
64 OpenOptions,
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_raw_parts,
171 from_str_radix,
172 fs,
173 fuse,
174 futures_util,
175 get,
176 get_mut,
177 get_or_insert,
178 get_or_insert_with,
179 get_unchecked,
180 get_unchecked_mut,
181 has_significant_drop,
182 hidden_glob_reexports,
183 hygiene,
184 ilog,
185 insert,
186 insert_str,
187 inspect,
188 int_roundings,
189 into,
190 into_bytes,
191 into_ok,
192 into_owned,
193 io,
194 is_ascii,
195 is_char_boundary,
196 is_diag_item,
197 is_diagnostic_item,
198 is_digit,
199 is_empty,
200 is_err,
201 is_file,
202 is_none,
203 is_none_or,
204 is_ok,
205 is_partitioned,
206 is_some,
207 is_some_and,
208 is_sorted_by_key,
209 isqrt,
210 itertools,
211 join,
212 kw,
213 lazy_static,
214 leading_zeros,
215 lint_vec,
216 ln,
217 lock,
218 lock_api,
219 log,
220 log10,
221 log2,
222 macro_use_imports,
223 map_break,
224 map_continue,
225 map_or,
226 map_or_else,
227 map_while,
228 match_indices,
229 matches,
230 max,
231 max_by,
232 max_by_key,
233 max_value,
234 maximum,
235 min,
236 min_by,
237 min_by_key,
238 min_value,
239 minimum,
240 mode,
241 module_name_repetitions,
242 msrv,
243 msrvs,
244 mut_ptr,
245 mutex,
246 needless_return,
247 next_back,
248 next_if,
249 next_if_eq,
250 next_multiple_of,
251 next_tuple,
252 nth,
253 ok,
254 ok_or,
255 once_cell,
256 open,
257 or_default,
258 or_else,
259 or_insert,
260 or_insert_with,
261 outer_expn,
262 panic_str,
263 parse,
264 partition,
265 paths,
266 peek,
267 peek_mut,
268 peekable,
269 pow,
270 powf,
271 powi,
272 product,
273 push,
274 push_str,
275 read,
276 read_exact,
277 read_line,
278 read_to_end,
279 read_to_string,
280 read_unaligned,
281 read_volatile,
282 reduce,
283 redundant_imports,
284 redundant_pub_crate,
285 regex,
286 rem_euclid,
287 repeat,
288 replace,
289 replacen,
290 res,
291 reserve,
292 resize,
293 restriction,
294 rev,
295 rfind,
296 rmatch_indices,
297 rmatches,
298 round,
299 rposition,
300 rsplit,
301 rsplit_once,
302 rsplit_terminator,
303 rsplitn,
304 rsplitn_mut,
305 rustc_errors,
306 rustc_lint,
307 rustc_lint_defs,
308 rustc_middle,
309 rustc_span,
310 rustfmt_skip,
311 rwlock,
312 saturating_abs,
313 saturating_pow,
314 scan,
315 seek,
316 serde,
317 set_len,
318 set_mode,
319 set_readonly,
320 signum,
321 single_component_path_imports,
322 skip_while,
323 slice_mut_unchecked,
324 slice_unchecked,
325 sort,
326 sort_by,
327 sort_unstable_by,
328 span_lint_and_then,
329 split,
330 split_at,
331 split_at_checked,
332 split_at_mut,
333 split_at_mut_checked,
334 split_inclusive,
335 split_once,
336 split_terminator,
337 split_whitespace,
338 splitn,
339 splitn_mut,
340 sqrt,
341 starts_with,
342 std_detect,
343 step_by,
344 strlen,
345 style,
346 subsec_micros,
347 subsec_nanos,
348 sum,
349 symbol,
350 take,
351 take_while,
352 tcx,
353 then,
354 then_some,
355 to_ascii_lowercase,
356 to_ascii_uppercase,
357 to_be_bytes,
358 to_digit,
359 to_le_bytes,
360 to_lowercase,
361 to_ne_bytes,
362 to_os_string,
363 to_owned,
364 to_path_buf,
365 to_uppercase,
366 tokio,
367 trim,
368 trim_end,
369 trim_end_matches,
370 trim_start,
371 trim_start_matches,
372 truncate,
373 try_fold,
374 try_for_each,
375 unreachable_pub,
376 unsafe_removed_from_name,
377 unused,
378 unused_braces,
379 unused_extern_crates,
380 unused_import_braces,
381 unused_trait_names,
382 unwrap_err,
383 unwrap_err_unchecked,
384 unwrap_or_default,
385 unwrap_or_else,
386 unwrap_unchecked,
387 unzip,
388 utils,
389 visit_str,
390 visit_string,
391 wake,
392 warnings,
393 wildcard_imports,
394 with_capacity,
395 wrapping_offset,
396 write,
397 write_unaligned,
398 write_volatile,
399 writeln,
400 zip,
401}