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