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 check_attributes,
102 checked_abs,
103 checked_add,
104 checked_isqrt,
105 checked_mul,
106 checked_pow,
107 checked_rem_euclid,
108 checked_sub,
109 clamp,
110 clippy_utils,
111 clone_into,
112 cloned,
113 cognitive_complexity,
114 collect,
115 const_ptr,
116 contains,
117 copied,
118 copy_from,
119 copy_from_nonoverlapping,
120 copy_to,
121 copy_to_nonoverlapping,
122 count_ones,
123 create,
124 create_new,
125 cycle,
126 cyclomatic_complexity,
127 de,
128 diagnostics,
129 disallowed_types,
130 drain,
131 dump,
132 ends_with,
133 enum_glob_use,
134 enumerate,
135 err,
136 exp,
137 expect_err,
138 expn_data,
139 extend,
140 filter,
141 filter_map,
142 find,
143 find_map,
144 finish,
145 finish_non_exhaustive,
146 first,
147 flat_map,
148 flatten,
149 floor,
150 floor_char_boundary,
151 fold,
152 for_each,
153 from_be_bytes,
154 from_bytes_with_nul,
155 from_bytes_with_nul_unchecked,
156 from_le_bytes,
157 from_ne_bytes,
158 from_ptr,
159 from_raw,
160 from_str,
161 from_str_radix,
162 fs,
163 fuse,
164 futures_util,
165 get,
166 get_mut,
167 get_or_insert,
168 get_or_insert_with,
169 get_unchecked,
170 get_unchecked_mut,
171 has_significant_drop,
172 hidden_glob_reexports,
173 hygiene,
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 lazy_static,
198 lint_vec,
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_str,
244 parse,
245 partition,
246 paths,
247 peek,
248 peek_mut,
249 peekable,
250 pow,
251 powf,
252 powi,
253 product,
254 push,
255 read,
256 read_exact,
257 read_line,
258 read_to_end,
259 read_to_string,
260 read_unaligned,
261 redundant_imports,
262 redundant_pub_crate,
263 regex,
264 rem_euclid,
265 repeat,
266 replace,
267 replacen,
268 reserve,
269 resize,
270 restriction,
271 rev,
272 rfind,
273 rmatch_indices,
274 rmatches,
275 round,
276 rposition,
277 rsplit,
278 rsplit_once,
279 rsplit_terminator,
280 rsplitn,
281 rsplitn_mut,
282 rustc_lint,
283 rustc_lint_defs,
284 rustc_span,
285 rustfmt_skip,
286 rwlock,
287 saturating_abs,
288 saturating_pow,
289 scan,
290 seek,
291 serde,
292 set_len,
293 set_mode,
294 set_readonly,
295 signum,
296 single_component_path_imports,
297 skip_while,
298 slice_mut_unchecked,
299 slice_unchecked,
300 sort,
301 sort_by,
302 sort_unstable_by,
303 span_lint_and_then,
304 split,
305 split_at,
306 split_at_checked,
307 split_at_mut,
308 split_at_mut_checked,
309 split_inclusive,
310 split_once,
311 split_terminator,
312 split_whitespace,
313 splitn,
314 splitn_mut,
315 sqrt,
316 starts_with,
317 step_by,
318 strlen,
319 style,
320 subsec_micros,
321 subsec_nanos,
322 sum,
323 symbol,
324 take,
325 take_while,
326 then,
327 then_some,
328 to_ascii_lowercase,
329 to_ascii_uppercase,
330 to_be_bytes,
331 to_digit,
332 to_le_bytes,
333 to_lowercase,
334 to_ne_bytes,
335 to_os_string,
336 to_owned,
337 to_path_buf,
338 to_uppercase,
339 tokio,
340 trim,
341 trim_end,
342 trim_end_matches,
343 trim_start,
344 trim_start_matches,
345 truncate,
346 unreachable_pub,
347 unsafe_removed_from_name,
348 unused,
349 unused_braces,
350 unused_extern_crates,
351 unused_import_braces,
352 unused_trait_names,
353 unwrap_err,
354 unwrap_err_unchecked,
355 unwrap_or_default,
356 unwrap_or_else,
357 unwrap_unchecked,
358 unzip,
359 utils,
360 visit_str,
361 visit_string,
362 wake,
363 warnings,
364 wildcard_imports,
365 with_capacity,
366 wrapping_offset,
367 write,
368 write_unaligned,
369 writeln,
370 zip,
371}