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