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