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 count_ones,
130 create,
131 create_new,
132 cx,
133 cycle,
134 cyclomatic_complexity,
135 de,
136 deprecated_in_future,
137 diagnostics,
138 disallowed_types,
139 drain,
140 dump,
141 ends_with,
142 enum_glob_use,
143 enumerate,
144 err,
145 exp,
146 expect_err,
147 expn_data,
148 extend,
149 filter,
150 filter_map,
151 find,
152 find_map,
153 finish,
154 finish_non_exhaustive,
155 first,
156 flat_map,
157 flatten,
158 floor,
159 floor_char_boundary,
160 fold,
161 for_each,
162 from_be_bytes,
163 from_bytes_with_nul,
164 from_bytes_with_nul_unchecked,
165 from_le_bytes,
166 from_ne_bytes,
167 from_ptr,
168 from_raw,
169 from_str,
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 step_by,
335 strlen,
336 style,
337 subsec_micros,
338 subsec_nanos,
339 sum,
340 symbol,
341 take,
342 take_while,
343 tcx,
344 then,
345 then_some,
346 to_ascii_lowercase,
347 to_ascii_uppercase,
348 to_be_bytes,
349 to_digit,
350 to_le_bytes,
351 to_lowercase,
352 to_ne_bytes,
353 to_os_string,
354 to_owned,
355 to_path_buf,
356 to_uppercase,
357 tokio,
358 trim,
359 trim_end,
360 trim_end_matches,
361 trim_start,
362 trim_start_matches,
363 truncate,
364 try_for_each,
365 unreachable_pub,
366 unsafe_removed_from_name,
367 unused,
368 unused_braces,
369 unused_extern_crates,
370 unused_import_braces,
371 unused_trait_names,
372 unwrap_err,
373 unwrap_err_unchecked,
374 unwrap_or_default,
375 unwrap_or_else,
376 unwrap_unchecked,
377 unzip,
378 utils,
379 visit_str,
380 visit_string,
381 wake,
382 warnings,
383 wildcard_imports,
384 with_capacity,
385 wrapping_offset,
386 write,
387 write_unaligned,
388 write_volatile,
389 writeln,
390 zip,
391}