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 Other,
66 PathLookup,
67 Regex,
68 RegexBuilder,
69 RegexSet,
70 Start,
71 Symbol,
72 SyntaxContext,
73 TBD,
74 UpperExp,
75 UpperHex,
76 V4,
77 V6,
78 Visitor,
79 Weak,
80 abs,
81 ambiguous_glob_reexports,
82 app,
83 append,
84 applicability,
85 arg,
86 as_bytes,
87 as_deref,
88 as_deref_mut,
89 as_mut,
90 as_path,
91 assert_failed,
92 author,
93 borrow,
94 borrow_mut,
95 build_hasher,
96 by_ref,
97 bytes,
98 capacity,
99 cargo_clippy: "cargo-clippy",
100 cast,
101 cast_const,
102 cast_mut,
103 ceil,
104 ceil_char_boundary,
105 chain,
106 chars,
107 check_attributes,
108 checked_abs,
109 checked_add,
110 checked_isqrt,
111 checked_mul,
112 checked_pow,
113 checked_rem_euclid,
114 checked_sub,
115 clamp,
116 clippy_utils,
117 clone_into,
118 cloned,
119 cognitive_complexity,
120 collapsible_else_if,
121 collapsible_if,
122 collect,
123 const_ptr,
124 contains,
125 copied,
126 copy_from,
127 copy_from_nonoverlapping,
128 copy_to,
129 copy_to_nonoverlapping,
130 core_arch,
131 count_ones,
132 create,
133 create_new,
134 cx,
135 cycle,
136 cyclomatic_complexity,
137 de,
138 deprecated_in_future,
139 diagnostics,
140 disallowed_types,
141 drain,
142 dump,
143 ends_with,
144 enum_glob_use,
145 enumerate,
146 err,
147 exp,
148 expect_err,
149 expn_data,
150 extend,
151 filter,
152 filter_map,
153 find,
154 find_map,
155 finish,
156 finish_non_exhaustive,
157 first,
158 flat_map,
159 flatten,
160 floor,
161 floor_char_boundary,
162 fold,
163 for_each,
164 from_be_bytes,
165 from_bytes_with_nul,
166 from_bytes_with_nul_unchecked,
167 from_le_bytes,
168 from_ne_bytes,
169 from_ptr,
170 from_raw,
171 from_raw_parts,
172 from_str_radix,
173 fs,
174 fuse,
175 futures_util,
176 get,
177 get_mut,
178 get_or_insert,
179 get_or_insert_with,
180 get_unchecked,
181 get_unchecked_mut,
182 has_significant_drop,
183 hidden_glob_reexports,
184 hygiene,
185 ilog,
186 insert,
187 insert_str,
188 inspect,
189 int_roundings,
190 into,
191 into_bytes,
192 into_ok,
193 into_owned,
194 io,
195 is_ascii,
196 is_char_boundary,
197 is_diag_item,
198 is_diagnostic_item,
199 is_digit,
200 is_empty,
201 is_err,
202 is_file,
203 is_none,
204 is_none_or,
205 is_ok,
206 is_partitioned,
207 is_some,
208 is_some_and,
209 is_sorted_by_key,
210 isqrt,
211 itertools,
212 join,
213 kw,
214 lazy_static,
215 leading_zeros,
216 lint_vec,
217 ln,
218 lock,
219 lock_api,
220 log,
221 log10,
222 log2,
223 macro_use_imports,
224 map_break,
225 map_continue,
226 map_or,
227 map_or_else,
228 map_while,
229 match_indices,
230 matches,
231 max,
232 max_by,
233 max_by_key,
234 max_value,
235 maximum,
236 min,
237 min_by,
238 min_by_key,
239 min_value,
240 minimum,
241 mode,
242 module_name_repetitions,
243 msrv,
244 msrvs,
245 mut_ptr,
246 mutex,
247 needless_return,
248 next_back,
249 next_if,
250 next_if_eq,
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}