1use span::Edition;
4
5use crate::Severity;
6
7#[derive(Clone)]
8pub struct Lint {
9 pub label: &'static str,
10 pub description: &'static str,
11 pub default_severity: Severity,
12 pub warn_since: Option<Edition>,
13 pub deny_since: Option<Edition>,
14}
15
16pub struct LintGroup {
17 pub lint: Lint,
18 pub children: &'static [&'static str],
19}
20
21pub const DEFAULT_LINTS: &[Lint] = &[
22 Lint {
23 label: "aarch64_softfloat_neon",
24 description: r##"detects code that could be affected by ABI issues on aarch64 softfloat targets"##,
25 default_severity: Severity::Error,
26 warn_since: None,
27 deny_since: None,
28 },
29 Lint {
30 label: "absolute_paths_not_starting_with_crate",
31 description: r##"fully qualified paths that start with a module name instead of `crate`, `self`, or an extern crate name"##,
32 default_severity: Severity::Allow,
33 warn_since: None,
34 deny_since: None,
35 },
36 Lint {
37 label: "aligned_fields_in_packed",
38 description: r##"`repr(C, align)` types nested inside `repr(C, packed)` types do not always have a C-compatible layout"##,
39 default_severity: Severity::Error,
40 warn_since: None,
41 deny_since: None,
42 },
43 Lint {
44 label: "ambiguous_associated_items",
45 description: r##"ambiguous associated items"##,
46 default_severity: Severity::Error,
47 warn_since: None,
48 deny_since: None,
49 },
50 Lint {
51 label: "ambiguous_derive_helpers",
52 description: r##"detects derive helper attributes that are ambiguous with built-in attributes"##,
53 default_severity: Severity::Warning,
54 warn_since: None,
55 deny_since: None,
56 },
57 Lint {
58 label: "ambiguous_glob_imported_traits",
59 description: r##"detects uses of ambiguously glob imported traits"##,
60 default_severity: Severity::Warning,
61 warn_since: None,
62 deny_since: None,
63 },
64 Lint {
65 label: "ambiguous_glob_imports",
66 description: r##"detects certain glob imports that require reporting an ambiguity error"##,
67 default_severity: Severity::Error,
68 warn_since: None,
69 deny_since: None,
70 },
71 Lint {
72 label: "ambiguous_glob_reexports",
73 description: r##"ambiguous glob re-exports"##,
74 default_severity: Severity::Warning,
75 warn_since: None,
76 deny_since: None,
77 },
78 Lint {
79 label: "ambiguous_import_visibilities",
80 description: r##"detects certain glob imports that require reporting an ambiguity error"##,
81 default_severity: Severity::Warning,
82 warn_since: None,
83 deny_since: None,
84 },
85 Lint {
86 label: "ambiguous_negative_literals",
87 description: r##"ambiguous negative literals operations"##,
88 default_severity: Severity::Allow,
89 warn_since: None,
90 deny_since: None,
91 },
92 Lint {
93 label: "ambiguous_panic_imports",
94 description: r##"detects ambiguous core and std panic imports"##,
95 default_severity: Severity::Warning,
96 warn_since: None,
97 deny_since: None,
98 },
99 Lint {
100 label: "ambiguous_wide_pointer_comparisons",
101 description: r##"detects ambiguous wide pointer comparisons"##,
102 default_severity: Severity::Warning,
103 warn_since: None,
104 deny_since: None,
105 },
106 Lint {
107 label: "anonymous_parameters",
108 description: r##"detects anonymous parameters"##,
109 default_severity: Severity::Warning,
110 warn_since: None,
111 deny_since: None,
112 },
113 Lint {
114 label: "arithmetic_overflow",
115 description: r##"arithmetic operation overflows"##,
116 default_severity: Severity::Error,
117 warn_since: None,
118 deny_since: None,
119 },
120 Lint {
121 label: "array_into_iter",
122 description: r##"detects calling `into_iter` on arrays in Rust 2015 and 2018"##,
123 default_severity: Severity::Warning,
124 warn_since: None,
125 deny_since: None,
126 },
127 Lint {
128 label: "asm_sub_register",
129 description: r##"using only a subset of a register for inline asm inputs"##,
130 default_severity: Severity::Warning,
131 warn_since: None,
132 deny_since: None,
133 },
134 Lint {
135 label: "async_fn_in_trait",
136 description: r##"use of `async fn` in definition of a publicly-reachable trait"##,
137 default_severity: Severity::Warning,
138 warn_since: None,
139 deny_since: None,
140 },
141 Lint {
142 label: "bad_asm_style",
143 description: r##"incorrect use of inline assembly"##,
144 default_severity: Severity::Warning,
145 warn_since: None,
146 deny_since: None,
147 },
148 Lint {
149 label: "bare_trait_objects",
150 description: r##"suggest using `dyn Trait` for trait objects"##,
151 default_severity: Severity::Warning,
152 warn_since: None,
153 deny_since: None,
154 },
155 Lint {
156 label: "binary_asm_labels",
157 description: r##"labels in inline assembly containing only 0 or 1 digits"##,
158 default_severity: Severity::Error,
159 warn_since: None,
160 deny_since: None,
161 },
162 Lint {
163 label: "bindings_with_variant_name",
164 description: r##"detects pattern bindings with the same name as one of the matched variants"##,
165 default_severity: Severity::Error,
166 warn_since: None,
167 deny_since: None,
168 },
169 Lint {
170 label: "boxed_slice_into_iter",
171 description: r##"detects calling `into_iter` on boxed slices in Rust 2015, 2018, and 2021"##,
172 default_severity: Severity::Warning,
173 warn_since: None,
174 deny_since: None,
175 },
176 Lint {
177 label: "break_with_label_and_loop",
178 description: r##"`break` expression with label and unlabeled loop as value expression"##,
179 default_severity: Severity::Warning,
180 warn_since: None,
181 deny_since: None,
182 },
183 Lint {
184 label: "c_void_returns",
185 description: r##"detects use of `c_void` as a return type"##,
186 default_severity: Severity::Warning,
187 warn_since: None,
188 deny_since: None,
189 },
190 Lint {
191 label: "clashing_extern_declarations",
192 description: r##"detects when an extern fn has been declared with the same name but different types"##,
193 default_severity: Severity::Warning,
194 warn_since: None,
195 deny_since: None,
196 },
197 Lint {
198 label: "closure_returning_async_block",
199 description: r##"closure that returns `async {}` could be rewritten as an async closure"##,
200 default_severity: Severity::Allow,
201 warn_since: None,
202 deny_since: None,
203 },
204 Lint {
205 label: "coherence_leak_check",
206 description: r##"distinct impls distinguished only by the leak-check code"##,
207 default_severity: Severity::Warning,
208 warn_since: None,
209 deny_since: None,
210 },
211 Lint {
212 label: "conflicting_repr_hints",
213 description: r##"conflicts between `#[repr(..)]` hints that were previously accepted and used in practice"##,
214 default_severity: Severity::Error,
215 warn_since: None,
216 deny_since: None,
217 },
218 Lint {
219 label: "confusable_idents",
220 description: r##"detects visually confusable pairs between identifiers"##,
221 default_severity: Severity::Warning,
222 warn_since: None,
223 deny_since: None,
224 },
225 Lint {
226 label: "const_evaluatable_unchecked",
227 description: r##"detects a generic constant is used in a type without a emitting a warning"##,
228 default_severity: Severity::Warning,
229 warn_since: None,
230 deny_since: None,
231 },
232 Lint {
233 label: "const_item_interior_mutations",
234 description: r##"checks for calls which mutates a interior mutable const-item"##,
235 default_severity: Severity::Warning,
236 warn_since: None,
237 deny_since: None,
238 },
239 Lint {
240 label: "const_item_mutation",
241 description: r##"detects attempts to mutate a `const` item"##,
242 default_severity: Severity::Warning,
243 warn_since: None,
244 deny_since: None,
245 },
246 Lint {
247 label: "dangerous_implicit_autorefs",
248 description: r##"implicit reference to a dereference of a raw pointer"##,
249 default_severity: Severity::Error,
250 warn_since: None,
251 deny_since: None,
252 },
253 Lint {
254 label: "dangling_pointers_from_locals",
255 description: r##"detects returning a pointer from a local variable"##,
256 default_severity: Severity::Warning,
257 warn_since: None,
258 deny_since: None,
259 },
260 Lint {
261 label: "dangling_pointers_from_temporaries",
262 description: r##"detects getting a pointer from a temporary"##,
263 default_severity: Severity::Warning,
264 warn_since: None,
265 deny_since: None,
266 },
267 Lint {
268 label: "dead_code",
269 description: r##"detect unused, unexported items"##,
270 default_severity: Severity::Warning,
271 warn_since: None,
272 deny_since: None,
273 },
274 Lint {
275 label: "dead_code_pub_in_binary",
276 description: r##"detect public items in executable crates that are never used"##,
277 default_severity: Severity::Allow,
278 warn_since: None,
279 deny_since: None,
280 },
281 Lint {
282 label: "default_overrides_default_fields",
283 description: r##"detect `Default` impl that should use the type's default field values"##,
284 default_severity: Severity::Error,
285 warn_since: None,
286 deny_since: None,
287 },
288 Lint {
289 label: "deprecated",
290 description: r##"detects use of deprecated items"##,
291 default_severity: Severity::Warning,
292 warn_since: None,
293 deny_since: None,
294 },
295 Lint {
296 label: "deprecated_in_future",
297 description: r##"detects use of items that will be deprecated in a future version"##,
298 default_severity: Severity::Allow,
299 warn_since: None,
300 deny_since: None,
301 },
302 Lint {
303 label: "deprecated_llvm_intrinsic",
304 description: r##"detects uses of deprecated LLVM intrinsics"##,
305 default_severity: Severity::Allow,
306 warn_since: None,
307 deny_since: None,
308 },
309 Lint {
310 label: "deprecated_safe_2024",
311 description: r##"detects unsafe functions being used as safe functions"##,
312 default_severity: Severity::Allow,
313 warn_since: None,
314 deny_since: None,
315 },
316 Lint {
317 label: "deprecated_where_clause_location",
318 description: r##"deprecated where clause location"##,
319 default_severity: Severity::Warning,
320 warn_since: None,
321 deny_since: None,
322 },
323 Lint {
324 label: "deref_into_dyn_supertrait",
325 description: r##"`Deref` implementation with a supertrait trait object for output is shadowed by trait upcasting"##,
326 default_severity: Severity::Allow,
327 warn_since: None,
328 deny_since: None,
329 },
330 Lint {
331 label: "deref_nullptr",
332 description: r##"detects when an null pointer is dereferenced"##,
333 default_severity: Severity::Error,
334 warn_since: None,
335 deny_since: None,
336 },
337 Lint {
338 label: "double_negations",
339 description: r##"detects expressions of the form `--x`"##,
340 default_severity: Severity::Warning,
341 warn_since: None,
342 deny_since: None,
343 },
344 Lint {
345 label: "drop_bounds",
346 description: r##"bounds of the form `T: Drop` are most likely incorrect"##,
347 default_severity: Severity::Warning,
348 warn_since: None,
349 deny_since: None,
350 },
351 Lint {
352 label: "dropping_copy_types",
353 description: r##"calls to `drop` and `drop_in_place` where the dropped value implements Copy"##,
354 default_severity: Severity::Warning,
355 warn_since: None,
356 deny_since: None,
357 },
358 Lint {
359 label: "dropping_references",
360 description: r##"calls to `drop` and `drop_in_place` where the dropped type is a reference instead of an owned value"##,
361 default_severity: Severity::Warning,
362 warn_since: None,
363 deny_since: None,
364 },
365 Lint {
366 label: "duplicate_features",
367 description: r##"duplicate features found in crate-level `#[feature]` directives"##,
368 default_severity: Severity::Error,
369 warn_since: None,
370 deny_since: None,
371 },
372 Lint {
373 label: "duplicate_macro_attributes",
374 description: r##"duplicated attribute"##,
375 default_severity: Severity::Warning,
376 warn_since: None,
377 deny_since: None,
378 },
379 Lint {
380 label: "duplicate_tools",
381 description: r##"duplicate tools found in crate-level `#[register_tools]` directives"##,
382 default_severity: Severity::Error,
383 warn_since: None,
384 deny_since: None,
385 },
386 Lint {
387 label: "dyn_drop",
388 description: r##"trait objects of the form `dyn Drop` are useless"##,
389 default_severity: Severity::Warning,
390 warn_since: None,
391 deny_since: None,
392 },
393 Lint {
394 label: "edition_2024_expr_fragment_specifier",
395 description: r##"The `expr` fragment specifier will accept more expressions in the 2024 edition. To keep the existing behavior, use the `expr_2021` fragment specifier."##,
396 default_severity: Severity::Allow,
397 warn_since: None,
398 deny_since: None,
399 },
400 Lint {
401 label: "elided_lifetimes_in_paths",
402 description: r##"hidden lifetime parameters in types are deprecated"##,
403 default_severity: Severity::Allow,
404 warn_since: None,
405 deny_since: None,
406 },
407 Lint {
408 label: "ellipsis_inclusive_range_patterns",
409 description: r##"`...` range patterns are deprecated"##,
410 default_severity: Severity::Warning,
411 warn_since: None,
412 deny_since: None,
413 },
414 Lint {
415 label: "enum_intrinsics_non_enums",
416 description: r##"detects calls to `core::mem::discriminant` and `core::mem::variant_count` with non-enum types"##,
417 default_severity: Severity::Error,
418 warn_since: None,
419 deny_since: None,
420 },
421 Lint {
422 label: "explicit_builtin_cfgs_in_flags",
423 description: r##"detects builtin cfgs set via the `--cfg`"##,
424 default_severity: Severity::Error,
425 warn_since: None,
426 deny_since: None,
427 },
428 Lint {
429 label: "explicit_outlives_requirements",
430 description: r##"outlives requirements can be inferred"##,
431 default_severity: Severity::Allow,
432 warn_since: None,
433 deny_since: None,
434 },
435 Lint {
436 label: "exported_private_dependencies",
437 description: r##"public interface leaks type from a private dependency"##,
438 default_severity: Severity::Warning,
439 warn_since: None,
440 deny_since: None,
441 },
442 Lint {
443 label: "ffi_unwind_calls",
444 description: r##"call to foreign functions or function pointers with FFI-unwind ABI"##,
445 default_severity: Severity::Allow,
446 warn_since: None,
447 deny_since: None,
448 },
449 Lint {
450 label: "float_literal_f32_fallback",
451 description: r##"detects unsuffixed floating point literals whose type fallback to `f32`"##,
452 default_severity: Severity::Warning,
453 warn_since: None,
454 deny_since: None,
455 },
456 Lint {
457 label: "for_loops_over_fallibles",
458 description: r##"for-looping over an `Option` or a `Result`, which is more clearly expressed as an `if let`"##,
459 default_severity: Severity::Warning,
460 warn_since: None,
461 deny_since: None,
462 },
463 Lint {
464 label: "forbidden_lint_groups",
465 description: r##"applying forbid to lint-groups"##,
466 default_severity: Severity::Warning,
467 warn_since: None,
468 deny_since: None,
469 },
470 Lint {
471 label: "forgetting_copy_types",
472 description: r##"calls to `std::mem::forget` with a value that implements Copy"##,
473 default_severity: Severity::Warning,
474 warn_since: None,
475 deny_since: None,
476 },
477 Lint {
478 label: "forgetting_references",
479 description: r##"calls to `std::mem::forget` with a reference instead of an owned value"##,
480 default_severity: Severity::Warning,
481 warn_since: None,
482 deny_since: None,
483 },
484 Lint {
485 label: "function_casts_as_integer",
486 description: r##"casting a function into an integer"##,
487 default_severity: Severity::Warning,
488 warn_since: None,
489 deny_since: None,
490 },
491 Lint {
492 label: "function_item_references",
493 description: r##"suggest casting to a function pointer when attempting to take references to function items"##,
494 default_severity: Severity::Warning,
495 warn_since: None,
496 deny_since: None,
497 },
498 Lint {
499 label: "hidden_glob_reexports",
500 description: r##"name introduced by a private item shadows a name introduced by a public glob re-export"##,
501 default_severity: Severity::Warning,
502 warn_since: None,
503 deny_since: None,
504 },
505 Lint {
506 label: "if_let_rescope",
507 description: r##"`if let` assigns a shorter lifetime to temporary values being pattern-matched against in Edition 2024 and rewriting in `match` is an option to preserve the semantics up to Edition 2021"##,
508 default_severity: Severity::Allow,
509 warn_since: None,
510 deny_since: None,
511 },
512 Lint {
513 label: "ill_formed_attribute_input",
514 description: r##"ill-formed attribute inputs that were previously accepted and used in practice"##,
515 default_severity: Severity::Error,
516 warn_since: None,
517 deny_since: None,
518 },
519 Lint {
520 label: "impl_trait_overcaptures",
521 description: r##"`impl Trait` will capture more lifetimes than possibly intended in edition 2024"##,
522 default_severity: Severity::Allow,
523 warn_since: None,
524 deny_since: None,
525 },
526 Lint {
527 label: "impl_trait_redundant_captures",
528 description: r##"redundant precise-capturing `use<...>` syntax on an `impl Trait`"##,
529 default_severity: Severity::Allow,
530 warn_since: None,
531 deny_since: None,
532 },
533 Lint {
534 label: "implicit_provenance_casts",
535 description: r##"an `as` cast relying on exposed provenance is used"##,
536 default_severity: Severity::Allow,
537 warn_since: None,
538 deny_since: None,
539 },
540 Lint {
541 label: "improper_ctypes",
542 description: r##"proper use of libc types in foreign modules"##,
543 default_severity: Severity::Warning,
544 warn_since: None,
545 deny_since: None,
546 },
547 Lint {
548 label: "improper_ctypes_definitions",
549 description: r##"proper use of libc types in foreign item definitions"##,
550 default_severity: Severity::Warning,
551 warn_since: None,
552 deny_since: None,
553 },
554 Lint {
555 label: "improper_gpu_kernel_arg",
556 description: r##"GPU kernel entry points have a limited ABI"##,
557 default_severity: Severity::Warning,
558 warn_since: None,
559 deny_since: None,
560 },
561 Lint {
562 label: "incomplete_features",
563 description: r##"incomplete features that may function improperly in some or all cases"##,
564 default_severity: Severity::Warning,
565 warn_since: None,
566 deny_since: None,
567 },
568 Lint {
569 label: "incomplete_include",
570 description: r##"trailing content in included file"##,
571 default_severity: Severity::Error,
572 warn_since: None,
573 deny_since: None,
574 },
575 Lint {
576 label: "ineffective_unstable_reexports",
577 description: r##"detects ineffective `#[unstable]` attributes on re-exports"##,
578 default_severity: Severity::Error,
579 warn_since: None,
580 deny_since: None,
581 },
582 Lint {
583 label: "ineffective_unstable_trait_impl",
584 description: r##"detects `#[unstable]` on stable trait implementations for stable types"##,
585 default_severity: Severity::Error,
586 warn_since: None,
587 deny_since: None,
588 },
589 Lint {
590 label: "inline_no_sanitize",
591 description: r##"detects incompatible use of `#[inline(always)]` and `#[sanitize(... = "off")]`"##,
592 default_severity: Severity::Warning,
593 warn_since: None,
594 deny_since: None,
595 },
596 Lint {
597 label: "integer_to_ptr_transmutes",
598 description: r##"detects integer to pointer transmutes"##,
599 default_severity: Severity::Warning,
600 warn_since: None,
601 deny_since: None,
602 },
603 Lint {
604 label: "internal_eq_trait_method_impls",
605 description: r##"manual implementation of the internal `Eq::assert_receiver_is_total_eq` method"##,
606 default_severity: Severity::Warning,
607 warn_since: None,
608 deny_since: None,
609 },
610 Lint {
611 label: "internal_features",
612 description: r##"internal features are not supposed to be used"##,
613 default_severity: Severity::Warning,
614 warn_since: None,
615 deny_since: None,
616 },
617 Lint {
618 label: "invalid_atomic_ordering",
619 description: r##"usage of invalid atomic ordering in atomic operations and memory fences"##,
620 default_severity: Severity::Error,
621 warn_since: None,
622 deny_since: None,
623 },
624 Lint {
625 label: "invalid_doc_attributes",
626 description: r##"detects invalid `#[doc(...)]` attributes"##,
627 default_severity: Severity::Warning,
628 warn_since: None,
629 deny_since: None,
630 },
631 Lint {
632 label: "invalid_from_utf8",
633 description: r##"using a non UTF-8 literal in `std::str::from_utf8`"##,
634 default_severity: Severity::Warning,
635 warn_since: None,
636 deny_since: None,
637 },
638 Lint {
639 label: "invalid_from_utf8_unchecked",
640 description: r##"using a non UTF-8 literal in `std::str::from_utf8_unchecked`"##,
641 default_severity: Severity::Error,
642 warn_since: None,
643 deny_since: None,
644 },
645 Lint {
646 label: "invalid_macro_export_arguments",
647 description: r##""invalid_parameter" isn't a valid argument for `#[macro_export]`"##,
648 default_severity: Severity::Error,
649 warn_since: None,
650 deny_since: None,
651 },
652 Lint {
653 label: "invalid_nan_comparisons",
654 description: r##"detects invalid floating point NaN comparisons"##,
655 default_severity: Severity::Warning,
656 warn_since: None,
657 deny_since: None,
658 },
659 Lint {
660 label: "invalid_null_arguments",
661 description: r##"invalid null pointer in arguments"##,
662 default_severity: Severity::Error,
663 warn_since: None,
664 deny_since: None,
665 },
666 Lint {
667 label: "invalid_reference_casting",
668 description: r##"casts of `&T` to `&mut T` without interior mutability"##,
669 default_severity: Severity::Error,
670 warn_since: None,
671 deny_since: None,
672 },
673 Lint {
674 label: "invalid_runtime_symbol_definitions",
675 description: r##"invalid definition of a symbol used by the standard library"##,
676 default_severity: Severity::Error,
677 warn_since: None,
678 deny_since: None,
679 },
680 Lint {
681 label: "invalid_type_param_default",
682 description: r##"type parameter default erroneously allowed in invalid location"##,
683 default_severity: Severity::Error,
684 warn_since: None,
685 deny_since: None,
686 },
687 Lint {
688 label: "invalid_value",
689 description: r##"an invalid value is being created (such as a null reference)"##,
690 default_severity: Severity::Warning,
691 warn_since: None,
692 deny_since: None,
693 },
694 Lint {
695 label: "irrefutable_let_patterns",
696 description: r##"detects irrefutable patterns in `if let` and `while let` statements"##,
697 default_severity: Severity::Warning,
698 warn_since: None,
699 deny_since: None,
700 },
701 Lint {
702 label: "keyword_idents_2018",
703 description: r##"detects edition keywords being used as an identifier"##,
704 default_severity: Severity::Allow,
705 warn_since: None,
706 deny_since: None,
707 },
708 Lint {
709 label: "keyword_idents_2024",
710 description: r##"detects edition keywords being used as an identifier"##,
711 default_severity: Severity::Allow,
712 warn_since: None,
713 deny_since: None,
714 },
715 Lint {
716 label: "large_assignments",
717 description: r##"detects large moves or copies"##,
718 default_severity: Severity::Warning,
719 warn_since: None,
720 deny_since: None,
721 },
722 Lint {
723 label: "late_bound_lifetime_arguments",
724 description: r##"detects generic lifetime arguments in path segments with late bound lifetime parameters"##,
725 default_severity: Severity::Warning,
726 warn_since: None,
727 deny_since: None,
728 },
729 Lint {
730 label: "legacy_derive_helpers",
731 description: r##"detects derive helper attributes that are used before they are introduced"##,
732 default_severity: Severity::Error,
733 warn_since: None,
734 deny_since: None,
735 },
736 Lint {
737 label: "let_underscore_drop",
738 description: r##"non-binding let on a type that has a destructor"##,
739 default_severity: Severity::Allow,
740 warn_since: None,
741 deny_since: None,
742 },
743 Lint {
744 label: "let_underscore_drop_guard",
745 description: r##"non-binding let on a `DropGuard`"##,
746 default_severity: Severity::Error,
747 warn_since: None,
748 deny_since: None,
749 },
750 Lint {
751 label: "let_underscore_lock",
752 description: r##"non-binding let on a synchronization lock"##,
753 default_severity: Severity::Error,
754 warn_since: None,
755 deny_since: None,
756 },
757 Lint {
758 label: "linker_info",
759 description: r##"linker warnings known to be informational-only and not indicative of a problem"##,
760 default_severity: Severity::Allow,
761 warn_since: None,
762 deny_since: None,
763 },
764 Lint {
765 label: "linker_messages",
766 description: r##"warnings emitted at runtime by the target-specific linker program"##,
767 default_severity: Severity::Warning,
768 warn_since: None,
769 deny_since: None,
770 },
771 Lint {
772 label: "long_running_const_eval",
773 description: r##"detects long const eval operations"##,
774 default_severity: Severity::Error,
775 warn_since: None,
776 deny_since: None,
777 },
778 Lint {
779 label: "macro_expanded_macro_exports_accessed_by_absolute_paths",
780 description: r##"macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths"##,
781 default_severity: Severity::Error,
782 warn_since: None,
783 deny_since: None,
784 },
785 Lint {
786 label: "macro_use_extern_crate",
787 description: r##"the `#[macro_use]` attribute is now deprecated in favor of using macros via the module system"##,
788 default_severity: Severity::Allow,
789 warn_since: None,
790 deny_since: None,
791 },
792 Lint {
793 label: "malformed_diagnostic_attributes",
794 description: r##"detects malformed diagnostic attributes"##,
795 default_severity: Severity::Warning,
796 warn_since: None,
797 deny_since: None,
798 },
799 Lint {
800 label: "malformed_diagnostic_filters",
801 description: r##"detects malformed filters in diagnostic attributes"##,
802 default_severity: Severity::Warning,
803 warn_since: None,
804 deny_since: None,
805 },
806 Lint {
807 label: "malformed_diagnostic_format_literals",
808 description: r##"detects diagnostic attribute with malformed diagnostic format literals"##,
809 default_severity: Severity::Warning,
810 warn_since: None,
811 deny_since: None,
812 },
813 Lint {
814 label: "map_unit_fn",
815 description: r##"`Iterator::map` call that discard the iterator's values"##,
816 default_severity: Severity::Warning,
817 warn_since: None,
818 deny_since: None,
819 },
820 Lint {
821 label: "meta_variable_misuse",
822 description: r##"possible meta-variable misuse at macro definition"##,
823 default_severity: Severity::Allow,
824 warn_since: None,
825 deny_since: None,
826 },
827 Lint {
828 label: "method_call_on_diverging_infer_var",
829 description: r##"detects method calls on a result of never-to-any coercion"##,
830 default_severity: Severity::Warning,
831 warn_since: None,
832 deny_since: None,
833 },
834 Lint {
835 label: "mismatched_lifetime_syntaxes",
836 description: r##"detects when a lifetime uses different syntax between arguments and return values"##,
837 default_severity: Severity::Warning,
838 warn_since: None,
839 deny_since: None,
840 },
841 Lint {
842 label: "misplaced_diagnostic_attributes",
843 description: r##"detects diagnostic attributes that are placed on the wrong item"##,
844 default_severity: Severity::Warning,
845 warn_since: None,
846 deny_since: None,
847 },
848 Lint {
849 label: "missing_abi",
850 description: r##"No declared ABI for extern declaration"##,
851 default_severity: Severity::Warning,
852 warn_since: None,
853 deny_since: None,
854 },
855 Lint {
856 label: "missing_copy_implementations",
857 description: r##"detects potentially-forgotten implementations of `Copy`"##,
858 default_severity: Severity::Allow,
859 warn_since: None,
860 deny_since: None,
861 },
862 Lint {
863 label: "missing_debug_implementations",
864 description: r##"detects missing implementations of Debug"##,
865 default_severity: Severity::Allow,
866 warn_since: None,
867 deny_since: None,
868 },
869 Lint {
870 label: "missing_docs",
871 description: r##"detects missing documentation for public members"##,
872 default_severity: Severity::Allow,
873 warn_since: None,
874 deny_since: None,
875 },
876 Lint {
877 label: "missing_gpu_kernel_export_name",
878 description: r##"mangled gpu-kernel function"##,
879 default_severity: Severity::Warning,
880 warn_since: None,
881 deny_since: None,
882 },
883 Lint {
884 label: "missing_unsafe_on_extern",
885 description: r##"detects missing unsafe keyword on extern declarations"##,
886 default_severity: Severity::Allow,
887 warn_since: None,
888 deny_since: None,
889 },
890 Lint {
891 label: "mixed_script_confusables",
892 description: r##"detects Unicode scripts whose mixed script confusables codepoints are solely used"##,
893 default_severity: Severity::Warning,
894 warn_since: None,
895 deny_since: None,
896 },
897 Lint {
898 label: "multiple_supertrait_upcastable",
899 description: r##"detect when a dyn-compatible trait has multiple supertraits"##,
900 default_severity: Severity::Allow,
901 warn_since: None,
902 deny_since: None,
903 },
904 Lint {
905 label: "must_not_suspend",
906 description: r##"use of a `#[must_not_suspend]` value across a yield point"##,
907 default_severity: Severity::Allow,
908 warn_since: None,
909 deny_since: None,
910 },
911 Lint {
912 label: "mutable_transmutes",
913 description: r##"transmuting &T to &mut T is undefined behavior, even if the reference is unused"##,
914 default_severity: Severity::Error,
915 warn_since: None,
916 deny_since: None,
917 },
918 Lint {
919 label: "named_arguments_used_positionally",
920 description: r##"named arguments in format used positionally"##,
921 default_severity: Severity::Warning,
922 warn_since: None,
923 deny_since: None,
924 },
925 Lint {
926 label: "named_asm_labels",
927 description: r##"named labels in inline assembly"##,
928 default_severity: Severity::Error,
929 warn_since: None,
930 deny_since: None,
931 },
932 Lint {
933 label: "never_type_fallback_flowing_into_unsafe",
934 description: r##"never type fallback affecting unsafe function calls"##,
935 default_severity: Severity::Error,
936 warn_since: None,
937 deny_since: None,
938 },
939 Lint {
940 label: "no_link_attributes",
941 description: r##"detects usage of `#[no_link]` on `extern crate` items"##,
942 default_severity: Severity::Error,
943 warn_since: None,
944 deny_since: None,
945 },
946 Lint {
947 label: "no_mangle_const_items",
948 description: r##"const items will not have their symbols exported"##,
949 default_severity: Severity::Error,
950 warn_since: None,
951 deny_since: None,
952 },
953 Lint {
954 label: "non_ascii_idents",
955 description: r##"detects non-ASCII identifiers"##,
956 default_severity: Severity::Allow,
957 warn_since: None,
958 deny_since: None,
959 },
960 Lint {
961 label: "non_camel_case_types",
962 description: r##"types, variants, traits and type parameters should have camel case names"##,
963 default_severity: Severity::Warning,
964 warn_since: None,
965 deny_since: None,
966 },
967 Lint {
968 label: "non_contiguous_range_endpoints",
969 description: r##"detects off-by-one errors with exclusive range patterns"##,
970 default_severity: Severity::Warning,
971 warn_since: None,
972 deny_since: None,
973 },
974 Lint {
975 label: "non_exhaustive_omitted_patterns",
976 description: r##"detect when patterns of types marked `non_exhaustive` are missed"##,
977 default_severity: Severity::Allow,
978 warn_since: None,
979 deny_since: None,
980 },
981 Lint {
982 label: "non_fmt_panics",
983 description: r##"detect single-argument panic!() invocations in which the argument is not a format string"##,
984 default_severity: Severity::Warning,
985 warn_since: None,
986 deny_since: None,
987 },
988 Lint {
989 label: "non_local_definitions",
990 description: r##"checks for non-local definitions"##,
991 default_severity: Severity::Warning,
992 warn_since: None,
993 deny_since: None,
994 },
995 Lint {
996 label: "non_shorthand_field_patterns",
997 description: r##"using `Struct { x: x }` instead of `Struct { x }` in a pattern"##,
998 default_severity: Severity::Warning,
999 warn_since: None,
1000 deny_since: None,
1001 },
1002 Lint {
1003 label: "non_snake_case",
1004 description: r##"variables, methods, functions, lifetime parameters and modules should have snake case names"##,
1005 default_severity: Severity::Warning,
1006 warn_since: None,
1007 deny_since: None,
1008 },
1009 Lint {
1010 label: "non_upper_case_globals",
1011 description: r##"static constants should have uppercase identifiers"##,
1012 default_severity: Severity::Warning,
1013 warn_since: None,
1014 deny_since: None,
1015 },
1016 Lint {
1017 label: "noop_method_call",
1018 description: r##"detects the use of well-known noop methods"##,
1019 default_severity: Severity::Warning,
1020 warn_since: None,
1021 deny_since: None,
1022 },
1023 Lint {
1024 label: "opaque_hidden_inferred_bound",
1025 description: r##"detects the use of nested `impl Trait` types in associated type bounds that are not general enough"##,
1026 default_severity: Severity::Warning,
1027 warn_since: None,
1028 deny_since: None,
1029 },
1030 Lint {
1031 label: "out_of_scope_macro_calls",
1032 description: r##"detects out of scope calls to `macro_rules` in key-value attributes"##,
1033 default_severity: Severity::Error,
1034 warn_since: None,
1035 deny_since: None,
1036 },
1037 Lint {
1038 label: "overflowing_literals",
1039 description: r##"literal out of range for its type"##,
1040 default_severity: Severity::Error,
1041 warn_since: None,
1042 deny_since: None,
1043 },
1044 Lint {
1045 label: "overlapping_range_endpoints",
1046 description: r##"detects range patterns with overlapping endpoints"##,
1047 default_severity: Severity::Warning,
1048 warn_since: None,
1049 deny_since: None,
1050 },
1051 Lint {
1052 label: "partial_stack_protector",
1053 description: r##"partial use of stack-protector that was previously accepted and used in practice"##,
1054 default_severity: Severity::Warning,
1055 warn_since: None,
1056 deny_since: None,
1057 },
1058 Lint {
1059 label: "path_statements",
1060 description: r##"path statements with no effect"##,
1061 default_severity: Severity::Warning,
1062 warn_since: None,
1063 deny_since: None,
1064 },
1065 Lint {
1066 label: "patterns_in_fns_without_body",
1067 description: r##"patterns in functions without body were erroneously allowed"##,
1068 default_severity: Severity::Error,
1069 warn_since: None,
1070 deny_since: None,
1071 },
1072 Lint {
1073 label: "private_bounds",
1074 description: r##"private type in secondary interface of an item"##,
1075 default_severity: Severity::Warning,
1076 warn_since: None,
1077 deny_since: None,
1078 },
1079 Lint {
1080 label: "private_interfaces",
1081 description: r##"private type in primary interface of an item"##,
1082 default_severity: Severity::Warning,
1083 warn_since: None,
1084 deny_since: None,
1085 },
1086 Lint {
1087 label: "proc_macro_derive_resolution_fallback",
1088 description: r##"detects proc macro derives using inaccessible names from parent modules"##,
1089 default_severity: Severity::Error,
1090 warn_since: None,
1091 deny_since: None,
1092 },
1093 Lint {
1094 label: "ptr_to_integer_transmute_in_consts",
1095 description: r##"detects pointer to integer transmutes in const functions and associated constants"##,
1096 default_severity: Severity::Warning,
1097 warn_since: None,
1098 deny_since: None,
1099 },
1100 Lint {
1101 label: "pub_use_of_private_extern_crate",
1102 description: r##"detect public re-exports of private extern crates"##,
1103 default_severity: Severity::Error,
1104 warn_since: None,
1105 deny_since: None,
1106 },
1107 Lint {
1108 label: "raw_borrows_via_references",
1109 description: r##"creating raw borrows via references is discouraged"##,
1110 default_severity: Severity::Allow,
1111 warn_since: None,
1112 deny_since: None,
1113 },
1114 Lint {
1115 label: "recursion_depth_exceeding_limit",
1116 description: r##"detects trait solving overflow that only happens with the next solver"##,
1117 default_severity: Severity::Warning,
1118 warn_since: None,
1119 deny_since: None,
1120 },
1121 Lint {
1122 label: "redundant_imports",
1123 description: r##"imports that are redundant due to being imported already"##,
1124 default_severity: Severity::Allow,
1125 warn_since: None,
1126 deny_since: None,
1127 },
1128 Lint {
1129 label: "redundant_lifetimes",
1130 description: r##"detects lifetime parameters that are redundant because they are equal to some other named lifetime"##,
1131 default_severity: Severity::Allow,
1132 warn_since: None,
1133 deny_since: None,
1134 },
1135 Lint {
1136 label: "redundant_semicolons",
1137 description: r##"detects unnecessary trailing semicolons"##,
1138 default_severity: Severity::Warning,
1139 warn_since: None,
1140 deny_since: None,
1141 },
1142 Lint {
1143 label: "refining_impl_trait_internal",
1144 description: r##"impl trait in impl method signature does not match trait method signature"##,
1145 default_severity: Severity::Warning,
1146 warn_since: None,
1147 deny_since: None,
1148 },
1149 Lint {
1150 label: "refining_impl_trait_reachable",
1151 description: r##"impl trait in impl method signature does not match trait method signature"##,
1152 default_severity: Severity::Warning,
1153 warn_since: None,
1154 deny_since: None,
1155 },
1156 Lint {
1157 label: "renamed_and_removed_lints",
1158 description: r##"lints that have been renamed or removed"##,
1159 default_severity: Severity::Warning,
1160 warn_since: None,
1161 deny_since: None,
1162 },
1163 Lint {
1164 label: "repeated_reprs",
1165 description: r##"detects repeated representations in `#[repr(..)]` attributes"##,
1166 default_severity: Severity::Warning,
1167 warn_since: None,
1168 deny_since: None,
1169 },
1170 Lint {
1171 label: "repr_c_enums_larger_than_int",
1172 description: r##"repr(C) enums with discriminant values that do not fit into a C int"##,
1173 default_severity: Severity::Warning,
1174 warn_since: None,
1175 deny_since: None,
1176 },
1177 Lint {
1178 label: "resolving_to_items_shadowing_supertrait_items",
1179 description: r##"detects when a supertrait item is shadowed by a subtrait item"##,
1180 default_severity: Severity::Allow,
1181 warn_since: None,
1182 deny_since: None,
1183 },
1184 Lint {
1185 label: "rtsan_nonblocking_async",
1186 description: r##"detects incompatible uses of `#[sanitize(realtime = "nonblocking")]` on async functions"##,
1187 default_severity: Severity::Warning,
1188 warn_since: None,
1189 deny_since: None,
1190 },
1191 Lint {
1192 label: "rust_2021_incompatible_closure_captures",
1193 description: r##"detects closures affected by Rust 2021 changes"##,
1194 default_severity: Severity::Allow,
1195 warn_since: None,
1196 deny_since: None,
1197 },
1198 Lint {
1199 label: "rust_2021_incompatible_or_patterns",
1200 description: r##"detects usage of old versions of or-patterns"##,
1201 default_severity: Severity::Allow,
1202 warn_since: None,
1203 deny_since: None,
1204 },
1205 Lint {
1206 label: "rust_2021_prefixes_incompatible_syntax",
1207 description: r##"identifiers that will be parsed as a prefix in Rust 2021"##,
1208 default_severity: Severity::Allow,
1209 warn_since: None,
1210 deny_since: None,
1211 },
1212 Lint {
1213 label: "rust_2021_prelude_collisions",
1214 description: r##"detects the usage of trait methods which are ambiguous with traits added to the prelude in future editions"##,
1215 default_severity: Severity::Allow,
1216 warn_since: None,
1217 deny_since: None,
1218 },
1219 Lint {
1220 label: "rust_2024_guarded_string_incompatible_syntax",
1221 description: r##"will be parsed as a guarded string in Rust 2024"##,
1222 default_severity: Severity::Allow,
1223 warn_since: None,
1224 deny_since: None,
1225 },
1226 Lint {
1227 label: "rust_2024_incompatible_pat",
1228 description: r##"detects patterns whose meaning will change in Rust 2024"##,
1229 default_severity: Severity::Allow,
1230 warn_since: None,
1231 deny_since: None,
1232 },
1233 Lint {
1234 label: "rust_2024_prelude_collisions",
1235 description: r##"detects the usage of trait methods which are ambiguous with traits added to the prelude in future editions"##,
1236 default_severity: Severity::Allow,
1237 warn_since: None,
1238 deny_since: None,
1239 },
1240 Lint {
1241 label: "self_constructor_from_outer_item",
1242 description: r##"detect unsupported use of `Self` from outer item"##,
1243 default_severity: Severity::Warning,
1244 warn_since: None,
1245 deny_since: None,
1246 },
1247 Lint {
1248 label: "semicolon_in_expressions_from_macros",
1249 description: r##"trailing semicolon in macro body used as expression"##,
1250 default_severity: Severity::Error,
1251 warn_since: None,
1252 deny_since: None,
1253 },
1254 Lint {
1255 label: "semicolon_in_expressions_from_non_local_macros",
1256 description: r##"trailing semicolon in macro body used as expression"##,
1257 default_severity: Severity::Warning,
1258 warn_since: None,
1259 deny_since: None,
1260 },
1261 Lint {
1262 label: "shadowing_supertrait_items",
1263 description: r##"detects when a supertrait item is shadowed by a subtrait item"##,
1264 default_severity: Severity::Allow,
1265 warn_since: None,
1266 deny_since: None,
1267 },
1268 Lint {
1269 label: "single_use_lifetimes",
1270 description: r##"detects lifetime parameters that are only used once"##,
1271 default_severity: Severity::Allow,
1272 warn_since: None,
1273 deny_since: None,
1274 },
1275 Lint {
1276 label: "special_module_name",
1277 description: r##"module declarations for files with a special meaning"##,
1278 default_severity: Severity::Warning,
1279 warn_since: None,
1280 deny_since: None,
1281 },
1282 Lint {
1283 label: "stable_features",
1284 description: r##"stable features found in `#[feature]` directive"##,
1285 default_severity: Severity::Warning,
1286 warn_since: None,
1287 deny_since: None,
1288 },
1289 Lint {
1290 label: "static_mut_refs",
1291 description: r##"creating a shared reference to mutable static"##,
1292 default_severity: Severity::Warning,
1293 warn_since: None,
1294 deny_since: Some(Edition::Edition2024),
1295 },
1296 Lint {
1297 label: "suspicious_double_ref_op",
1298 description: r##"suspicious call of trait method on `&&T`"##,
1299 default_severity: Severity::Warning,
1300 warn_since: None,
1301 deny_since: None,
1302 },
1303 Lint {
1304 label: "suspicious_runtime_symbol_definitions",
1305 description: r##"suspicious definition of a symbol used by the standard library"##,
1306 default_severity: Severity::Warning,
1307 warn_since: None,
1308 deny_since: None,
1309 },
1310 Lint {
1311 label: "tail_call_track_caller",
1312 description: r##"detects tail calls of functions marked with `#[track_caller]`"##,
1313 default_severity: Severity::Warning,
1314 warn_since: None,
1315 deny_since: None,
1316 },
1317 Lint {
1318 label: "tail_expr_drop_order",
1319 description: r##"Detect and warn on significant change in drop order in tail expression location"##,
1320 default_severity: Severity::Allow,
1321 warn_since: None,
1322 deny_since: None,
1323 },
1324 Lint {
1325 label: "test_unstable_lint",
1326 description: r##"this unstable lint is only for testing"##,
1327 default_severity: Severity::Error,
1328 warn_since: None,
1329 deny_since: None,
1330 },
1331 Lint {
1332 label: "text_direction_codepoint_in_comment",
1333 description: r##"invisible directionality-changing codepoints in comment"##,
1334 default_severity: Severity::Error,
1335 warn_since: None,
1336 deny_since: None,
1337 },
1338 Lint {
1339 label: "text_direction_codepoint_in_literal",
1340 description: r##"detect special Unicode codepoints that affect the visual representation of text on screen, changing the direction in which text flows"##,
1341 default_severity: Severity::Error,
1342 warn_since: None,
1343 deny_since: None,
1344 },
1345 Lint {
1346 label: "trivial_bounds",
1347 description: r##"these bounds don't depend on an type parameters"##,
1348 default_severity: Severity::Warning,
1349 warn_since: None,
1350 deny_since: None,
1351 },
1352 Lint {
1353 label: "trivial_casts",
1354 description: r##"detects trivial casts which could be removed"##,
1355 default_severity: Severity::Allow,
1356 warn_since: None,
1357 deny_since: None,
1358 },
1359 Lint {
1360 label: "trivial_numeric_casts",
1361 description: r##"detects trivial casts of numeric types which could be removed"##,
1362 default_severity: Severity::Allow,
1363 warn_since: None,
1364 deny_since: None,
1365 },
1366 Lint {
1367 label: "type_alias_bounds",
1368 description: r##"bounds in type aliases are not enforced"##,
1369 default_severity: Severity::Warning,
1370 warn_since: None,
1371 deny_since: None,
1372 },
1373 Lint {
1374 label: "tyvar_behind_raw_pointer",
1375 description: r##"raw pointer to an inference variable"##,
1376 default_severity: Severity::Warning,
1377 warn_since: None,
1378 deny_since: None,
1379 },
1380 Lint {
1381 label: "uncommon_codepoints",
1382 description: r##"detects uncommon Unicode codepoints in identifiers"##,
1383 default_severity: Severity::Warning,
1384 warn_since: None,
1385 deny_since: None,
1386 },
1387 Lint {
1388 label: "unconditional_panic",
1389 description: r##"operation will cause a panic at runtime"##,
1390 default_severity: Severity::Error,
1391 warn_since: None,
1392 deny_since: None,
1393 },
1394 Lint {
1395 label: "unconditional_recursion",
1396 description: r##"functions that cannot return without calling themselves"##,
1397 default_severity: Severity::Warning,
1398 warn_since: None,
1399 deny_since: None,
1400 },
1401 Lint {
1402 label: "uncovered_param_in_projection",
1403 description: r##"impl contains type parameters that are not covered"##,
1404 default_severity: Severity::Warning,
1405 warn_since: None,
1406 deny_since: None,
1407 },
1408 Lint {
1409 label: "undropped_manually_drops",
1410 description: r##"calls to `drop` and `drop_in_place` where the dropped value is `std::mem::ManuallyDrop`"##,
1411 default_severity: Severity::Error,
1412 warn_since: None,
1413 deny_since: None,
1414 },
1415 Lint {
1416 label: "unevaluated_default_field_value",
1417 description: r##"detects default field values on types that have const parameters"##,
1418 default_severity: Severity::Warning,
1419 warn_since: None,
1420 deny_since: None,
1421 },
1422 Lint {
1423 label: "unexpected_cfgs",
1424 description: r##"detects unexpected names and values in `#[cfg]` conditions"##,
1425 default_severity: Severity::Warning,
1426 warn_since: None,
1427 deny_since: None,
1428 },
1429 Lint {
1430 label: "unfulfilled_lint_expectations",
1431 description: r##"unfulfilled lint expectation"##,
1432 default_severity: Severity::Warning,
1433 warn_since: None,
1434 deny_since: None,
1435 },
1436 Lint {
1437 label: "ungated_async_fn_track_caller",
1438 description: r##"enabling track_caller on an async fn is a no-op unless the async_fn_track_caller feature is enabled"##,
1439 default_severity: Severity::Warning,
1440 warn_since: None,
1441 deny_since: None,
1442 },
1443 Lint {
1444 label: "uninhabited_static",
1445 description: r##"uninhabited static"##,
1446 default_severity: Severity::Error,
1447 warn_since: None,
1448 deny_since: None,
1449 },
1450 Lint {
1451 label: "unit_bindings",
1452 description: r##"binding is useless because it has the unit `()` type"##,
1453 default_severity: Severity::Allow,
1454 warn_since: None,
1455 deny_since: None,
1456 },
1457 Lint {
1458 label: "unknown_crate_types",
1459 description: r##"unknown crate type found in `#[crate_type]` directive"##,
1460 default_severity: Severity::Error,
1461 warn_since: None,
1462 deny_since: None,
1463 },
1464 Lint {
1465 label: "unknown_diagnostic_attributes",
1466 description: r##"detects unknown diagnostic attributes"##,
1467 default_severity: Severity::Warning,
1468 warn_since: None,
1469 deny_since: None,
1470 },
1471 Lint {
1472 label: "unknown_lints",
1473 description: r##"unrecognized lint attribute"##,
1474 default_severity: Severity::Warning,
1475 warn_since: None,
1476 deny_since: None,
1477 },
1478 Lint {
1479 label: "unmarked_unchecked_type_aliases",
1480 description: r##"suggest adding `#[rustc_unchecked_type_aliases]` to unchecked type aliases"##,
1481 default_severity: Severity::Allow,
1482 warn_since: None,
1483 deny_since: None,
1484 },
1485 Lint {
1486 label: "unnameable_test_items",
1487 description: r##"detects an item that cannot be named being marked as `#[test_case]`"##,
1488 default_severity: Severity::Warning,
1489 warn_since: None,
1490 deny_since: None,
1491 },
1492 Lint {
1493 label: "unnameable_types",
1494 description: r##"effective visibility of a type is larger than the area in which it can be named"##,
1495 default_severity: Severity::Allow,
1496 warn_since: None,
1497 deny_since: None,
1498 },
1499 Lint {
1500 label: "unnecessary_transmutes",
1501 description: r##"detects transmutes that can also be achieved by other operations"##,
1502 default_severity: Severity::Warning,
1503 warn_since: None,
1504 deny_since: None,
1505 },
1506 Lint {
1507 label: "unpredictable_function_pointer_comparisons",
1508 description: r##"detects unpredictable function pointer comparisons"##,
1509 default_severity: Severity::Warning,
1510 warn_since: None,
1511 deny_since: None,
1512 },
1513 Lint {
1514 label: "unqualified_local_imports",
1515 description: r##"`use` of a local item without leading `self::`, `super::`, or `crate::`"##,
1516 default_severity: Severity::Allow,
1517 warn_since: None,
1518 deny_since: None,
1519 },
1520 Lint {
1521 label: "unreachable_cfg_select_predicates",
1522 description: r##"detects unreachable configuration predicates in the cfg_select macro"##,
1523 default_severity: Severity::Warning,
1524 warn_since: None,
1525 deny_since: None,
1526 },
1527 Lint {
1528 label: "unreachable_code",
1529 description: r##"detects unreachable code paths"##,
1530 default_severity: Severity::Warning,
1531 warn_since: None,
1532 deny_since: None,
1533 },
1534 Lint {
1535 label: "unreachable_patterns",
1536 description: r##"detects unreachable patterns"##,
1537 default_severity: Severity::Warning,
1538 warn_since: None,
1539 deny_since: None,
1540 },
1541 Lint {
1542 label: "unreachable_pub",
1543 description: r##"`pub` items not reachable from crate root"##,
1544 default_severity: Severity::Allow,
1545 warn_since: None,
1546 deny_since: None,
1547 },
1548 Lint {
1549 label: "unsafe_attr_outside_unsafe",
1550 description: r##"detects unsafe attributes outside of unsafe"##,
1551 default_severity: Severity::Allow,
1552 warn_since: None,
1553 deny_since: None,
1554 },
1555 Lint {
1556 label: "unsafe_code",
1557 description: r##"usage of `unsafe` code and other potentially unsound constructs"##,
1558 default_severity: Severity::Allow,
1559 warn_since: None,
1560 deny_since: None,
1561 },
1562 Lint {
1563 label: "unsafe_op_in_unsafe_fn",
1564 description: r##"unsafe operations in unsafe functions without an explicit unsafe block are deprecated"##,
1565 default_severity: Severity::Allow,
1566 warn_since: Some(Edition::Edition2024),
1567 deny_since: None,
1568 },
1569 Lint {
1570 label: "unstable_features",
1571 description: r##"enabling unstable features"##,
1572 default_severity: Severity::Allow,
1573 warn_since: None,
1574 deny_since: None,
1575 },
1576 Lint {
1577 label: "unstable_imports",
1578 description: r##"lints on accidentally allowed unstable imports"##,
1579 default_severity: Severity::Error,
1580 warn_since: None,
1581 deny_since: None,
1582 },
1583 Lint {
1584 label: "unstable_name_collisions",
1585 description: r##"detects name collision with an existing but unstable method"##,
1586 default_severity: Severity::Warning,
1587 warn_since: None,
1588 deny_since: None,
1589 },
1590 Lint {
1591 label: "unstable_syntax_pre_expansion",
1592 description: r##"unstable syntax can change at any point in the future, causing a hard error!"##,
1593 default_severity: Severity::Warning,
1594 warn_since: None,
1595 deny_since: None,
1596 },
1597 Lint {
1598 label: "unsupported_calling_conventions",
1599 description: r##"use of unsupported calling convention"##,
1600 default_severity: Severity::Warning,
1601 warn_since: None,
1602 deny_since: None,
1603 },
1604 Lint {
1605 label: "unused_allocation",
1606 description: r##"detects unnecessary allocations that can be eliminated"##,
1607 default_severity: Severity::Warning,
1608 warn_since: None,
1609 deny_since: None,
1610 },
1611 Lint {
1612 label: "unused_assignments",
1613 description: r##"detect assignments that will never be read"##,
1614 default_severity: Severity::Warning,
1615 warn_since: None,
1616 deny_since: None,
1617 },
1618 Lint {
1619 label: "unused_associated_type_bounds",
1620 description: r##"detects unused `Foo = Bar` bounds in `dyn Trait<Foo = Bar>`"##,
1621 default_severity: Severity::Warning,
1622 warn_since: None,
1623 deny_since: None,
1624 },
1625 Lint {
1626 label: "unused_attributes",
1627 description: r##"detects attributes that were not used by the compiler"##,
1628 default_severity: Severity::Warning,
1629 warn_since: None,
1630 deny_since: None,
1631 },
1632 Lint {
1633 label: "unused_braces",
1634 description: r##"unnecessary braces around an expression"##,
1635 default_severity: Severity::Warning,
1636 warn_since: None,
1637 deny_since: None,
1638 },
1639 Lint {
1640 label: "unused_comparisons",
1641 description: r##"comparisons made useless by limits of the types involved"##,
1642 default_severity: Severity::Warning,
1643 warn_since: None,
1644 deny_since: None,
1645 },
1646 Lint {
1647 label: "unused_crate_dependencies",
1648 description: r##"crate dependencies that are never used"##,
1649 default_severity: Severity::Allow,
1650 warn_since: None,
1651 deny_since: None,
1652 },
1653 Lint {
1654 label: "unused_doc_comments",
1655 description: r##"detects doc comments that aren't used by rustdoc"##,
1656 default_severity: Severity::Warning,
1657 warn_since: None,
1658 deny_since: None,
1659 },
1660 Lint {
1661 label: "unused_extern_crates",
1662 description: r##"extern crates that are never used"##,
1663 default_severity: Severity::Allow,
1664 warn_since: None,
1665 deny_since: None,
1666 },
1667 Lint {
1668 label: "unused_features",
1669 description: r##"unused features found in crate-level `#[feature]` directives"##,
1670 default_severity: Severity::Warning,
1671 warn_since: None,
1672 deny_since: None,
1673 },
1674 Lint {
1675 label: "unused_import_braces",
1676 description: r##"unnecessary braces around an imported item"##,
1677 default_severity: Severity::Allow,
1678 warn_since: None,
1679 deny_since: None,
1680 },
1681 Lint {
1682 label: "unused_imports",
1683 description: r##"imports that are never used"##,
1684 default_severity: Severity::Warning,
1685 warn_since: None,
1686 deny_since: None,
1687 },
1688 Lint {
1689 label: "unused_labels",
1690 description: r##"detects labels that are never used"##,
1691 default_severity: Severity::Warning,
1692 warn_since: None,
1693 deny_since: None,
1694 },
1695 Lint {
1696 label: "unused_lifetimes",
1697 description: r##"detects lifetime parameters that are never used"##,
1698 default_severity: Severity::Allow,
1699 warn_since: None,
1700 deny_since: None,
1701 },
1702 Lint {
1703 label: "unused_macro_rules",
1704 description: r##"detects macro rules that were not used"##,
1705 default_severity: Severity::Allow,
1706 warn_since: None,
1707 deny_since: None,
1708 },
1709 Lint {
1710 label: "unused_macros",
1711 description: r##"detects macros that were not used"##,
1712 default_severity: Severity::Warning,
1713 warn_since: None,
1714 deny_since: None,
1715 },
1716 Lint {
1717 label: "unused_must_use",
1718 description: r##"unused result of a type flagged as `#[must_use]`"##,
1719 default_severity: Severity::Warning,
1720 warn_since: None,
1721 deny_since: None,
1722 },
1723 Lint {
1724 label: "unused_mut",
1725 description: r##"detect mut variables which don't need to be mutable"##,
1726 default_severity: Severity::Warning,
1727 warn_since: None,
1728 deny_since: None,
1729 },
1730 Lint {
1731 label: "unused_parens",
1732 description: r##"`if`, `match`, `while` and `return` do not need parentheses"##,
1733 default_severity: Severity::Warning,
1734 warn_since: None,
1735 deny_since: None,
1736 },
1737 Lint {
1738 label: "unused_qualifications",
1739 description: r##"detects unnecessarily qualified names"##,
1740 default_severity: Severity::Allow,
1741 warn_since: None,
1742 deny_since: None,
1743 },
1744 Lint {
1745 label: "unused_results",
1746 description: r##"unused result of an expression in a statement"##,
1747 default_severity: Severity::Allow,
1748 warn_since: None,
1749 deny_since: None,
1750 },
1751 Lint {
1752 label: "unused_unsafe",
1753 description: r##"unnecessary use of an `unsafe` block"##,
1754 default_severity: Severity::Warning,
1755 warn_since: None,
1756 deny_since: None,
1757 },
1758 Lint {
1759 label: "unused_variables",
1760 description: r##"detect variables which are not used in any way"##,
1761 default_severity: Severity::Warning,
1762 warn_since: None,
1763 deny_since: None,
1764 },
1765 Lint {
1766 label: "unused_visibilities",
1767 description: r##"detect visibility qualifiers on `const _` items"##,
1768 default_severity: Severity::Warning,
1769 warn_since: None,
1770 deny_since: None,
1771 },
1772 Lint {
1773 label: "useless_deprecated",
1774 description: r##"detects deprecation attributes with no effect"##,
1775 default_severity: Severity::Error,
1776 warn_since: None,
1777 deny_since: None,
1778 },
1779 Lint {
1780 label: "useless_ptr_null_checks",
1781 description: r##"useless checking of non-null-typed pointer"##,
1782 default_severity: Severity::Warning,
1783 warn_since: None,
1784 deny_since: None,
1785 },
1786 Lint {
1787 label: "uses_power_alignment",
1788 description: r##"Structs do not follow the power alignment rule under repr(C)"##,
1789 default_severity: Severity::Warning,
1790 warn_since: None,
1791 deny_since: None,
1792 },
1793 Lint {
1794 label: "varargs_without_pattern",
1795 description: r##"detects usage of `...` arguments without a pattern in non-foreign items"##,
1796 default_severity: Severity::Error,
1797 warn_since: None,
1798 deny_since: None,
1799 },
1800 Lint {
1801 label: "variant_size_differences",
1802 description: r##"detects enums with widely varying variant sizes"##,
1803 default_severity: Severity::Allow,
1804 warn_since: None,
1805 deny_since: None,
1806 },
1807 Lint {
1808 label: "warnings",
1809 description: r##"mass-change the level for lints which produce warnings"##,
1810 default_severity: Severity::Warning,
1811 warn_since: None,
1812 deny_since: None,
1813 },
1814 Lint {
1815 label: "while_true",
1816 description: r##"suggest using `loop { }` instead of `while true { }`"##,
1817 default_severity: Severity::Warning,
1818 warn_since: None,
1819 deny_since: None,
1820 },
1821 Lint {
1822 label: "x86_softfloat_sse",
1823 description: r##"detects code that could be affected by LLVM backend issues on x86 softfloat targets"##,
1824 default_severity: Severity::Error,
1825 warn_since: None,
1826 deny_since: None,
1827 },
1828 Lint {
1829 label: "deprecated_safe",
1830 description: r##"lint group for: deprecated-safe-2024"##,
1831 default_severity: Severity::Allow,
1832 warn_since: None,
1833 deny_since: None,
1834 },
1835 Lint {
1836 label: "edition_future_compatibility",
1837 description: r##"lint group for: unmarked-unchecked-type-aliases"##,
1838 default_severity: Severity::Allow,
1839 warn_since: None,
1840 deny_since: None,
1841 },
1842 Lint {
1843 label: "future_incompatible",
1844 description: r##"lint group for: internal-eq-trait-method-impls, aarch64-softfloat-neon, ambiguous-associated-items, ambiguous-derive-helpers, ambiguous-glob-imported-traits, ambiguous-glob-imports, ambiguous-import-visibilities, ambiguous-panic-imports, coherence-leak-check, conflicting-repr-hints, const-evaluatable-unchecked, float-literal-f32-fallback, forbidden-lint-groups, ill-formed-attribute-input, invalid-macro-export-arguments, invalid-type-param-default, late-bound-lifetime-arguments, legacy-derive-helpers, macro-expanded-macro-exports-accessed-by-absolute-paths, method-call-on-diverging-infer-var, no-link-attributes, out-of-scope-macro-calls, partial-stack-protector, patterns-in-fns-without-body, proc-macro-derive-resolution-fallback, pub-use-of-private-extern-crate, recursion-depth-exceeding-limit, repr-c-enums-larger-than-int, self-constructor-from-outer-item, semicolon-in-expressions-from-macros, semicolon-in-expressions-from-non-local-macros, uncovered-param-in-projection, uninhabited-static, unstable-imports, unstable-name-collisions, unstable-syntax-pre-expansion, unsupported-calling-conventions, varargs-without-pattern, x86-softfloat-sse"##,
1845 default_severity: Severity::Allow,
1846 warn_since: None,
1847 deny_since: None,
1848 },
1849 Lint {
1850 label: "keyword_idents",
1851 description: r##"lint group for: keyword-idents-2018, keyword-idents-2024"##,
1852 default_severity: Severity::Allow,
1853 warn_since: None,
1854 deny_since: None,
1855 },
1856 Lint {
1857 label: "let_underscore",
1858 description: r##"lint group for: let-underscore-drop, let-underscore-lock"##,
1859 default_severity: Severity::Allow,
1860 warn_since: None,
1861 deny_since: None,
1862 },
1863 Lint {
1864 label: "nonstandard_style",
1865 description: r##"lint group for: non-camel-case-types, non-snake-case, non-upper-case-globals"##,
1866 default_severity: Severity::Allow,
1867 warn_since: None,
1868 deny_since: None,
1869 },
1870 Lint {
1871 label: "refining_impl_trait",
1872 description: r##"lint group for: refining-impl-trait-reachable, refining-impl-trait-internal"##,
1873 default_severity: Severity::Allow,
1874 warn_since: None,
1875 deny_since: None,
1876 },
1877 Lint {
1878 label: "rust_2018_compatibility",
1879 description: r##"lint group for: keyword-idents-2018, anonymous-parameters, absolute-paths-not-starting-with-crate, tyvar-behind-raw-pointer"##,
1880 default_severity: Severity::Allow,
1881 warn_since: None,
1882 deny_since: None,
1883 },
1884 Lint {
1885 label: "rust_2018_idioms",
1886 description: r##"lint group for: bare-trait-objects, unused-extern-crates, ellipsis-inclusive-range-patterns, elided-lifetimes-in-paths, explicit-outlives-requirements"##,
1887 default_severity: Severity::Allow,
1888 warn_since: None,
1889 deny_since: None,
1890 },
1891 Lint {
1892 label: "rust_2021_compatibility",
1893 description: r##"lint group for: ellipsis-inclusive-range-patterns, non-fmt-panics, array-into-iter, bare-trait-objects, rust-2021-incompatible-closure-captures, rust-2021-incompatible-or-patterns, rust-2021-prefixes-incompatible-syntax, rust-2021-prelude-collisions"##,
1894 default_severity: Severity::Allow,
1895 warn_since: None,
1896 deny_since: None,
1897 },
1898 Lint {
1899 label: "rust_2024_compatibility",
1900 description: r##"lint group for: keyword-idents-2024, edition-2024-expr-fragment-specifier, if-let-rescope, impl-trait-overcaptures, boxed-slice-into-iter, static-mut-refs, deprecated-safe-2024, missing-unsafe-on-extern, rust-2024-guarded-string-incompatible-syntax, rust-2024-incompatible-pat, rust-2024-prelude-collisions, tail-expr-drop-order, unsafe-attr-outside-unsafe, unsafe-op-in-unsafe-fn"##,
1901 default_severity: Severity::Allow,
1902 warn_since: None,
1903 deny_since: None,
1904 },
1905 Lint {
1906 label: "unknown_or_malformed_diagnostic_attributes",
1907 description: r##"lint group for: malformed-diagnostic-attributes, malformed-diagnostic-format-literals, misplaced-diagnostic-attributes, unknown-diagnostic-attributes"##,
1908 default_severity: Severity::Allow,
1909 warn_since: None,
1910 deny_since: None,
1911 },
1912 Lint {
1913 label: "unused",
1914 description: r##"lint group for: unused-imports, unused-variables, unused-visibilities, unused-assignments, dead-code, unused-mut, unreachable-cfg-select-predicates, unreachable-code, unreachable-patterns, unused-must-use, unused-unsafe, path-statements, unused-attributes, unused-macros, unused-macro-rules, unused-allocation, unused-doc-comments, unused-extern-crates, unused-features, unused-labels, unused-parens, unused-braces, redundant-semicolons, map-unit-fn, repeated-reprs"##,
1915 default_severity: Severity::Allow,
1916 warn_since: None,
1917 deny_since: None,
1918 },
1919];
1920
1921pub const DEFAULT_LINT_GROUPS: &[LintGroup] = &[
1922 LintGroup {
1923 lint: Lint {
1924 label: "deprecated_safe",
1925 description: r##"lint group for: deprecated-safe-2024"##,
1926 default_severity: Severity::Allow,
1927 warn_since: None,
1928 deny_since: None,
1929 },
1930 children: &["deprecated_safe_2024"],
1931 },
1932 LintGroup {
1933 lint: Lint {
1934 label: "edition_future_compatibility",
1935 description: r##"lint group for: unmarked-unchecked-type-aliases"##,
1936 default_severity: Severity::Allow,
1937 warn_since: None,
1938 deny_since: None,
1939 },
1940 children: &["unmarked_unchecked_type_aliases"],
1941 },
1942 LintGroup {
1943 lint: Lint {
1944 label: "future_incompatible",
1945 description: r##"lint group for: internal-eq-trait-method-impls, aarch64-softfloat-neon, ambiguous-associated-items, ambiguous-derive-helpers, ambiguous-glob-imported-traits, ambiguous-glob-imports, ambiguous-import-visibilities, ambiguous-panic-imports, coherence-leak-check, conflicting-repr-hints, const-evaluatable-unchecked, float-literal-f32-fallback, forbidden-lint-groups, ill-formed-attribute-input, invalid-macro-export-arguments, invalid-type-param-default, late-bound-lifetime-arguments, legacy-derive-helpers, macro-expanded-macro-exports-accessed-by-absolute-paths, method-call-on-diverging-infer-var, no-link-attributes, out-of-scope-macro-calls, partial-stack-protector, patterns-in-fns-without-body, proc-macro-derive-resolution-fallback, pub-use-of-private-extern-crate, recursion-depth-exceeding-limit, repr-c-enums-larger-than-int, self-constructor-from-outer-item, semicolon-in-expressions-from-macros, semicolon-in-expressions-from-non-local-macros, uncovered-param-in-projection, uninhabited-static, unstable-imports, unstable-name-collisions, unstable-syntax-pre-expansion, unsupported-calling-conventions, varargs-without-pattern, x86-softfloat-sse"##,
1946 default_severity: Severity::Allow,
1947 warn_since: None,
1948 deny_since: None,
1949 },
1950 children: &[
1951 "internal_eq_trait_method_impls",
1952 "aarch64_softfloat_neon",
1953 "ambiguous_associated_items",
1954 "ambiguous_derive_helpers",
1955 "ambiguous_glob_imported_traits",
1956 "ambiguous_glob_imports",
1957 "ambiguous_import_visibilities",
1958 "ambiguous_panic_imports",
1959 "coherence_leak_check",
1960 "conflicting_repr_hints",
1961 "const_evaluatable_unchecked",
1962 "float_literal_f32_fallback",
1963 "forbidden_lint_groups",
1964 "ill_formed_attribute_input",
1965 "invalid_macro_export_arguments",
1966 "invalid_type_param_default",
1967 "late_bound_lifetime_arguments",
1968 "legacy_derive_helpers",
1969 "macro_expanded_macro_exports_accessed_by_absolute_paths",
1970 "method_call_on_diverging_infer_var",
1971 "no_link_attributes",
1972 "out_of_scope_macro_calls",
1973 "partial_stack_protector",
1974 "patterns_in_fns_without_body",
1975 "proc_macro_derive_resolution_fallback",
1976 "pub_use_of_private_extern_crate",
1977 "recursion_depth_exceeding_limit",
1978 "repr_c_enums_larger_than_int",
1979 "self_constructor_from_outer_item",
1980 "semicolon_in_expressions_from_macros",
1981 "semicolon_in_expressions_from_non_local_macros",
1982 "uncovered_param_in_projection",
1983 "uninhabited_static",
1984 "unstable_imports",
1985 "unstable_name_collisions",
1986 "unstable_syntax_pre_expansion",
1987 "unsupported_calling_conventions",
1988 "varargs_without_pattern",
1989 "x86_softfloat_sse",
1990 ],
1991 },
1992 LintGroup {
1993 lint: Lint {
1994 label: "keyword_idents",
1995 description: r##"lint group for: keyword-idents-2018, keyword-idents-2024"##,
1996 default_severity: Severity::Allow,
1997 warn_since: None,
1998 deny_since: None,
1999 },
2000 children: &["keyword_idents_2018", "keyword_idents_2024"],
2001 },
2002 LintGroup {
2003 lint: Lint {
2004 label: "let_underscore",
2005 description: r##"lint group for: let-underscore-drop, let-underscore-lock"##,
2006 default_severity: Severity::Allow,
2007 warn_since: None,
2008 deny_since: None,
2009 },
2010 children: &["let_underscore_drop", "let_underscore_lock"],
2011 },
2012 LintGroup {
2013 lint: Lint {
2014 label: "nonstandard_style",
2015 description: r##"lint group for: non-camel-case-types, non-snake-case, non-upper-case-globals"##,
2016 default_severity: Severity::Allow,
2017 warn_since: None,
2018 deny_since: None,
2019 },
2020 children: &["non_camel_case_types", "non_snake_case", "non_upper_case_globals"],
2021 },
2022 LintGroup {
2023 lint: Lint {
2024 label: "refining_impl_trait",
2025 description: r##"lint group for: refining-impl-trait-reachable, refining-impl-trait-internal"##,
2026 default_severity: Severity::Allow,
2027 warn_since: None,
2028 deny_since: None,
2029 },
2030 children: &["refining_impl_trait_reachable", "refining_impl_trait_internal"],
2031 },
2032 LintGroup {
2033 lint: Lint {
2034 label: "rust_2018_compatibility",
2035 description: r##"lint group for: keyword-idents-2018, anonymous-parameters, absolute-paths-not-starting-with-crate, tyvar-behind-raw-pointer"##,
2036 default_severity: Severity::Allow,
2037 warn_since: None,
2038 deny_since: None,
2039 },
2040 children: &[
2041 "keyword_idents_2018",
2042 "anonymous_parameters",
2043 "absolute_paths_not_starting_with_crate",
2044 "tyvar_behind_raw_pointer",
2045 ],
2046 },
2047 LintGroup {
2048 lint: Lint {
2049 label: "rust_2018_idioms",
2050 description: r##"lint group for: bare-trait-objects, unused-extern-crates, ellipsis-inclusive-range-patterns, elided-lifetimes-in-paths, explicit-outlives-requirements"##,
2051 default_severity: Severity::Allow,
2052 warn_since: None,
2053 deny_since: None,
2054 },
2055 children: &[
2056 "bare_trait_objects",
2057 "unused_extern_crates",
2058 "ellipsis_inclusive_range_patterns",
2059 "elided_lifetimes_in_paths",
2060 "explicit_outlives_requirements",
2061 ],
2062 },
2063 LintGroup {
2064 lint: Lint {
2065 label: "rust_2021_compatibility",
2066 description: r##"lint group for: ellipsis-inclusive-range-patterns, non-fmt-panics, array-into-iter, bare-trait-objects, rust-2021-incompatible-closure-captures, rust-2021-incompatible-or-patterns, rust-2021-prefixes-incompatible-syntax, rust-2021-prelude-collisions"##,
2067 default_severity: Severity::Allow,
2068 warn_since: None,
2069 deny_since: None,
2070 },
2071 children: &[
2072 "ellipsis_inclusive_range_patterns",
2073 "non_fmt_panics",
2074 "array_into_iter",
2075 "bare_trait_objects",
2076 "rust_2021_incompatible_closure_captures",
2077 "rust_2021_incompatible_or_patterns",
2078 "rust_2021_prefixes_incompatible_syntax",
2079 "rust_2021_prelude_collisions",
2080 ],
2081 },
2082 LintGroup {
2083 lint: Lint {
2084 label: "rust_2024_compatibility",
2085 description: r##"lint group for: keyword-idents-2024, edition-2024-expr-fragment-specifier, if-let-rescope, impl-trait-overcaptures, boxed-slice-into-iter, static-mut-refs, deprecated-safe-2024, missing-unsafe-on-extern, rust-2024-guarded-string-incompatible-syntax, rust-2024-incompatible-pat, rust-2024-prelude-collisions, tail-expr-drop-order, unsafe-attr-outside-unsafe, unsafe-op-in-unsafe-fn"##,
2086 default_severity: Severity::Allow,
2087 warn_since: None,
2088 deny_since: None,
2089 },
2090 children: &[
2091 "keyword_idents_2024",
2092 "edition_2024_expr_fragment_specifier",
2093 "if_let_rescope",
2094 "impl_trait_overcaptures",
2095 "boxed_slice_into_iter",
2096 "static_mut_refs",
2097 "deprecated_safe_2024",
2098 "missing_unsafe_on_extern",
2099 "rust_2024_guarded_string_incompatible_syntax",
2100 "rust_2024_incompatible_pat",
2101 "rust_2024_prelude_collisions",
2102 "tail_expr_drop_order",
2103 "unsafe_attr_outside_unsafe",
2104 "unsafe_op_in_unsafe_fn",
2105 ],
2106 },
2107 LintGroup {
2108 lint: Lint {
2109 label: "unknown_or_malformed_diagnostic_attributes",
2110 description: r##"lint group for: malformed-diagnostic-attributes, malformed-diagnostic-format-literals, misplaced-diagnostic-attributes, unknown-diagnostic-attributes"##,
2111 default_severity: Severity::Allow,
2112 warn_since: None,
2113 deny_since: None,
2114 },
2115 children: &[
2116 "malformed_diagnostic_attributes",
2117 "malformed_diagnostic_format_literals",
2118 "misplaced_diagnostic_attributes",
2119 "unknown_diagnostic_attributes",
2120 ],
2121 },
2122 LintGroup {
2123 lint: Lint {
2124 label: "unused",
2125 description: r##"lint group for: unused-imports, unused-variables, unused-visibilities, unused-assignments, dead-code, unused-mut, unreachable-cfg-select-predicates, unreachable-code, unreachable-patterns, unused-must-use, unused-unsafe, path-statements, unused-attributes, unused-macros, unused-macro-rules, unused-allocation, unused-doc-comments, unused-extern-crates, unused-features, unused-labels, unused-parens, unused-braces, redundant-semicolons, map-unit-fn, repeated-reprs"##,
2126 default_severity: Severity::Allow,
2127 warn_since: None,
2128 deny_since: None,
2129 },
2130 children: &[
2131 "unused_imports",
2132 "unused_variables",
2133 "unused_visibilities",
2134 "unused_assignments",
2135 "dead_code",
2136 "unused_mut",
2137 "unreachable_cfg_select_predicates",
2138 "unreachable_code",
2139 "unreachable_patterns",
2140 "unused_must_use",
2141 "unused_unsafe",
2142 "path_statements",
2143 "unused_attributes",
2144 "unused_macros",
2145 "unused_macro_rules",
2146 "unused_allocation",
2147 "unused_doc_comments",
2148 "unused_extern_crates",
2149 "unused_features",
2150 "unused_labels",
2151 "unused_parens",
2152 "unused_braces",
2153 "redundant_semicolons",
2154 "map_unit_fn",
2155 "repeated_reprs",
2156 ],
2157 },
2158];
2159
2160pub const RUSTDOC_LINTS: &[Lint] = &[
2161 Lint {
2162 label: "rustdoc::bare_urls",
2163 description: r##"detects URLs that are not hyperlinks"##,
2164 default_severity: Severity::Warning,
2165 warn_since: None,
2166 deny_since: None,
2167 },
2168 Lint {
2169 label: "rustdoc::broken_footnote",
2170 description: r##"detects footnote references with no associated definition"##,
2171 default_severity: Severity::Warning,
2172 warn_since: None,
2173 deny_since: None,
2174 },
2175 Lint {
2176 label: "rustdoc::broken_intra_doc_links",
2177 description: r##"failures in resolving intra-doc link targets"##,
2178 default_severity: Severity::Warning,
2179 warn_since: None,
2180 deny_since: None,
2181 },
2182 Lint {
2183 label: "rustdoc::invalid_codeblock_attributes",
2184 description: r##"codeblock attribute looks a lot like a known one"##,
2185 default_severity: Severity::Warning,
2186 warn_since: None,
2187 deny_since: None,
2188 },
2189 Lint {
2190 label: "rustdoc::invalid_html_tags",
2191 description: r##"detects invalid HTML tags in doc comments"##,
2192 default_severity: Severity::Warning,
2193 warn_since: None,
2194 deny_since: None,
2195 },
2196 Lint {
2197 label: "rustdoc::invalid_markdown_table",
2198 description: r##"detects unescaped pipe in table rows in doc comments"##,
2199 default_severity: Severity::Warning,
2200 warn_since: None,
2201 deny_since: None,
2202 },
2203 Lint {
2204 label: "rustdoc::invalid_rust_codeblocks",
2205 description: r##"codeblock could not be parsed as valid Rust or is empty"##,
2206 default_severity: Severity::Warning,
2207 warn_since: None,
2208 deny_since: None,
2209 },
2210 Lint {
2211 label: "rustdoc::missing_crate_level_docs",
2212 description: r##"detects crates with no crate-level documentation"##,
2213 default_severity: Severity::Allow,
2214 warn_since: None,
2215 deny_since: None,
2216 },
2217 Lint {
2218 label: "rustdoc::missing_doc_code_examples",
2219 description: r##"detects publicly-exported items without code samples in their documentation"##,
2220 default_severity: Severity::Allow,
2221 warn_since: None,
2222 deny_since: None,
2223 },
2224 Lint {
2225 label: "rustdoc::private_doc_tests",
2226 description: r##"detects code samples in docs of private items not documented by rustdoc"##,
2227 default_severity: Severity::Allow,
2228 warn_since: None,
2229 deny_since: None,
2230 },
2231 Lint {
2232 label: "rustdoc::private_intra_doc_links",
2233 description: r##"linking from a public item to a private one"##,
2234 default_severity: Severity::Warning,
2235 warn_since: None,
2236 deny_since: None,
2237 },
2238 Lint {
2239 label: "rustdoc::redundant_explicit_links",
2240 description: r##"detects redundant explicit links in doc comments"##,
2241 default_severity: Severity::Warning,
2242 warn_since: None,
2243 deny_since: None,
2244 },
2245 Lint {
2246 label: "rustdoc::unescaped_backticks",
2247 description: r##"detects unescaped backticks in doc comments"##,
2248 default_severity: Severity::Allow,
2249 warn_since: None,
2250 deny_since: None,
2251 },
2252 Lint {
2253 label: "rustdoc::unused_footnote_definition",
2254 description: r##"detects unused footnote definitions"##,
2255 default_severity: Severity::Warning,
2256 warn_since: None,
2257 deny_since: None,
2258 },
2259 Lint {
2260 label: "rustdoc::all",
2261 description: r##"lint group for: rustdoc::broken-intra-doc-links, rustdoc::private-intra-doc-links, rustdoc::private-doc-tests, rustdoc::invalid-codeblock-attributes, rustdoc::invalid-rust-codeblocks, rustdoc::invalid-html-tags, rustdoc::bare-urls, rustdoc::missing-crate-level-docs, rustdoc::unescaped-backticks, rustdoc::redundant-explicit-links, rustdoc::broken-footnote, rustdoc::unused-footnote-definition, rustdoc::invalid-markdown-table"##,
2262 default_severity: Severity::Allow,
2263 warn_since: None,
2264 deny_since: None,
2265 },
2266];
2267
2268pub const RUSTDOC_LINT_GROUPS: &[LintGroup] = &[LintGroup {
2269 lint: Lint {
2270 label: "rustdoc::all",
2271 description: r##"lint group for: rustdoc::broken-intra-doc-links, rustdoc::private-intra-doc-links, rustdoc::private-doc-tests, rustdoc::invalid-codeblock-attributes, rustdoc::invalid-rust-codeblocks, rustdoc::invalid-html-tags, rustdoc::bare-urls, rustdoc::missing-crate-level-docs, rustdoc::unescaped-backticks, rustdoc::redundant-explicit-links, rustdoc::broken-footnote, rustdoc::unused-footnote-definition, rustdoc::invalid-markdown-table"##,
2272 default_severity: Severity::Allow,
2273 warn_since: None,
2274 deny_since: None,
2275 },
2276 children: &[
2277 "rustdoc::broken_intra_doc_links",
2278 "rustdoc::private_intra_doc_links",
2279 "rustdoc::private_doc_tests",
2280 "rustdoc::invalid_codeblock_attributes",
2281 "rustdoc::invalid_rust_codeblocks",
2282 "rustdoc::invalid_html_tags",
2283 "rustdoc::bare_urls",
2284 "rustdoc::missing_crate_level_docs",
2285 "rustdoc::unescaped_backticks",
2286 "rustdoc::redundant_explicit_links",
2287 "rustdoc::broken_footnote",
2288 "rustdoc::unused_footnote_definition",
2289 "rustdoc::invalid_markdown_table",
2290 ],
2291}];
2292
2293pub const FEATURES: &[Lint] = &[
2294 Lint {
2295 label: "aarch64_unstable_target_feature",
2296 description: r##"# `aarch64_unstable_target_feature`
2297
2298The remaining unstable target features on aarch64.
2299
2300The tracking issue for this feature is: [#150244]
2301
2302[#150244]: https://github.com/rust-lang/rust/issues/150244
2303
2304------------------------
2305"##,
2306 default_severity: Severity::Allow,
2307 warn_since: None,
2308 deny_since: None,
2309 },
2310 Lint {
2311 label: "aarch64_ver_target_feature",
2312 description: r##"# `aarch64_ver_target_feature`
2313
2314Instruction set "version" target features on aarch64.
2315
2316The tracking issue for this feature is: [#150245]
2317
2318[#150245]: https://github.com/rust-lang/rust/issues/150245
2319
2320------------------------
2321"##,
2322 default_severity: Severity::Allow,
2323 warn_since: None,
2324 deny_since: None,
2325 },
2326 Lint {
2327 label: "abi_avr_interrupt",
2328 description: r##"# `abi_avr_interrupt`
2329
2330Allows `extern "avr-interrupt" fn()` and `extern "avr-non-blocking-interrupt" fn()`.
2331
2332The tracking issue for this feature is: [#69664]
2333
2334[#69664]: https://github.com/rust-lang/rust/issues/69664
2335
2336------------------------
2337"##,
2338 default_severity: Severity::Allow,
2339 warn_since: None,
2340 deny_since: None,
2341 },
2342 Lint {
2343 label: "abi_cmse_nonsecure_call",
2344 description: r##"# `abi_cmse_nonsecure_call`
2345
2346The tracking issue for this feature is: [#81391]
2347
2348[#81391]: https://github.com/rust-lang/rust/issues/81391
2349
2350------------------------
2351
2352The [TrustZone-M
2353feature](https://developer.arm.com/documentation/100690/latest/) is available
2354for targets with the Armv8-M architecture profile (`thumbv8m` in their target
2355name).
2356LLVM, the Rust compiler and the linker are providing
2357[support](https://developer.arm.com/documentation/ecm0359818/latest/) for the
2358TrustZone-M feature.
2359
2360One of the things provided with this unstable feature is the "cmse-nonsecure-call" function ABI.
2361This ABI is used on function pointers to non-secure code to mark a non-secure function call
2362(see [section 5.5](https://developer.arm.com/documentation/ecm0359818/latest/) for details).
2363
2364With this ABI, the compiler will do the following to perform the call:
2365* save registers needed after the call to Secure memory
2366* clear all registers that might contain confidential information
2367* clear the Least Significant Bit of the function address
2368* branches using the BLXNS instruction
2369
2370To avoid using the non-secure stack, the compiler will constrain the number and
2371type of parameters/return value.
2372
2373<!-- NOTE(ignore) this example is specific to thumbv8m targets -->
2374
2375``` rust,ignore
2376#![no_std]
2377#![feature(abi_cmse_nonsecure_call)]
2378
2379#[no_mangle]
2380pub fn call_nonsecure_function(addr: usize) -> u32 {
2381 let non_secure_function =
2382 unsafe { core::mem::transmute::<usize, extern "cmse-nonsecure-call" fn() -> u32>(addr) };
2383 non_secure_function()
2384}
2385```
2386
2387``` text
2388$ rustc --emit asm --crate-type lib --target thumbv8m.main-none-eabi function.rs
2389
2390call_nonsecure_function:
2391 .fnstart
2392 .save {r7, lr}
2393 push {r7, lr}
2394 .setfp r7, sp
2395 mov r7, sp
2396 .pad #16
2397 sub sp, #16
2398 str r0, [sp, #12]
2399 ldr r0, [sp, #12]
2400 str r0, [sp, #8]
2401 b .LBB0_1
2402.LBB0_1:
2403 ldr r0, [sp, #8]
2404 push.w {r4, r5, r6, r7, r8, r9, r10, r11}
2405 bic r0, r0, #1
2406 mov r1, r0
2407 mov r2, r0
2408 mov r3, r0
2409 mov r4, r0
2410 mov r5, r0
2411 mov r6, r0
2412 mov r7, r0
2413 mov r8, r0
2414 mov r9, r0
2415 mov r10, r0
2416 mov r11, r0
2417 mov r12, r0
2418 msr apsr_nzcvq, r0
2419 blxns r0
2420 pop.w {r4, r5, r6, r7, r8, r9, r10, r11}
2421 str r0, [sp, #4]
2422 b .LBB0_2
2423.LBB0_2:
2424 ldr r0, [sp, #4]
2425 add sp, #16
2426 pop {r7, pc}
2427```
2428"##,
2429 default_severity: Severity::Allow,
2430 warn_since: None,
2431 deny_since: None,
2432 },
2433 Lint {
2434 label: "abi_gpu_kernel",
2435 description: r##"# `abi_gpu_kernel`
2436
2437Allows `extern "gpu-kernel" fn()`.
2438
2439The tracking issue for this feature is: [#135467]
2440
2441[#135467]: https://github.com/rust-lang/rust/issues/135467
2442
2443------------------------
2444"##,
2445 default_severity: Severity::Allow,
2446 warn_since: None,
2447 deny_since: None,
2448 },
2449 Lint {
2450 label: "abi_msp430_interrupt",
2451 description: r##"# `abi_msp430_interrupt`
2452
2453The tracking issue for this feature is: [#38487]
2454
2455[#38487]: https://github.com/rust-lang/rust/issues/38487
2456
2457------------------------
2458
2459In the MSP430 architecture, interrupt handlers have a special calling
2460convention. You can use the `"msp430-interrupt"` ABI to make the compiler apply
2461the right calling convention to the interrupt handlers you define.
2462
2463<!-- NOTE(ignore) this example is specific to the msp430 target -->
2464
2465``` rust,ignore
2466#![feature(abi_msp430_interrupt)]
2467#![no_std]
2468
2469// Place the interrupt handler at the appropriate memory address
2470// (Alternatively, you can use `#[used]` and remove `pub` and `#[no_mangle]`)
2471#[link_section = "__interrupt_vector_10"]
2472#[no_mangle]
2473pub static TIM0_VECTOR: extern "msp430-interrupt" fn() = tim0;
2474
2475// The interrupt handler
2476extern "msp430-interrupt" fn tim0() {
2477 // ..
2478}
2479```
2480
2481``` text
2482$ msp430-elf-objdump -CD ./target/msp430/release/app
2483Disassembly of section __interrupt_vector_10:
2484
24850000fff2 <TIM0_VECTOR>:
2486 fff2: 00 c0 interrupt service routine at 0xc000
2487
2488Disassembly of section .text:
2489
24900000c000 <int::tim0>:
2491 c000: 00 13 reti
2492```
2493"##,
2494 default_severity: Severity::Allow,
2495 warn_since: None,
2496 deny_since: None,
2497 },
2498 Lint {
2499 label: "abi_ptx",
2500 description: r##"# `abi_ptx`
2501
2502The tracking issue for this feature is: [#38788]
2503
2504[#38788]: https://github.com/rust-lang/rust/issues/38788
2505
2506------------------------
2507
2508When emitting PTX code, all vanilla Rust functions (`fn`) get translated to
2509"device" functions. These functions are *not* callable from the host via the
2510CUDA API so a crate with only device functions is not too useful!
2511
2512OTOH, "global" functions *can* be called by the host; you can think of them
2513as the real public API of your crate. To produce a global function use the
2514`"ptx-kernel"` ABI.
2515
2516<!-- NOTE(ignore) this example is specific to the nvptx targets -->
2517
2518``` rust,ignore
2519#![feature(abi_ptx)]
2520#![no_std]
2521
2522pub unsafe extern "ptx-kernel" fn global_function() {
2523 device_function();
2524}
2525
2526pub fn device_function() {
2527 // ..
2528}
2529```
2530
2531``` text
2532$ xargo rustc --target nvptx64-nvidia-cuda --release -- --emit=asm
2533
2534$ cat $(find -name '*.s')
2535//
2536// Generated by LLVM NVPTX Back-End
2537//
2538
2539.version 3.2
2540.target sm_20
2541.address_size 64
2542
2543 // .globl _ZN6kernel15global_function17h46111ebe6516b382E
2544
2545.visible .entry _ZN6kernel15global_function17h46111ebe6516b382E()
2546{
2547
2548
2549 ret;
2550}
2551
2552 // .globl _ZN6kernel15device_function17hd6a0e4993bbf3f78E
2553.visible .func _ZN6kernel15device_function17hd6a0e4993bbf3f78E()
2554{
2555
2556
2557 ret;
2558}
2559```
2560"##,
2561 default_severity: Severity::Allow,
2562 warn_since: None,
2563 deny_since: None,
2564 },
2565 Lint {
2566 label: "abi_riscv_interrupt",
2567 description: r##"# `abi_riscv_interrupt`
2568
2569Allows `extern "riscv-interrupt-m" fn()` and `extern "riscv-interrupt-s" fn()`.
2570
2571The tracking issue for this feature is: [#111889]
2572
2573[#111889]: https://github.com/rust-lang/rust/issues/111889
2574
2575------------------------
2576"##,
2577 default_severity: Severity::Allow,
2578 warn_since: None,
2579 deny_since: None,
2580 },
2581 Lint {
2582 label: "abi_swift",
2583 description: r##"# `abi_swift`
2584
2585Allows `extern "Swift" fn()`.
2586
2587The tracking issue for this feature is: [#156481]
2588
2589[#156481]: https://github.com/rust-lang/rust/issues/156481
2590
2591------------------------
2592"##,
2593 default_severity: Severity::Allow,
2594 warn_since: None,
2595 deny_since: None,
2596 },
2597 Lint {
2598 label: "abi_vectorcall",
2599 description: r##"# `abi_vectorcall`
2600
2601The tracking issue for this feature is: [#124485]
2602
2603[#124485]: https://github.com/rust-lang/rust/issues/124485
2604
2605------------------------
2606
2607Adds support for the Windows `"vectorcall"` ABI, the equivalent of `__vectorcall` in MSVC.
2608
2609```rust,ignore (only-windows-or-x86-or-x86-64)
2610extern "vectorcall" {
2611 fn add_f64s(x: f64, y: f64) -> f64;
2612}
2613
2614fn main() {
2615 println!("{}", add_f64s(2.0, 4.0));
2616}
2617```
2618"##,
2619 default_severity: Severity::Allow,
2620 warn_since: None,
2621 deny_since: None,
2622 },
2623 Lint {
2624 label: "abi_x86_interrupt",
2625 description: r##"# `abi_x86_interrupt`
2626
2627Allows `extern "x86-interrupt" fn()`.
2628
2629The tracking issue for this feature is: [#40180]
2630
2631[#40180]: https://github.com/rust-lang/rust/issues/40180
2632
2633------------------------
2634"##,
2635 default_severity: Severity::Allow,
2636 warn_since: None,
2637 deny_since: None,
2638 },
2639 Lint {
2640 label: "abort_immediate",
2641 description: r##"# `abort_immediate`
2642
2643
2644
2645The tracking issue for this feature is: [#154601]
2646
2647[#154601]: https://github.com/rust-lang/rust/issues/154601
2648
2649------------------------
2650"##,
2651 default_severity: Severity::Allow,
2652 warn_since: None,
2653 deny_since: None,
2654 },
2655 Lint {
2656 label: "abort_unwind",
2657 description: r##"# `abort_unwind`
2658
2659
2660
2661The tracking issue for this feature is: [#130338]
2662
2663[#130338]: https://github.com/rust-lang/rust/issues/130338
2664
2665------------------------
2666"##,
2667 default_severity: Severity::Allow,
2668 warn_since: None,
2669 deny_since: None,
2670 },
2671 Lint {
2672 label: "acceptfilter",
2673 description: r##"# `acceptfilter`
2674
2675
2676
2677The tracking issue for this feature is: [#121891]
2678
2679[#121891]: https://github.com/rust-lang/rust/issues/121891
2680
2681------------------------
2682"##,
2683 default_severity: Severity::Allow,
2684 warn_since: None,
2685 deny_since: None,
2686 },
2687 Lint {
2688 label: "addr_parse_ascii",
2689 description: r##"# `addr_parse_ascii`
2690
2691
2692
2693The tracking issue for this feature is: [#101035]
2694
2695[#101035]: https://github.com/rust-lang/rust/issues/101035
2696
2697------------------------
2698"##,
2699 default_severity: Severity::Allow,
2700 warn_since: None,
2701 deny_since: None,
2702 },
2703 Lint {
2704 label: "addr_unspecified_from",
2705 description: r##"# `addr_unspecified_from`
2706
2707
2708
2709The tracking issue for this feature is: [#158975]
2710
2711[#158975]: https://github.com/rust-lang/rust/issues/158975
2712
2713------------------------
2714"##,
2715 default_severity: Severity::Allow,
2716 warn_since: None,
2717 deny_since: None,
2718 },
2719 Lint {
2720 label: "adt_const_params",
2721 description: r##"# `adt_const_params`
2722
2723The tracking issue for this feature is: [#95174]
2724
2725[#95174]: https://github.com/rust-lang/rust/issues/95174
2726
2727------------------------
2728
2729Allows for using more complex types for const parameters, such as structs or enums.
2730
2731```rust
2732#![feature(adt_const_params)]
2733#![allow(incomplete_features)]
2734
2735use std::marker::ConstParamTy;
2736
2737#[derive(ConstParamTy, PartialEq, Eq)]
2738enum Foo {
2739 A,
2740 B,
2741 C,
2742}
2743
2744#[derive(ConstParamTy, PartialEq, Eq)]
2745struct Bar {
2746 flag: bool,
2747}
2748
2749fn is_foo_a_and_bar_true<const F: Foo, const B: Bar>() -> bool {
2750 match (F, B.flag) {
2751 (Foo::A, true) => true,
2752 _ => false,
2753 }
2754}
2755```
2756"##,
2757 default_severity: Severity::Allow,
2758 warn_since: None,
2759 deny_since: None,
2760 },
2761 Lint {
2762 label: "align_to_uninit_mut",
2763 description: r##"# `align_to_uninit_mut`
2764
2765
2766
2767The tracking issue for this feature is: [#139062]
2768
2769[#139062]: https://github.com/rust-lang/rust/issues/139062
2770
2771------------------------
2772"##,
2773 default_severity: Severity::Allow,
2774 warn_since: None,
2775 deny_since: None,
2776 },
2777 Lint {
2778 label: "alloc_error_handler",
2779 description: r##"# `alloc_error_handler`
2780
2781Allows defining an `#[alloc_error_handler]`.
2782
2783The tracking issue for this feature is: [#51540]
2784
2785[#51540]: https://github.com/rust-lang/rust/issues/51540
2786
2787------------------------
2788"##,
2789 default_severity: Severity::Allow,
2790 warn_since: None,
2791 deny_since: None,
2792 },
2793 Lint {
2794 label: "alloc_error_hook",
2795 description: r##"# `alloc_error_hook`
2796
2797
2798
2799The tracking issue for this feature is: [#51245]
2800
2801[#51245]: https://github.com/rust-lang/rust/issues/51245
2802
2803------------------------
2804"##,
2805 default_severity: Severity::Allow,
2806 warn_since: None,
2807 deny_since: None,
2808 },
2809 Lint {
2810 label: "alloc_internals",
2811 description: r##"# `alloc_internals`
2812
2813
2814
2815This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
2816
2817------------------------
2818"##,
2819 default_severity: Severity::Allow,
2820 warn_since: None,
2821 deny_since: None,
2822 },
2823 Lint {
2824 label: "alloc_io",
2825 description: r##"# `alloc_io`
2826
2827
2828
2829The tracking issue for this feature is: [#154046]
2830
2831[#154046]: https://github.com/rust-lang/rust/issues/154046
2832
2833------------------------
2834"##,
2835 default_severity: Severity::Allow,
2836 warn_since: None,
2837 deny_since: None,
2838 },
2839 Lint {
2840 label: "alloc_slice_into_array",
2841 description: r##"# `alloc_slice_into_array`
2842
2843
2844
2845The tracking issue for this feature is: [#148082]
2846
2847[#148082]: https://github.com/rust-lang/rust/issues/148082
2848
2849------------------------
2850"##,
2851 default_severity: Severity::Allow,
2852 warn_since: None,
2853 deny_since: None,
2854 },
2855 Lint {
2856 label: "allocator_ext",
2857 description: r##"# `allocator_ext`
2858
2859The tracking issue for this feature is: [#163177]
2860
2861[#163177]: https://github.com/rust-lang/rust/issues/163177
2862
2863------------------------
2864
2865Sometimes you want the memory for one collection to use a different
2866allocator than the memory for another collection. In this case,
2867replacing the global allocator is not a workable option. Instead,
2868you need to pass in an instance of an `AllocRef` to each collection
2869for which you want a custom allocator.
2870
2871TBD
2872"##,
2873 default_severity: Severity::Allow,
2874 warn_since: None,
2875 deny_since: None,
2876 },
2877 Lint {
2878 label: "allocator_internals",
2879 description: r##"# `allocator_internals`
2880
2881This feature does not have a tracking issue, it is an unstable implementation
2882detail of the `global_allocator` feature not intended for use outside the
2883compiler.
2884
2885------------------------
2886"##,
2887 default_severity: Severity::Allow,
2888 warn_since: None,
2889 deny_since: None,
2890 },
2891 Lint {
2892 label: "alloctests",
2893 description: r##"# `alloctests`
2894
2895
2896
2897This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
2898
2899------------------------
2900"##,
2901 default_severity: Severity::Allow,
2902 warn_since: None,
2903 deny_since: None,
2904 },
2905 Lint {
2906 label: "allow_internal_unsafe",
2907 description: r##"# `allow_internal_unsafe`
2908
2909Allows using `#[allow_internal_unsafe]`. This is an attribute on `macro_rules!` and can't use the attribute handling below (it has to be checked before expansion possibly makes macros disappear).
2910
2911This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
2912
2913------------------------
2914"##,
2915 default_severity: Severity::Allow,
2916 warn_since: None,
2917 deny_since: None,
2918 },
2919 Lint {
2920 label: "allow_internal_unstable",
2921 description: r##"# `allow_internal_unstable`
2922
2923Allows using `#[allow_internal_unstable]`. This is an attribute on `macro_rules!` and can't use the attribute handling below (it has to be checked before expansion possibly makes macros disappear).
2924
2925This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
2926
2927------------------------
2928"##,
2929 default_severity: Severity::Allow,
2930 warn_since: None,
2931 deny_since: None,
2932 },
2933 Lint {
2934 label: "anonymous_lifetime_in_impl_trait",
2935 description: r##"# `anonymous_lifetime_in_impl_trait`
2936
2937Allows using anonymous lifetimes in argument-position impl-trait.
2938
2939This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
2940
2941------------------------
2942"##,
2943 default_severity: Severity::Allow,
2944 warn_since: None,
2945 deny_since: None,
2946 },
2947 Lint {
2948 label: "apx_target_feature",
2949 description: r##"# `apx_target_feature`
2950
2951The `apxf` target feature on x86
2952
2953The tracking issue for this feature is: [#139284]
2954
2955[#139284]: https://github.com/rust-lang/rust/issues/139284
2956
2957------------------------
2958"##,
2959 default_severity: Severity::Allow,
2960 warn_since: None,
2961 deny_since: None,
2962 },
2963 Lint {
2964 label: "arbitrary_self_types",
2965 description: r##"# `arbitrary_self_types`
2966
2967The tracking issue for this feature is: [#44874]
2968
2969[#44874]: https://github.com/rust-lang/rust/issues/44874
2970
2971------------------------
2972
2973Allows any type implementing `core::ops::Receiver<Target=T>` to be used as the type
2974of `self` in a method belonging to `T`.
2975
2976For example,
2977
2978```rust
2979#![feature(arbitrary_self_types)]
2980
2981struct A;
2982
2983impl A {
2984 fn f(self: SmartPtr<Self>) -> i32 { 1 } // note self type
2985}
2986
2987struct SmartPtr<T>(T);
2988
2989impl<T> core::ops::Receiver for SmartPtr<T> {
2990 type Target = T;
2991}
2992
2993fn main() {
2994 let smart_ptr = SmartPtr(A);
2995 assert_eq!(smart_ptr.f(), 1);
2996}
2997```
2998
2999The `Receiver` trait has a blanket implementation for all `T: Deref`, so in fact
3000things like this work too:
3001
3002```rust
3003#![feature(arbitrary_self_types)]
3004
3005use std::rc::Rc;
3006
3007struct A;
3008
3009impl A {
3010 fn f(self: Rc<Self>) -> i32 { 1 } // Rc implements Deref
3011}
3012
3013fn main() {
3014 let smart_ptr = Rc::new(A);
3015 assert_eq!(smart_ptr.f(), 1);
3016}
3017```
3018
3019Interestingly, that works even without the `arbitrary_self_types` feature
3020- but that's because certain types are _effectively_ hard coded, including
3021`Rc`. ("Hard coding" isn't quite true; they use a lang-item called
3022`LegacyReceiver` to denote their special-ness in this way). With the
3023`arbitrary_self_types` feature, their special-ness goes away, and custom
3024smart pointers can achieve the same.
3025
3026## Changes to method lookup
3027
3028Method lookup previously used to work by stepping through the `Deref`
3029chain then using the resulting list of steps in two different ways:
3030
3031* To identify types that might contribute methods via their `impl`
3032 blocks (inherent methods) or via traits
3033* To identify the types that the method receiver (`a` in the above
3034 examples) can be converted to.
3035
3036With this feature, these lists are created by instead stepping through
3037the `Receiver` chain. However, a note is kept about whether the type
3038can be reached also via the `Deref` chain.
3039
3040The full chain (via `Receiver` hops) is used for the first purpose
3041(identifying relevant `impl` blocks and traits); whereas the shorter
3042list (reachable via `Deref`) is used for the second purpose. That's
3043because, to convert the method target (`a` in `a.b()`) to the self
3044type, Rust may need to be able to use `Deref::deref`. Type conversions,
3045then, can only proceed as far as the end of the `Deref` chain whereas
3046the longer `Receiver` chain can be used to explore more places where
3047useful methods might reside.
3048
3049## Types suitable for use as smart pointers
3050
3051This feature allows the creation of customised smart pointers - for example
3052your own equivalent to `Rc` or `Box` with whatever capabilities you like.
3053Those smart pointers can either implement `Deref` (if it's safe to
3054create a reference to the referent) or `Receiver` (if it isn't).
3055
3056Either way, smart pointer types should mostly _avoid having methods_.
3057Calling methods on a smart pointer leads to ambiguity about whether you're
3058aiming for a method on the pointer, or on the referent.
3059
3060Best practice is therefore to put smart pointer functionality into
3061associated functions instead - that's what's done in all the smart pointer
3062types within Rust's standard library which implement `Receiver`.
3063
3064If you choose to add any methods to your smart pointer type, your users
3065may run into errors from deshadowing, as described in the next section.
3066
3067## Avoiding shadowing
3068
3069With or without this feature, Rust emits an error if it finds two method
3070candidates, like this:
3071
3072```rust,compile_fail
3073use std::pin::Pin;
3074use std::pin::pin;
3075
3076struct A;
3077
3078impl A {
3079 fn get_ref(self: Pin<&A>) {}
3080}
3081
3082fn main() {
3083 let pinned_a: Pin<&A> = pin!(A).as_ref();
3084 let pinned_a: Pin<&A> = pinned_a.as_ref();
3085 pinned_a.get_ref(); // error[E0034]: multiple applicable items in scope
3086}
3087```
3088
3089(this is why Rust's smart pointers are mostly carefully designed to avoid
3090having methods at all, and shouldn't add new methods in future.)
3091
3092With `arbitrary_self_types`, we take care to spot some other kinds of
3093conflict:
3094
3095```rust,compile_fail
3096#![feature(arbitrary_self_types)]
3097
3098use std::pin::Pin;
3099use std::pin::pin;
3100
3101struct A;
3102
3103impl A {
3104 fn get_ref(self: &Pin<&A>) {} // note &Pin
3105}
3106
3107fn main() {
3108 let pinned_a: Pin<&mut A> = pin!(A);
3109 let pinned_a: Pin<&A> = pinned_a.as_ref();
3110 pinned_a.get_ref();
3111}
3112```
3113
3114This is to guard against the case where an inner (referent) type has a
3115method of a given name, taking the smart pointer by reference, and then
3116the smart pointer implementer adds a similar method taking self by value.
3117As noted in the previous section, the safe option is simply
3118not to add methods to smart pointers, and then these errors can't occur.
3119"##,
3120 default_severity: Severity::Allow,
3121 warn_since: None,
3122 deny_since: None,
3123 },
3124 Lint {
3125 label: "arbitrary_self_types_pointers",
3126 description: r##"# `arbitrary_self_types_pointers`
3127
3128The tracking issue for this feature is: [#44874]
3129
3130[#38788]: https://github.com/rust-lang/rust/issues/44874
3131
3132------------------------
3133
3134This extends the [arbitrary self types] feature to allow methods to
3135receive `self` by pointer. For example:
3136
3137```rust
3138#![feature(arbitrary_self_types_pointers)]
3139
3140struct A;
3141
3142impl A {
3143 fn m(self: *const Self) {}
3144}
3145
3146fn main() {
3147 let a = A;
3148 let a_ptr: *const A = &a as *const A;
3149 a_ptr.m();
3150}
3151```
3152
3153In general this is not advised: it's thought to be better practice to wrap
3154raw pointers in a newtype wrapper which implements the `core::ops::Receiver`
3155trait, then you need "only" the `arbitrary_self_types` feature. For example:
3156
3157```rust
3158#![feature(arbitrary_self_types)]
3159#![allow(dead_code)]
3160
3161struct A;
3162
3163impl A {
3164 fn m(self: Wrapper<Self>) {} // can extract the pointer and do
3165 // what it needs
3166}
3167
3168struct Wrapper<T>(*const T);
3169
3170impl<T> core::ops::Receiver for Wrapper<T> {
3171 type Target = T;
3172}
3173
3174fn main() {
3175 let a = A;
3176 let a_ptr: *const A = &a as *const A;
3177 let a_wrapper = Wrapper(a_ptr);
3178 a_wrapper.m();
3179}
3180```
3181
3182[arbitrary self types]: arbitrary-self-types.md
3183"##,
3184 default_severity: Severity::Allow,
3185 warn_since: None,
3186 deny_since: None,
3187 },
3188 Lint {
3189 label: "arc_raw_get_strong",
3190 description: r##"# `arc_raw_get_strong`
3191
3192
3193
3194The tracking issue for this feature is: [#157021]
3195
3196[#157021]: https://github.com/rust-lang/rust/issues/157021
3197
3198------------------------
3199"##,
3200 default_severity: Severity::Allow,
3201 warn_since: None,
3202 deny_since: None,
3203 },
3204 Lint {
3205 label: "arm_target_feature",
3206 description: r##"# `arm_target_feature`
3207
3208Target features on arm.
3209
3210The tracking issue for this feature is: [#150246]
3211
3212[#150246]: https://github.com/rust-lang/rust/issues/150246
3213
3214------------------------
3215"##,
3216 default_severity: Severity::Allow,
3217 warn_since: None,
3218 deny_since: None,
3219 },
3220 Lint {
3221 label: "array_into_iter_constructors",
3222 description: r##"# `array_into_iter_constructors`
3223
3224
3225
3226The tracking issue for this feature is: [#91583]
3227
3228[#91583]: https://github.com/rust-lang/rust/issues/91583
3229
3230------------------------
3231"##,
3232 default_severity: Severity::Allow,
3233 warn_since: None,
3234 deny_since: None,
3235 },
3236 Lint {
3237 label: "array_ptr_get",
3238 description: r##"# `array_ptr_get`
3239
3240
3241
3242The tracking issue for this feature is: [#119834]
3243
3244[#119834]: https://github.com/rust-lang/rust/issues/119834
3245
3246------------------------
3247"##,
3248 default_severity: Severity::Allow,
3249 warn_since: None,
3250 deny_since: None,
3251 },
3252 Lint {
3253 label: "array_try_from_fn",
3254 description: r##"# `array_try_from_fn`
3255
3256
3257
3258The tracking issue for this feature is: [#89379]
3259
3260[#89379]: https://github.com/rust-lang/rust/issues/89379
3261
3262------------------------
3263"##,
3264 default_severity: Severity::Allow,
3265 warn_since: None,
3266 deny_since: None,
3267 },
3268 Lint {
3269 label: "array_try_map",
3270 description: r##"# `array_try_map`
3271
3272
3273
3274The tracking issue for this feature is: [#79711]
3275
3276[#79711]: https://github.com/rust-lang/rust/issues/79711
3277
3278------------------------
3279"##,
3280 default_severity: Severity::Allow,
3281 warn_since: None,
3282 deny_since: None,
3283 },
3284 Lint {
3285 label: "ascii_char",
3286 description: r##"# `ascii_char`
3287
3288
3289
3290The tracking issue for this feature is: [#110998]
3291
3292[#110998]: https://github.com/rust-lang/rust/issues/110998
3293
3294------------------------
3295"##,
3296 default_severity: Severity::Allow,
3297 warn_since: None,
3298 deny_since: None,
3299 },
3300 Lint {
3301 label: "ascii_char_variants",
3302 description: r##"# `ascii_char_variants`
3303
3304
3305
3306The tracking issue for this feature is: [#110998]
3307
3308[#110998]: https://github.com/rust-lang/rust/issues/110998
3309
3310------------------------
3311"##,
3312 default_severity: Severity::Allow,
3313 warn_since: None,
3314 deny_since: None,
3315 },
3316 Lint {
3317 label: "asm_const_ptr",
3318 description: r##"# `asm_const_ptr`
3319
3320Allows using `const` operands with pointer in inline assembly.
3321
3322The tracking issue for this feature is: [#128464]
3323
3324[#128464]: https://github.com/rust-lang/rust/issues/128464
3325
3326------------------------
3327"##,
3328 default_severity: Severity::Allow,
3329 warn_since: None,
3330 deny_since: None,
3331 },
3332 Lint {
3333 label: "asm_experimental_arch",
3334 description: r##"# `asm_experimental_arch`
3335
3336The tracking issue for this feature is: [#93335]
3337
3338[#93335]: https://github.com/rust-lang/rust/issues/93335
3339
3340------------------------
3341
3342This feature tracks `asm!` and `global_asm!` support for the following architectures:
3343- NVPTX
3344- Hexagon
3345- MIPS32r2 and MIPS64r2
3346- wasm32
3347- BPF
3348- SPIR-V
3349- AVR
3350- MSP430
3351- M68k
3352- CSKY
3353- SPARC
3354- Xtensa
3355
3356## Register classes
3357
3358| Architecture | Register class | Registers | LLVM constraint code |
3359| ------------ | -------------- | ---------------------------------- | -------------------- |
3360| MIPS | `reg` | `$[2-25]` | `r` |
3361| MIPS | `freg` | `$f[0-31]` | `f` |
3362| NVPTX | `reg16` | None\* | `h` |
3363| NVPTX | `reg32` | None\* | `r` |
3364| NVPTX | `reg64` | None\* | `l` |
3365| Hexagon | `reg` | `r[0-28]` | `r` |
3366| Hexagon | `preg` | `p[0-3]` | Only clobbers |
3367| wasm32 | `local` | None\* | `r` |
3368| BPF | `reg` | `r[0-10]` | `r` |
3369| BPF | `wreg` | `w[0-10]` | `w` |
3370| AVR | `reg` | `r[2-25]`, `XH`, `XL`, `ZH`, `ZL` | `r` |
3371| AVR | `reg_upper` | `r[16-25]`, `XH`, `XL`, `ZH`, `ZL` | `d` |
3372| AVR | `reg_pair` | `r3r2` .. `r25r24`, `X`, `Z` | `r` |
3373| AVR | `reg_iw` | `r25r24`, `X`, `Z` | `w` |
3374| AVR | `reg_ptr` | `X`, `Z` | `e` |
3375| MSP430 | `reg` | `r[0-15]` | `r` |
3376| M68k | `reg` | `d[0-7]`, `a[0-7]` | `r` |
3377| M68k | `reg_data` | `d[0-7]` | `d` |
3378| M68k | `reg_addr` | `a[0-3]` | `a` |
3379| CSKY | `reg` | `r[0-31]` | `r` |
3380| CSKY | `freg` | `f[0-31]` | `f` |
3381| SPARC | `reg` | `r[2-29]` | `r` |
3382| SPARC | `yreg` | `y` | Only clobbers |
3383| Xtensa | `reg` | `a[2-15]` | `r` |
3384| Xtensa | `freg` | `f[0-15]` | `f` |
3385| Xtensa | `sreg` | `sar`, `scompare1`, `lbeg`, `lend`, `lcount`, `acclo`, `acchi`, `m[0-3]` | Only clobbers |
3386| Xtensa | `breg` | `b[0-15]` | Only clobbers |
3387
3388> **Notes**:
3389> - NVPTX doesn't have a fixed register set, so named registers are not supported.
3390>
3391> - WebAssembly doesn't have registers, so named registers are not supported.
3392
3393# Register class supported types
3394
3395| Architecture | Register class | Target feature | Allowed types |
3396| ------------ | ------------------------------- | -------------- | --------------------------------------- |
3397| MIPS32 | `reg` | None | `i8`, `i16`, `i32`, `f32` |
3398| MIPS32 | `freg` | None | `f32`, `f64` |
3399| MIPS64 | `reg` | None | `i8`, `i16`, `i32`, `i64`, `f32`, `f64` |
3400| MIPS64 | `freg` | None | `f32`, `f64` |
3401| NVPTX | `reg16` | None | `i8`, `i16` |
3402| NVPTX | `reg32` | None | `i8`, `i16`, `i32`, `f32` |
3403| NVPTX | `reg64` | None | `i8`, `i16`, `i32`, `f32`, `i64`, `f64` |
3404| Hexagon | `reg` | None | `i8`, `i16`, `i32`, `f32` |
3405| Hexagon | `preg` | N/A | Only clobbers |
3406| wasm32 | `local` | None | `i8` `i16` `i32` `i64` `f32` `f64` |
3407| BPF | `reg` | None | `i8` `i16` `i32` `i64` |
3408| BPF | `wreg` | `alu32` | `i8` `i16` `i32` |
3409| AVR | `reg`, `reg_upper` | None | `i8` |
3410| AVR | `reg_pair`, `reg_iw`, `reg_ptr` | None | `i16` |
3411| MSP430 | `reg` | None | `i8`, `i16` |
3412| M68k | `reg`, `reg_addr` | None | `i16`, `i32` |
3413| M68k | `reg_data` | None | `i8`, `i16`, `i32` |
3414| CSKY | `reg` | None | `i8`, `i16`, `i32` |
3415| CSKY | `freg` | None | `f32`, |
3416| SPARC | `reg` | None | `i8`, `i16`, `i32`, `i64` (SPARC64 only) |
3417| SPARC | `yreg` | N/A | Only clobbers |
3418| Xtensa | `reg` | None | `i8`, `i16`, `i32` |
3419| Xtensa | `freg` | `fp` | `f32` |
3420| Xtensa | `sreg` | N/A | Only clobbers |
3421| Xtensa | `breg` | `bool` | Only clobbers |
3422
3423## Register aliases
3424
3425| Architecture | Base register | Aliases |
3426| ------------ | ------------- | --------- |
3427| Hexagon | `r29` | `sp` |
3428| Hexagon | `r30` | `fr` |
3429| Hexagon | `r31` | `lr` |
3430| BPF | `r[0-10]` | `w[0-10]` |
3431| AVR | `XH` | `r27` |
3432| AVR | `XL` | `r26` |
3433| AVR | `ZH` | `r31` |
3434| AVR | `ZL` | `r30` |
3435| MSP430 | `r0` | `pc` |
3436| MSP430 | `r1` | `sp` |
3437| MSP430 | `r2` | `sr` |
3438| MSP430 | `r3` | `cg` |
3439| MSP430 | `r4` | `fp` |
3440| M68k | `a5` | `bp` |
3441| M68k | `a6` | `fp` |
3442| M68k | `a7` | `sp`, `usp`, `ssp`, `isp` |
3443| CSKY | `r[0-3]` | `a[0-3]` |
3444| CSKY | `r[4-11]` | `l[0-7]` |
3445| CSKY | `r[12-13]` | `t[0-1]` |
3446| CSKY | `r14` | `sp` |
3447| CSKY | `r15` | `lr` |
3448| CSKY | `r[16-17]` | `l[8-9]` |
3449| CSKY | `r[18-25]` | `t[2-9]` |
3450| CSKY | `r28` | `rgb` |
3451| CSKY | `r29` | `rtb` |
3452| CSKY | `r30` | `svbr` |
3453| CSKY | `r31` | `tls` |
3454| SPARC | `r[0-7]` | `g[0-7]` |
3455| SPARC | `r[8-15]` | `o[0-7]` |
3456| SPARC | `r[16-23]` | `l[0-7]` |
3457| SPARC | `r[24-31]` | `i[0-7]` |
3458| Xtensa | `a1` | `sp` |
3459
3460> **Notes**:
3461> - TI does not mandate a frame pointer for MSP430, but toolchains are allowed
3462 to use one; LLVM uses `r4`.
3463
3464## Unsupported registers
3465
3466| Architecture | Unsupported register | Reason |
3467| ------------ | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3468| All | `sp`, `r14`/`o6` (SPARC) | The stack pointer must be restored to its original value at the end of an asm code block. |
3469| All | `fr` (Hexagon) `$fp` (MIPS), `Y` (AVR), `r4` (MSP430), `a6` (M68k), `r30`/`i6` (SPARC) | The frame pointer cannot be used as an input or output. |
3470| All | `r19` (Hexagon) | These are used internally by LLVM as "base pointer" for functions with complex stack frames. |
3471| MIPS | `$0` or `$zero` | This is a constant zero register which can't be modified. |
3472| MIPS | `$1` or `$at` | Reserved for assembler. |
3473| MIPS | `$26`/`$k0`, `$27`/`$k1` | OS-reserved registers. |
3474| MIPS | `$28`/`$gp` | Global pointer cannot be used as inputs or outputs. |
3475| MIPS | `$ra` | Return address cannot be used as inputs or outputs. |
3476| Hexagon | `lr` | This is the link register which cannot be used as an input or output. |
3477| AVR | `r0`, `r1`, `r1r0` | Due to an issue in LLVM, the `r0` and `r1` registers cannot be used as inputs or outputs. If modified, they must be restored to their original values before the end of the block. |
3478|MSP430 | `r0`, `r2`, `r3` | These are the program counter, status register, and constant generator respectively. Neither the status register nor constant generator can be written to. |
3479| M68k | `a4`, `a5` | Used internally by LLVM for the base pointer and global base pointer. |
3480| CSKY | `r7`, `r28` | Used internally by LLVM for the base pointer and global base pointer. |
3481| CSKY | `r8` | Used internally by LLVM for the frame pointer. |
3482| CSKY | `r14` | Used internally by LLVM for the stack pointer. |
3483| CSKY | `r15` | This is the link register. |
3484| CSKY | `r[26-30]` | Reserved by its ABI. |
3485| CSKY | `r31` | This is the TLS register. |
3486| SPARC | `r0`/`g0` | This is always zero and cannot be used as inputs or outputs. |
3487| SPARC | `r1`/`g1` | Used internally by LLVM. |
3488| SPARC | `r5`/`g5` | Reserved for system. (SPARC32 only) |
3489| SPARC | `r6`/`g6`, `r7`/`g7` | Reserved for system. |
3490| SPARC | `r31`/`i7` | Return address cannot be used as inputs or outputs. |
3491| Xtensa | `a0` | This is the return address register and is used internally by LLVM. |
3492| Xtensa | `a1`/`sp` | This is the stack pointer and is used internally by LLVM. |
3493| Xtensa | `a7` (windowed ABI) / `a15` (call0 ABI) | The frame pointer cannot be used as an input or output. |
3494
3495
3496## Template modifiers
3497
3498| Architecture | Register class | Modifier | Example output | LLVM modifier |
3499| ------------ | -------------- | -------- | -------------- | ------------- |
3500| MIPS | `reg` | None | `$2` | None |
3501| MIPS | `freg` | None | `$f0` | None |
3502| NVPTX | `reg16` | None | `rs0` | None |
3503| NVPTX | `reg32` | None | `r0` | None |
3504| NVPTX | `reg64` | None | `rd0` | None |
3505| Hexagon | `reg` | None | `r0` | None |
3506| SPARC | `reg` | None | `%o0` | None |
3507| CSKY | `reg` | None | `r0` | None |
3508| CSKY | `freg` | None | `f0` | None |
3509| Xtensa | `reg` | None | `a2` | None |
3510| Xtensa | `freg` | None | `f0` | None |
3511
3512# Flags covered by `preserves_flags`
3513
3514These flags registers must be restored upon exiting the asm block if the `preserves_flags` option is set:
3515- AVR
3516 - The status register `SREG`.
3517- MSP430
3518 - The status register `r2`.
3519- M68k
3520 - The condition code register `ccr`.
3521- SPARC
3522 - Integer condition codes (`icc` and `xcc`)
3523 - Floating-point condition codes (`fcc[0-3]`)
3524- CSKY
3525 - Condition/carry bit (C) in `PSR`.
3526"##,
3527 default_severity: Severity::Allow,
3528 warn_since: None,
3529 deny_since: None,
3530 },
3531 Lint {
3532 label: "asm_experimental_reg",
3533 description: r##"# `asm_experimental_reg`
3534
3535The tracking issue for this feature is: [#133416]
3536
3537[#133416]: https://github.com/rust-lang/rust/issues/133416
3538
3539------------------------
3540
3541This tracks support for additional registers in architectures where inline assembly is already stable.
3542
3543## Register classes
3544
3545| Architecture | Register class | Registers | LLVM constraint code |
3546| ------------ | -------------- | --------- | -------------------- |
3547| LoongArch | `vreg` | `$vr[0-31]` | `f` |
3548| LoongArch | `xreg` | `$xr[0-31]` | `f` |
3549| AArch64 | `preg` | `p[0-16]` | `Upa` |
3550
3551## Register class supported types
3552
3553| Architecture | Register class | Target feature | Allowed types |
3554| ------------ | -------------- | -------------- | ------------- |
3555| LoongArch | `vreg` | `lsx` | `i128`, `f32`, `f64`, <br> `i8x16`, `i16x8`, `i32x4`, `i64x2`, `f32x4`, `f64x2` |
3556| LoongArch | `xreg` | `lasx` | `i128`, `f32`, `f64`, <br> `i8x16`, `i16x8`, `i32x4`, `i64x2`, `f32x4`, `f64x2`, <br> `i8x32`, `i16x16`, `i32x8`, `i64x4`, `f32x8`, `f64x4` |
3557| AArch64 | `vreg` | `sve` | `i8xN`, `i16xB`, `i32xN`, `i64xN`, `f16xN`, `f32xN`, `f64xN` (scalable vector) |
3558| AArch64 | `preg` | `sve` | `i1xN` (scalable vector predicate) |
3559
3560## Register aliases
3561
3562| Architecture | Base register | Aliases |
3563| ------------ | ------------- | ------- |
3564| LoongArch | `$f[0-7]` | `$fa[0-7]`, `$vr[0-7]`, `$xr[0-7]` |
3565| LoongArch | `$f[8-23]` | `$ft[0-15]`, `$vr[8-23]`, `$xr[8-23]` |
3566| LoongArch | `$f[24-31]` | `$fs[0-7]`, `$vr[24-31]`, `$xr[24-31]` |
3567
3568## Unsupported registers
3569
3570| Architecture | Unsupported register | Reason |
3571| ------------ | -------------------- | ------ |
3572
3573## Template modifiers
3574
3575| Architecture | Register class | Modifier | Example output | LLVM modifier |
3576| ------------ | -------------- | -------- | -------------- | ------------- |
3577| LoongArch | `freg` | `w` | `$vr0` | `w` |
3578| LoongArch | `freg` | `u` | `$xr0` | `u` |
3579| LoongArch | `vreg` | None | `$vr0` | `w` |
3580| LoongArch | `vreg` | `u` | `$xr0` | `u` |
3581| LoongArch | `xreg` | None | `$xr0` | `u` |
3582| LoongArch | `xreg` | `w` | `$vr0` | `w` |
3583| AArch64 | `vreg` | `z` | `z0` | `z` |
3584"##,
3585 default_severity: Severity::Allow,
3586 warn_since: None,
3587 deny_since: None,
3588 },
3589 Lint {
3590 label: "asm_goto_with_outputs",
3591 description: r##"# `asm_goto_with_outputs`
3592
3593The tracking issue for this feature is: [#119364]
3594
3595[#119364]: https://github.com/rust-lang/rust/issues/119364
3596
3597------------------------
3598
3599This feature allows label operands to be used together with output operands.
3600
3601Example:
3602```rust,ignore (partial-example, x86-only)
3603
3604unsafe {
3605 let a: usize;
3606 asm!(
3607 "mov {}, 1"
3608 "jmp {}",
3609 out(reg) a,
3610 label {
3611 println!("Jumped from asm {}!", a);
3612 }
3613 );
3614}
3615```
3616
3617The output operands are assigned before the label blocks are executed.
3618"##,
3619 default_severity: Severity::Allow,
3620 warn_since: None,
3621 deny_since: None,
3622 },
3623 Lint {
3624 label: "asm_unwind",
3625 description: r##"# `asm_unwind`
3626
3627The tracking issue for this feature is: [#93334]
3628
3629[#93334]: https://github.com/rust-lang/rust/issues/93334
3630
3631------------------------
3632
3633This feature adds a `may_unwind` option to `asm!` which allows an `asm` block to unwind stack and be part of the stack unwinding process. This option is only supported by the LLVM backend right now.
3634"##,
3635 default_severity: Severity::Allow,
3636 warn_since: None,
3637 deny_since: None,
3638 },
3639 Lint {
3640 label: "associated_type_defaults",
3641 description: r##"# `associated_type_defaults`
3642
3643Allows associated type defaults.
3644
3645The tracking issue for this feature is: [#29661]
3646
3647[#29661]: https://github.com/rust-lang/rust/issues/29661
3648
3649------------------------
3650"##,
3651 default_severity: Severity::Allow,
3652 warn_since: None,
3653 deny_since: None,
3654 },
3655 Lint {
3656 label: "async_drop",
3657 description: r##"# `async_drop`
3658
3659Allows implementing `AsyncDrop`.
3660
3661The tracking issue for this feature is: [#126482]
3662
3663[#126482]: https://github.com/rust-lang/rust/issues/126482
3664
3665------------------------
3666"##,
3667 default_severity: Severity::Allow,
3668 warn_since: None,
3669 deny_since: None,
3670 },
3671 Lint {
3672 label: "async_fn_in_dyn_trait",
3673 description: r##"# `async_fn_in_dyn_trait`
3674
3675Allows async functions to be called from `dyn Trait`.
3676
3677The tracking issue for this feature is: [#133119]
3678
3679[#133119]: https://github.com/rust-lang/rust/issues/133119
3680
3681------------------------
3682"##,
3683 default_severity: Severity::Allow,
3684 warn_since: None,
3685 deny_since: None,
3686 },
3687 Lint {
3688 label: "async_fn_track_caller",
3689 description: r##"# `async_fn_track_caller`
3690
3691Allows `#[track_caller]` on async functions.
3692
3693The tracking issue for this feature is: [#110011]
3694
3695[#110011]: https://github.com/rust-lang/rust/issues/110011
3696
3697------------------------
3698"##,
3699 default_severity: Severity::Allow,
3700 warn_since: None,
3701 deny_since: None,
3702 },
3703 Lint {
3704 label: "async_fn_traits",
3705 description: r##"# `async_fn_traits`
3706
3707See Also: [`fn_traits`](../library-features/fn-traits.md)
3708
3709----
3710
3711The `async_fn_traits` feature allows for implementation of the [`AsyncFn*`] traits
3712for creating custom closure-like types that return futures.
3713
3714[`AsyncFn*`]: ../../std/ops/trait.AsyncFn.html
3715
3716The main difference to the `Fn*` family of traits is that `AsyncFn` can return a future
3717that borrows from itself (`FnOnce::Output` has no lifetime parameters, while `AsyncFnMut::CallRefFuture` does).
3718"##,
3719 default_severity: Severity::Allow,
3720 warn_since: None,
3721 deny_since: None,
3722 },
3723 Lint {
3724 label: "async_for_loop",
3725 description: r##"# `async_for_loop`
3726
3727Allows `for await` loops.
3728
3729The tracking issue for this feature is: [#118898]
3730
3731[#118898]: https://github.com/rust-lang/rust/issues/118898
3732
3733------------------------
3734"##,
3735 default_severity: Severity::Allow,
3736 warn_since: None,
3737 deny_since: None,
3738 },
3739 Lint {
3740 label: "async_gen_internals",
3741 description: r##"# `async_gen_internals`
3742
3743
3744
3745This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
3746
3747------------------------
3748"##,
3749 default_severity: Severity::Allow,
3750 warn_since: None,
3751 deny_since: None,
3752 },
3753 Lint {
3754 label: "async_iter_from_iter",
3755 description: r##"# `async_iter_from_iter`
3756
3757
3758
3759The tracking issue for this feature is: [#81798]
3760
3761[#81798]: https://github.com/rust-lang/rust/issues/81798
3762
3763------------------------
3764"##,
3765 default_severity: Severity::Allow,
3766 warn_since: None,
3767 deny_since: None,
3768 },
3769 Lint {
3770 label: "async_iterator",
3771 description: r##"# `async_iterator`
3772
3773
3774
3775The tracking issue for this feature is: [#79024]
3776
3777[#79024]: https://github.com/rust-lang/rust/issues/79024
3778
3779------------------------
3780"##,
3781 default_severity: Severity::Allow,
3782 warn_since: None,
3783 deny_since: None,
3784 },
3785 Lint {
3786 label: "async_trait_bounds",
3787 description: r##"# `async_trait_bounds`
3788
3789Allows `async` trait bound modifier.
3790
3791The tracking issue for this feature is: [#62290]
3792
3793[#62290]: https://github.com/rust-lang/rust/issues/62290
3794
3795------------------------
3796"##,
3797 default_severity: Severity::Allow,
3798 warn_since: None,
3799 deny_since: None,
3800 },
3801 Lint {
3802 label: "atomic_internals",
3803 description: r##"# `atomic_internals`
3804
3805
3806
3807This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
3808
3809------------------------
3810"##,
3811 default_severity: Severity::Allow,
3812 warn_since: None,
3813 deny_since: None,
3814 },
3815 Lint {
3816 label: "atomic_ptr_null",
3817 description: r##"# `atomic_ptr_null`
3818
3819
3820
3821The tracking issue for this feature is: [#150733]
3822
3823[#150733]: https://github.com/rust-lang/rust/issues/150733
3824
3825------------------------
3826"##,
3827 default_severity: Severity::Allow,
3828 warn_since: None,
3829 deny_since: None,
3830 },
3831 Lint {
3832 label: "atomic_volatile",
3833 description: r##"# `atomic_volatile`
3834
3835
3836
3837The tracking issue for this feature is: [#158947]
3838
3839[#158947]: https://github.com/rust-lang/rust/issues/158947
3840
3841------------------------
3842"##,
3843 default_severity: Severity::Allow,
3844 warn_since: None,
3845 deny_since: None,
3846 },
3847 Lint {
3848 label: "auto_traits",
3849 description: r##"# `auto_traits`
3850
3851The tracking issue for this feature is [#13231]
3852
3853[#13231]: https://github.com/rust-lang/rust/issues/13231
3854
3855----
3856
3857The `auto_traits` feature gate allows you to define auto traits.
3858
3859Auto traits, like [`Send`] or [`Sync`] in the standard library, are marker traits
3860that are automatically implemented for every type, unless the type, or a type it contains,
3861has explicitly opted out via a negative impl. (Negative impls are separately controlled
3862by the `negative_impls` feature.)
3863
3864[`Send`]: ../../std/marker/trait.Send.html
3865[`Sync`]: ../../std/marker/trait.Sync.html
3866
3867```rust,ignore (partial-example)
3868impl !Trait for Type {}
3869```
3870
3871Example:
3872
3873```rust
3874#![feature(negative_impls)]
3875#![feature(auto_traits)]
3876
3877auto trait Valid {}
3878
3879struct True;
3880struct False;
3881
3882impl !Valid for False {}
3883
3884struct MaybeValid<T>(T);
3885
3886fn must_be_valid<T: Valid>(_t: T) { }
3887
3888fn main() {
3889 // works
3890 must_be_valid( MaybeValid(True) );
3891
3892 // compiler error - trait bound not satisfied
3893 // must_be_valid( MaybeValid(False) );
3894}
3895```
3896
3897## Automatic trait implementations
3898
3899When a type is declared as an `auto trait`, we will automatically
3900create impls for every struct/enum/union, unless an explicit impl is
3901provided. These automatic impls contain a where clause for each field
3902of the form `T: AutoTrait`, where `T` is the type of the field and
3903`AutoTrait` is the auto trait in question. As an example, consider the
3904struct `List` and the auto trait `Send`:
3905
3906```rust
3907struct List<T> {
3908 data: T,
3909 next: Option<Box<List<T>>>,
3910}
3911```
3912
3913Presuming that there is no explicit impl of `Send` for `List`, the
3914compiler will supply an automatic impl of the form:
3915
3916```rust
3917struct List<T> {
3918 data: T,
3919 next: Option<Box<List<T>>>,
3920}
3921
3922unsafe impl<T> Send for List<T>
3923where
3924 T: Send, // from the field `data`
3925 Option<Box<List<T>>>: Send, // from the field `next`
3926{ }
3927```
3928
3929Explicit impls may be either positive or negative. They take the form:
3930
3931```rust,ignore (partial-example)
3932impl<...> AutoTrait for StructName<..> { }
3933impl<...> !AutoTrait for StructName<..> { }
3934```
3935
3936## Coinduction: Auto traits permit cyclic matching
3937
3938Unlike ordinary trait matching, auto traits are **coinductive**. This
3939means, in short, that cycles which occur in trait matching are
3940considered ok. As an example, consider the recursive struct `List`
3941introduced in the previous section. In attempting to determine whether
3942`List: Send`, we would wind up in a cycle: to apply the impl, we must
3943show that `Option<Box<List>>: Send`, which will in turn require
3944`Box<List>: Send` and then finally `List: Send` again. Under ordinary
3945trait matching, this cycle would be an error, but for an auto trait it
3946is considered a successful match.
3947
3948## Items
3949
3950Auto traits cannot have any trait items, such as methods or associated types. This ensures that we can generate default implementations.
3951
3952## Supertraits
3953
3954Auto traits cannot have supertraits. This is for soundness reasons, as the interaction of coinduction with implied bounds is difficult to reconcile.
3955"##,
3956 default_severity: Severity::Allow,
3957 warn_since: None,
3958 deny_since: None,
3959 },
3960 Lint {
3961 label: "autodiff",
3962 description: r##"# `autodiff`
3963
3964
3965
3966The tracking issue for this feature is: [#124509]
3967
3968[#124509]: https://github.com/rust-lang/rust/issues/124509
3969
3970------------------------
3971"##,
3972 default_severity: Severity::Allow,
3973 warn_since: None,
3974 deny_since: None,
3975 },
3976 Lint {
3977 label: "avr_target_feature",
3978 description: r##"# `avr_target_feature`
3979
3980Target features on avr.
3981
3982The tracking issue for this feature is: [#146889]
3983
3984[#146889]: https://github.com/rust-lang/rust/issues/146889
3985
3986------------------------
3987"##,
3988 default_severity: Severity::Allow,
3989 warn_since: None,
3990 deny_since: None,
3991 },
3992 Lint {
3993 label: "avx10_target_feature",
3994 description: r##"# `avx10_target_feature`
3995
3996Allows using Intel AVX10 target features and intrinsics
3997
3998The tracking issue for this feature is: [#138843]
3999
4000[#138843]: https://github.com/rust-lang/rust/issues/138843
4001
4002------------------------
4003"##,
4004 default_severity: Severity::Allow,
4005 warn_since: None,
4006 deny_since: None,
4007 },
4008 Lint {
4009 label: "backtrace_frames",
4010 description: r##"# `backtrace_frames`
4011
4012
4013
4014The tracking issue for this feature is: [#79676]
4015
4016[#79676]: https://github.com/rust-lang/rust/issues/79676
4017
4018------------------------
4019"##,
4020 default_severity: Severity::Allow,
4021 warn_since: None,
4022 deny_since: None,
4023 },
4024 Lint {
4025 label: "bikeshed_guaranteed_no_drop",
4026 description: r##"# `bikeshed_guaranteed_no_drop`
4027
4028
4029
4030This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
4031
4032------------------------
4033"##,
4034 default_severity: Severity::Allow,
4035 warn_since: None,
4036 deny_since: None,
4037 },
4038 Lint {
4039 label: "binary_heap_as_mut_slice",
4040 description: r##"# `binary_heap_as_mut_slice`
4041
4042
4043
4044The tracking issue for this feature is: [#154009]
4045
4046[#154009]: https://github.com/rust-lang/rust/issues/154009
4047
4048------------------------
4049"##,
4050 default_severity: Severity::Allow,
4051 warn_since: None,
4052 deny_since: None,
4053 },
4054 Lint {
4055 label: "binary_heap_drain_sorted",
4056 description: r##"# `binary_heap_drain_sorted`
4057
4058
4059
4060The tracking issue for this feature is: [#59278]
4061
4062[#59278]: https://github.com/rust-lang/rust/issues/59278
4063
4064------------------------
4065"##,
4066 default_severity: Severity::Allow,
4067 warn_since: None,
4068 deny_since: None,
4069 },
4070 Lint {
4071 label: "binary_heap_from_raw_vec",
4072 description: r##"# `binary_heap_from_raw_vec`
4073
4074
4075
4076The tracking issue for this feature is: [#152500]
4077
4078[#152500]: https://github.com/rust-lang/rust/issues/152500
4079
4080------------------------
4081"##,
4082 default_severity: Severity::Allow,
4083 warn_since: None,
4084 deny_since: None,
4085 },
4086 Lint {
4087 label: "binary_heap_into_iter_sorted",
4088 description: r##"# `binary_heap_into_iter_sorted`
4089
4090
4091
4092The tracking issue for this feature is: [#59278]
4093
4094[#59278]: https://github.com/rust-lang/rust/issues/59278
4095
4096------------------------
4097"##,
4098 default_severity: Severity::Allow,
4099 warn_since: None,
4100 deny_since: None,
4101 },
4102 Lint {
4103 label: "binary_heap_peek_mut_refresh",
4104 description: r##"# `binary_heap_peek_mut_refresh`
4105
4106
4107
4108The tracking issue for this feature is: [#138355]
4109
4110[#138355]: https://github.com/rust-lang/rust/issues/138355
4111
4112------------------------
4113"##,
4114 default_severity: Severity::Allow,
4115 warn_since: None,
4116 deny_since: None,
4117 },
4118 Lint {
4119 label: "binary_heap_pop_if",
4120 description: r##"# `binary_heap_pop_if`
4121
4122
4123
4124The tracking issue for this feature is: [#151828]
4125
4126[#151828]: https://github.com/rust-lang/rust/issues/151828
4127
4128------------------------
4129"##,
4130 default_severity: Severity::Allow,
4131 warn_since: None,
4132 deny_since: None,
4133 },
4134 Lint {
4135 label: "borrowed_buf_init",
4136 description: r##"# `borrowed_buf_init`
4137
4138
4139
4140The tracking issue for this feature is: [#160476]
4141
4142[#160476]: https://github.com/rust-lang/rust/issues/160476
4143
4144------------------------
4145"##,
4146 default_severity: Severity::Allow,
4147 warn_since: None,
4148 deny_since: None,
4149 },
4150 Lint {
4151 label: "bound_as_ref",
4152 description: r##"# `bound_as_ref`
4153
4154
4155
4156The tracking issue for this feature is: [#80996]
4157
4158[#80996]: https://github.com/rust-lang/rust/issues/80996
4159
4160------------------------
4161"##,
4162 default_severity: Severity::Allow,
4163 warn_since: None,
4164 deny_since: None,
4165 },
4166 Lint {
4167 label: "bound_copied",
4168 description: r##"# `bound_copied`
4169
4170
4171
4172The tracking issue for this feature is: [#145966]
4173
4174[#145966]: https://github.com/rust-lang/rust/issues/145966
4175
4176------------------------
4177"##,
4178 default_severity: Severity::Allow,
4179 warn_since: None,
4180 deny_since: None,
4181 },
4182 Lint {
4183 label: "box_as_non_null",
4184 description: r##"# `box_as_non_null`
4185
4186
4187
4188The tracking issue for this feature is: [#157345]
4189
4190[#157345]: https://github.com/rust-lang/rust/issues/157345
4191
4192------------------------
4193"##,
4194 default_severity: Severity::Allow,
4195 warn_since: None,
4196 deny_since: None,
4197 },
4198 Lint {
4199 label: "box_internals",
4200 description: r##"# `box_internals`
4201
4202
4203
4204This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
4205
4206------------------------
4207"##,
4208 default_severity: Severity::Allow,
4209 warn_since: None,
4210 deny_since: None,
4211 },
4212 Lint {
4213 label: "box_into_boxed_slice",
4214 description: r##"# `box_into_boxed_slice`
4215
4216
4217
4218The tracking issue for this feature is: [#71582]
4219
4220[#71582]: https://github.com/rust-lang/rust/issues/71582
4221
4222------------------------
4223"##,
4224 default_severity: Severity::Allow,
4225 warn_since: None,
4226 deny_since: None,
4227 },
4228 Lint {
4229 label: "box_into_inner",
4230 description: r##"# `box_into_inner`
4231
4232
4233
4234The tracking issue for this feature is: [#80437]
4235
4236[#80437]: https://github.com/rust-lang/rust/issues/80437
4237
4238------------------------
4239"##,
4240 default_severity: Severity::Allow,
4241 warn_since: None,
4242 deny_since: None,
4243 },
4244 Lint {
4245 label: "bpf_target_feature",
4246 description: r##"# `bpf_target_feature`
4247
4248Target features on bpf.
4249
4250The tracking issue for this feature is: [#150247]
4251
4252[#150247]: https://github.com/rust-lang/rust/issues/150247
4253
4254------------------------
4255"##,
4256 default_severity: Severity::Allow,
4257 warn_since: None,
4258 deny_since: None,
4259 },
4260 Lint {
4261 label: "breakpoint",
4262 description: r##"# `breakpoint`
4263
4264
4265
4266The tracking issue for this feature is: [#133724]
4267
4268[#133724]: https://github.com/rust-lang/rust/issues/133724
4269
4270------------------------
4271"##,
4272 default_severity: Severity::Allow,
4273 warn_since: None,
4274 deny_since: None,
4275 },
4276 Lint {
4277 label: "btree_cursors",
4278 description: r##"# `btree_cursors`
4279
4280
4281
4282The tracking issue for this feature is: [#107540]
4283
4284[#107540]: https://github.com/rust-lang/rust/issues/107540
4285
4286------------------------
4287"##,
4288 default_severity: Severity::Allow,
4289 warn_since: None,
4290 deny_since: None,
4291 },
4292 Lint {
4293 label: "btree_merge",
4294 description: r##"# `btree_merge`
4295
4296
4297
4298The tracking issue for this feature is: [#152152]
4299
4300[#152152]: https://github.com/rust-lang/rust/issues/152152
4301
4302------------------------
4303"##,
4304 default_severity: Severity::Allow,
4305 warn_since: None,
4306 deny_since: None,
4307 },
4308 Lint {
4309 label: "btree_set_entry",
4310 description: r##"# `btree_set_entry`
4311
4312
4313
4314The tracking issue for this feature is: [#133549]
4315
4316[#133549]: https://github.com/rust-lang/rust/issues/133549
4317
4318------------------------
4319"##,
4320 default_severity: Severity::Allow,
4321 warn_since: None,
4322 deny_since: None,
4323 },
4324 Lint {
4325 label: "btreemap_alloc",
4326 description: r##"# `btreemap_alloc`
4327
4328
4329
4330The tracking issue for this feature is: [#163177]
4331
4332[#163177]: https://github.com/rust-lang/rust/issues/163177
4333
4334------------------------
4335"##,
4336 default_severity: Severity::Allow,
4337 warn_since: None,
4338 deny_since: None,
4339 },
4340 Lint {
4341 label: "buf_read_has_data_left",
4342 description: r##"# `buf_read_has_data_left`
4343
4344
4345
4346The tracking issue for this feature is: [#86423]
4347
4348[#86423]: https://github.com/rust-lang/rust/issues/86423
4349
4350------------------------
4351"##,
4352 default_severity: Severity::Allow,
4353 warn_since: None,
4354 deny_since: None,
4355 },
4356 Lint {
4357 label: "bufreader_peek",
4358 description: r##"# `bufreader_peek`
4359
4360
4361
4362The tracking issue for this feature is: [#128405]
4363
4364[#128405]: https://github.com/rust-lang/rust/issues/128405
4365
4366------------------------
4367"##,
4368 default_severity: Severity::Allow,
4369 warn_since: None,
4370 deny_since: None,
4371 },
4372 Lint {
4373 label: "byte_str",
4374 description: r##"# `byte_str`
4375
4376
4377
4378The tracking issue for this feature is: [#134915]
4379
4380[#134915]: https://github.com/rust-lang/rust/issues/134915
4381
4382------------------------
4383"##,
4384 default_severity: Severity::Allow,
4385 warn_since: None,
4386 deny_since: None,
4387 },
4388 Lint {
4389 label: "byte_str_internals",
4390 description: r##"# `byte_str_internals`
4391
4392
4393
4394This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
4395
4396------------------------
4397"##,
4398 default_severity: Severity::Allow,
4399 warn_since: None,
4400 deny_since: None,
4401 },
4402 Lint {
4403 label: "byte_str_to_string",
4404 description: r##"# `byte_str_to_string`
4405
4406
4407
4408The tracking issue for this feature is: [#134915]
4409
4410[#134915]: https://github.com/rust-lang/rust/issues/134915
4411
4412------------------------
4413"##,
4414 default_severity: Severity::Allow,
4415 warn_since: None,
4416 deny_since: None,
4417 },
4418 Lint {
4419 label: "c_size_t",
4420 description: r##"# `c_size_t`
4421
4422
4423
4424The tracking issue for this feature is: [#88345]
4425
4426[#88345]: https://github.com/rust-lang/rust/issues/88345
4427
4428------------------------
4429"##,
4430 default_severity: Severity::Allow,
4431 warn_since: None,
4432 deny_since: None,
4433 },
4434 Lint {
4435 label: "c_variadic_experimental_arch",
4436 description: r##"# `c_variadic_experimental_arch`
4437
4438Allows defining c-variadic functions on targets where this feature has not yet undergone sufficient testing for stabilization.
4439
4440The tracking issue for this feature is: [#155973]
4441
4442[#155973]: https://github.com/rust-lang/rust/issues/155973
4443
4444------------------------
4445"##,
4446 default_severity: Severity::Allow,
4447 warn_since: None,
4448 deny_since: None,
4449 },
4450 Lint {
4451 label: "c_variadic_int128",
4452 description: r##"# `c_variadic_int128`
4453
4454
4455
4456The tracking issue for this feature is: [#155752]
4457
4458[#155752]: https://github.com/rust-lang/rust/issues/155752
4459
4460------------------------
4461"##,
4462 default_severity: Severity::Allow,
4463 warn_since: None,
4464 deny_since: None,
4465 },
4466 Lint {
4467 label: "c_variadic_va_arg_safe",
4468 description: r##"# `c_variadic_va_arg_safe`
4469
4470
4471
4472The tracking issue for this feature is: [#162911]
4473
4474[#162911]: https://github.com/rust-lang/rust/issues/162911
4475
4476------------------------
4477"##,
4478 default_severity: Severity::Allow,
4479 warn_since: None,
4480 deny_since: None,
4481 },
4482 Lint {
4483 label: "c_void_variant",
4484 description: r##"# `c_void_variant`
4485
4486This feature is internal to the Rust compiler and is not intended for general use.
4487
4488------------------------
4489"##,
4490 default_severity: Severity::Allow,
4491 warn_since: None,
4492 deny_since: None,
4493 },
4494 Lint {
4495 label: "can_vector",
4496 description: r##"# `can_vector`
4497
4498
4499
4500The tracking issue for this feature is: [#69941]
4501
4502[#69941]: https://github.com/rust-lang/rust/issues/69941
4503
4504------------------------
4505"##,
4506 default_severity: Severity::Allow,
4507 warn_since: None,
4508 deny_since: None,
4509 },
4510 Lint {
4511 label: "case_ignorable",
4512 description: r##"# `case_ignorable`
4513
4514
4515
4516The tracking issue for this feature is: [#154848]
4517
4518[#154848]: https://github.com/rust-lang/rust/issues/154848
4519
4520------------------------
4521"##,
4522 default_severity: Severity::Allow,
4523 warn_since: None,
4524 deny_since: None,
4525 },
4526 Lint {
4527 label: "casefold",
4528 description: r##"# `casefold`
4529
4530
4531
4532The tracking issue for this feature is: [#157000]
4533
4534[#157000]: https://github.com/rust-lang/rust/issues/157000
4535
4536------------------------
4537"##,
4538 default_severity: Severity::Allow,
4539 warn_since: None,
4540 deny_since: None,
4541 },
4542 Lint {
4543 label: "cast_maybe_uninit",
4544 description: r##"# `cast_maybe_uninit`
4545
4546
4547
4548The tracking issue for this feature is: [#145036]
4549
4550[#145036]: https://github.com/rust-lang/rust/issues/145036
4551
4552------------------------
4553"##,
4554 default_severity: Severity::Allow,
4555 warn_since: None,
4556 deny_since: None,
4557 },
4558 Lint {
4559 label: "cell_get_cloned",
4560 description: r##"# `cell_get_cloned`
4561
4562
4563
4564The tracking issue for this feature is: [#145329]
4565
4566[#145329]: https://github.com/rust-lang/rust/issues/145329
4567
4568------------------------
4569"##,
4570 default_severity: Severity::Allow,
4571 warn_since: None,
4572 deny_since: None,
4573 },
4574 Lint {
4575 label: "cell_leak",
4576 description: r##"# `cell_leak`
4577
4578
4579
4580The tracking issue for this feature is: [#69099]
4581
4582[#69099]: https://github.com/rust-lang/rust/issues/69099
4583
4584------------------------
4585"##,
4586 default_severity: Severity::Allow,
4587 warn_since: None,
4588 deny_since: None,
4589 },
4590 Lint {
4591 label: "cfg_accessible",
4592 description: r##"# `cfg_accessible`
4593
4594
4595
4596The tracking issue for this feature is: [#64797]
4597
4598[#64797]: https://github.com/rust-lang/rust/issues/64797
4599
4600------------------------
4601"##,
4602 default_severity: Severity::Allow,
4603 warn_since: None,
4604 deny_since: None,
4605 },
4606 Lint {
4607 label: "cfg_contract_checks",
4608 description: r##"# `cfg_contract_checks`
4609
4610Allows the use of `#[cfg(contract_checks)` to check if contract checks are enabled.
4611
4612The tracking issue for this feature is: [#128044]
4613
4614[#128044]: https://github.com/rust-lang/rust/issues/128044
4615
4616------------------------
4617"##,
4618 default_severity: Severity::Allow,
4619 warn_since: None,
4620 deny_since: None,
4621 },
4622 Lint {
4623 label: "cfg_eval",
4624 description: r##"# `cfg_eval`
4625
4626
4627
4628The tracking issue for this feature is: [#82679]
4629
4630[#82679]: https://github.com/rust-lang/rust/issues/82679
4631
4632------------------------
4633"##,
4634 default_severity: Severity::Allow,
4635 warn_since: None,
4636 deny_since: None,
4637 },
4638 Lint {
4639 label: "cfg_overflow_checks",
4640 description: r##"# `cfg_overflow_checks`
4641
4642Allows the use of `#[cfg(overflow_checks)` to check if integer overflow behaviour.
4643
4644The tracking issue for this feature is: [#111466]
4645
4646[#111466]: https://github.com/rust-lang/rust/issues/111466
4647
4648------------------------
4649"##,
4650 default_severity: Severity::Allow,
4651 warn_since: None,
4652 deny_since: None,
4653 },
4654 Lint {
4655 label: "cfg_relocation_model",
4656 description: r##"# `cfg_relocation_model`
4657
4658Provides the relocation model information as cfg entry
4659
4660The tracking issue for this feature is: [#114929]
4661
4662[#114929]: https://github.com/rust-lang/rust/issues/114929
4663
4664------------------------
4665"##,
4666 default_severity: Severity::Allow,
4667 warn_since: None,
4668 deny_since: None,
4669 },
4670 Lint {
4671 label: "cfg_sanitize",
4672 description: r##"# `cfg_sanitize`
4673
4674The tracking issue for this feature is: [#39699]
4675
4676[#39699]: https://github.com/rust-lang/rust/issues/39699
4677
4678------------------------
4679
4680The `cfg_sanitize` feature makes it possible to execute different code
4681depending on whether a particular sanitizer is enabled or not.
4682
4683## Examples
4684
4685```rust
4686#![feature(cfg_sanitize)]
4687
4688#[cfg(sanitize = "thread")]
4689fn a() {
4690 // ...
4691}
4692
4693#[cfg(not(sanitize = "thread"))]
4694fn a() {
4695 // ...
4696}
4697
4698fn b() {
4699 if cfg!(sanitize = "leak") {
4700 // ...
4701 } else {
4702 // ...
4703 }
4704}
4705```
4706"##,
4707 default_severity: Severity::Allow,
4708 warn_since: None,
4709 deny_since: None,
4710 },
4711 Lint {
4712 label: "cfg_sanitizer_cfi",
4713 description: r##"# `cfg_sanitizer_cfi`
4714
4715Allows `cfg(sanitizer_cfi_generalize_pointers)` and `cfg(sanitizer_cfi_normalize_integers)`.
4716
4717The tracking issue for this feature is: [#89653]
4718
4719[#89653]: https://github.com/rust-lang/rust/issues/89653
4720
4721------------------------
4722"##,
4723 default_severity: Severity::Allow,
4724 warn_since: None,
4725 deny_since: None,
4726 },
4727 Lint {
4728 label: "cfg_target_compact",
4729 description: r##"# `cfg_target_compact`
4730
4731Allows `cfg(target(abi = "..."))`.
4732
4733The tracking issue for this feature is: [#96901]
4734
4735[#96901]: https://github.com/rust-lang/rust/issues/96901
4736
4737------------------------
4738"##,
4739 default_severity: Severity::Allow,
4740 warn_since: None,
4741 deny_since: None,
4742 },
4743 Lint {
4744 label: "cfg_target_has_atomic",
4745 description: r##"# `cfg_target_has_atomic`
4746
4747Allows `cfg(target_has_atomic_load_store = "...")`.
4748
4749The tracking issue for this feature is: [#94039]
4750
4751[#94039]: https://github.com/rust-lang/rust/issues/94039
4752
4753------------------------
4754"##,
4755 default_severity: Severity::Allow,
4756 warn_since: None,
4757 deny_since: None,
4758 },
4759 Lint {
4760 label: "cfg_target_has_reliable_f16_f128",
4761 description: r##"# `cfg_target_has_reliable_f16_f128`
4762
4763Allows checking whether or not the backend correctly supports unstable float types.
4764
4765This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
4766
4767------------------------
4768"##,
4769 default_severity: Severity::Allow,
4770 warn_since: None,
4771 deny_since: None,
4772 },
4773 Lint {
4774 label: "cfg_target_has_reliable_f16b",
4775 description: r##"# `cfg_target_has_reliable_f16b`
4776
4777Allows checking whether or not the backend correctly supports the unstable `f16b` type.
4778
4779This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
4780
4781------------------------
4782"##,
4783 default_severity: Severity::Allow,
4784 warn_since: None,
4785 deny_since: None,
4786 },
4787 Lint {
4788 label: "cfg_target_has_threads",
4789 description: r##"# `cfg_target_has_threads`
4790
4791Allows checking whether or not the target might have thread support.
4792
4793This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
4794
4795------------------------
4796"##,
4797 default_severity: Severity::Allow,
4798 warn_since: None,
4799 deny_since: None,
4800 },
4801 Lint {
4802 label: "cfg_target_object_format",
4803 description: r##"# `cfg_target_object_format`
4804
4805The tracking issue for this feature is: [#152586]
4806
4807[#152586]: https://github.com/rust-lang/rust/issues/152586
4808
4809------------------------
4810
4811The `cfg_target_object_format` feature makes it possible to execute different code
4812depending on the current target's object file format.
4813
4814## Examples
4815
4816```rust
4817#![feature(cfg_target_object_format)]
4818
4819#[cfg(target_object_format = "elf")]
4820fn a() {
4821 // ...
4822}
4823
4824#[cfg(target_object_format = "mach-o")]
4825fn a() {
4826 // ...
4827}
4828
4829fn b() {
4830 if cfg!(target_object_format = "wasm") {
4831 // ...
4832 } else {
4833 // ...
4834 }
4835}
4836```
4837"##,
4838 default_severity: Severity::Allow,
4839 warn_since: None,
4840 deny_since: None,
4841 },
4842 Lint {
4843 label: "cfg_target_thread_local",
4844 description: r##"# `cfg_target_thread_local`
4845
4846Allows `cfg(target_thread_local)`.
4847
4848The tracking issue for this feature is: [#29594]
4849
4850[#29594]: https://github.com/rust-lang/rust/issues/29594
4851
4852------------------------
4853"##,
4854 default_severity: Severity::Allow,
4855 warn_since: None,
4856 deny_since: None,
4857 },
4858 Lint {
4859 label: "cfg_ub_checks",
4860 description: r##"# `cfg_ub_checks`
4861
4862Allows the use of `#[cfg(ub_checks)]` to check if UB checks are enabled.
4863
4864The tracking issue for this feature is: [#123499]
4865
4866[#123499]: https://github.com/rust-lang/rust/issues/123499
4867
4868------------------------
4869"##,
4870 default_severity: Severity::Allow,
4871 warn_since: None,
4872 deny_since: None,
4873 },
4874 Lint {
4875 label: "cfg_version",
4876 description: r##"# `cfg_version`
4877
4878The tracking issue for this feature is: [#64796]
4879
4880[#64796]: https://github.com/rust-lang/rust/issues/64796
4881
4882------------------------
4883
4884The `cfg_version` feature makes it possible to execute different code
4885depending on the compiler version. It will return true if the compiler
4886version is greater than or equal to the specified version.
4887
4888## Examples
4889
4890```rust
4891#![feature(cfg_version)]
4892
4893#[cfg(version("1.42"))] // 1.42 and above
4894fn a() {
4895 // ...
4896}
4897
4898#[cfg(not(version("1.42")))] // 1.41 and below
4899fn a() {
4900 // ...
4901}
4902
4903fn b() {
4904 if cfg!(version("1.42")) {
4905 // ...
4906 } else {
4907 // ...
4908 }
4909}
4910```
4911"##,
4912 default_severity: Severity::Allow,
4913 warn_since: None,
4914 deny_since: None,
4915 },
4916 Lint {
4917 label: "cfi_encoding",
4918 description: r##"# `cfi_encoding`
4919
4920The tracking issue for this feature is: [#89653]
4921
4922[#89653]: https://github.com/rust-lang/rust/issues/89653
4923
4924------------------------
4925
4926The `cfi_encoding` feature allows the user to define a CFI encoding for a type.
4927It allows the user to use a different names for types that otherwise would be
4928required to have the same name as used in externally defined C functions.
4929
4930## Examples
4931
4932```rust
4933#![feature(cfi_encoding, extern_types)]
4934
4935#[cfi_encoding = "3Foo"]
4936pub struct Type1(i32);
4937
4938extern {
4939 #[cfi_encoding = "3Bar"]
4940 type Type2;
4941}
4942```
4943"##,
4944 default_severity: Severity::Allow,
4945 warn_since: None,
4946 deny_since: None,
4947 },
4948 Lint {
4949 label: "char_internals",
4950 description: r##"# `char_internals`
4951
4952
4953
4954This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
4955
4956------------------------
4957"##,
4958 default_severity: Severity::Allow,
4959 warn_since: None,
4960 deny_since: None,
4961 },
4962 Lint {
4963 label: "char_is_xid",
4964 description: r##"# `char_is_xid`
4965
4966
4967
4968The tracking issue for this feature is: [#164841]
4969
4970[#164841]: https://github.com/rust-lang/rust/issues/164841
4971
4972------------------------
4973"##,
4974 default_severity: Severity::Allow,
4975 warn_since: None,
4976 deny_since: None,
4977 },
4978 Lint {
4979 label: "char_to_u32",
4980 description: r##"# `char_to_u32`
4981
4982
4983
4984The tracking issue for this feature is: [#158938]
4985
4986[#158938]: https://github.com/rust-lang/rust/issues/158938
4987
4988------------------------
4989"##,
4990 default_severity: Severity::Allow,
4991 warn_since: None,
4992 deny_since: None,
4993 },
4994 Lint {
4995 label: "char_unassigned_private_use",
4996 description: r##"# `char_unassigned_private_use`
4997
4998
4999
5000The tracking issue for this feature is: [#158322]
5001
5002[#158322]: https://github.com/rust-lang/rust/issues/158322
5003
5004------------------------
5005"##,
5006 default_severity: Severity::Allow,
5007 warn_since: None,
5008 deny_since: None,
5009 },
5010 Lint {
5011 label: "checked_type_aliases",
5012 description: r##"# `checked_type_aliases`
5013
5014Allow to have type alias types for inter-crate use.
5015
5016The tracking issue for this feature is: [#112792]
5017
5018[#112792]: https://github.com/rust-lang/rust/issues/112792
5019
5020------------------------
5021"##,
5022 default_severity: Severity::Allow,
5023 warn_since: None,
5024 deny_since: None,
5025 },
5026 Lint {
5027 label: "clamp_bounds",
5028 description: r##"# `clamp_bounds`
5029
5030
5031
5032The tracking issue for this feature is: [#147781]
5033
5034[#147781]: https://github.com/rust-lang/rust/issues/147781
5035
5036------------------------
5037"##,
5038 default_severity: Severity::Allow,
5039 warn_since: None,
5040 deny_since: None,
5041 },
5042 Lint {
5043 label: "clamp_magnitude",
5044 description: r##"# `clamp_magnitude`
5045
5046
5047
5048The tracking issue for this feature is: [#148519]
5049
5050[#148519]: https://github.com/rust-lang/rust/issues/148519
5051
5052------------------------
5053"##,
5054 default_severity: Severity::Allow,
5055 warn_since: None,
5056 deny_since: None,
5057 },
5058 Lint {
5059 label: "clamp_to",
5060 description: r##"# `clamp_to`
5061
5062
5063
5064The tracking issue for this feature is: [#147781]
5065
5066[#147781]: https://github.com/rust-lang/rust/issues/147781
5067
5068------------------------
5069"##,
5070 default_severity: Severity::Allow,
5071 warn_since: None,
5072 deny_since: None,
5073 },
5074 Lint {
5075 label: "clflushopt_target_feature",
5076 description: r##"# `clflushopt_target_feature`
5077
5078The `clflushopt` target feature on x86.
5079
5080The tracking issue for this feature is: [#157096]
5081
5082[#157096]: https://github.com/rust-lang/rust/issues/157096
5083
5084------------------------
5085"##,
5086 default_severity: Severity::Allow,
5087 warn_since: None,
5088 deny_since: None,
5089 },
5090 Lint {
5091 label: "clone_from_ref",
5092 description: r##"# `clone_from_ref`
5093
5094
5095
5096The tracking issue for this feature is: [#149075]
5097
5098[#149075]: https://github.com/rust-lang/rust/issues/149075
5099
5100------------------------
5101"##,
5102 default_severity: Severity::Allow,
5103 warn_since: None,
5104 deny_since: None,
5105 },
5106 Lint {
5107 label: "clone_to_uninit",
5108 description: r##"# `clone_to_uninit`
5109
5110
5111
5112The tracking issue for this feature is: [#126799]
5113
5114[#126799]: https://github.com/rust-lang/rust/issues/126799
5115
5116------------------------
5117"##,
5118 default_severity: Severity::Allow,
5119 warn_since: None,
5120 deny_since: None,
5121 },
5122 Lint {
5123 label: "closure_lifetime_binder",
5124 description: r##"# `closure_lifetime_binder`
5125
5126Allows `for<...>` on closures and coroutines.
5127
5128The tracking issue for this feature is: [#97362]
5129
5130[#97362]: https://github.com/rust-lang/rust/issues/97362
5131
5132------------------------
5133"##,
5134 default_severity: Severity::Allow,
5135 warn_since: None,
5136 deny_since: None,
5137 },
5138 Lint {
5139 label: "closure_track_caller",
5140 description: r##"# `closure_track_caller`
5141
5142The tracking issue for this feature is: [#87417]
5143
5144[#87417]: https://github.com/rust-lang/rust/issues/87417
5145
5146------------------------
5147
5148Allows using the `#[track_caller]` attribute on closures and coroutines.
5149Calls made to the closure or coroutine will have caller information
5150available through `std::panic::Location::caller()`, just like using
5151`#[track_caller]` on a function.
5152"##,
5153 default_severity: Severity::Allow,
5154 warn_since: None,
5155 deny_since: None,
5156 },
5157 Lint {
5158 label: "cmp_minmax",
5159 description: r##"# `cmp_minmax`
5160
5161
5162
5163The tracking issue for this feature is: [#115939]
5164
5165[#115939]: https://github.com/rust-lang/rust/issues/115939
5166
5167------------------------
5168"##,
5169 default_severity: Severity::Allow,
5170 warn_since: None,
5171 deny_since: None,
5172 },
5173 Lint {
5174 label: "cmp_splat",
5175 description: r##"# `cmp_splat`
5176
5177
5178
5179The tracking issue for this feature is: [#160728]
5180
5181[#160728]: https://github.com/rust-lang/rust/issues/160728
5182
5183------------------------
5184"##,
5185 default_severity: Severity::Allow,
5186 warn_since: None,
5187 deny_since: None,
5188 },
5189 Lint {
5190 label: "cmp_splat_internals",
5191 description: r##"# `cmp_splat_internals`
5192
5193
5194
5195The tracking issue for this feature is: [#160728]
5196
5197[#160728]: https://github.com/rust-lang/rust/issues/160728
5198
5199------------------------
5200"##,
5201 default_severity: Severity::Allow,
5202 warn_since: None,
5203 deny_since: None,
5204 },
5205 Lint {
5206 label: "cmse_nonsecure_entry",
5207 description: r##"# `cmse_nonsecure_entry`
5208
5209The tracking issue for this feature is: [#75835]
5210
5211[#75835]: https://github.com/rust-lang/rust/issues/75835
5212
5213------------------------
5214
5215The [TrustZone-M
5216feature](https://developer.arm.com/documentation/100690/latest/) is available
5217for targets with the Armv8-M architecture profile (`thumbv8m` in their target
5218name).
5219LLVM, the Rust compiler and the linker are providing
5220[support](https://developer.arm.com/documentation/ecm0359818/latest/) for the
5221TrustZone-M feature.
5222
5223One of the things provided with this unstable feature is the "cmse-nonsecure-entry" ABI.
5224This ABI marks a Secure function as an entry function (see
5225[section 5.4](https://developer.arm.com/documentation/ecm0359818/latest/) for details).
5226With this ABI, the compiler will do the following:
5227* add a special symbol on the function which is the `__acle_se_` prefix and the
5228 standard function name
5229* constrain the number of parameters to avoid using the Non-Secure stack
5230* before returning from the function, clear registers that might contain Secure
5231 information
5232* use the `BXNS` instruction to return
5233
5234Because the stack can not be used to pass parameters, there will be compilation
5235errors if:
5236* the total size of all parameters is too big (for example, more than four 32-bit integers)
5237
5238The special symbol `__acle_se_` will be used by the linker to generate a secure
5239gateway veneer.
5240
5241<!-- NOTE(ignore) this example is specific to thumbv8m targets -->
5242
5243``` rust,ignore
5244#![no_std]
5245#![feature(cmse_nonsecure_entry)]
5246
5247#[no_mangle]
5248pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
5249 input + 6
5250}
5251```
5252
5253``` text
5254$ rustc --emit obj --crate-type lib --target thumbv8m.main-none-eabi function.rs
5255$ arm-none-eabi-objdump -D function.o
5256
525700000000 <entry_function>:
5258 0: b580 push {r7, lr}
5259 2: 466f mov r7, sp
5260 4: b082 sub sp, #8
5261 6: 9001 str r0, [sp, #4]
5262 8: 1d81 adds r1, r0, #6
5263 a: 460a mov r2, r1
5264 c: 4281 cmp r1, r0
5265 e: 9200 str r2, [sp, #0]
5266 10: d30b bcc.n 2a <entry_function+0x2a>
5267 12: e7ff b.n 14 <entry_function+0x14>
5268 14: 9800 ldr r0, [sp, #0]
5269 16: b002 add sp, #8
5270 18: e8bd 4080 ldmia.w sp!, {r7, lr}
5271 1c: 4671 mov r1, lr
5272 1e: 4672 mov r2, lr
5273 20: 4673 mov r3, lr
5274 22: 46f4 mov ip, lr
5275 24: f38e 8800 msr CPSR_f, lr
5276 28: 4774 bxns lr
5277 2a: f240 0000 movw r0, #0
5278 2e: f2c0 0000 movt r0, #0
5279 32: f240 0200 movw r2, #0
5280 36: f2c0 0200 movt r2, #0
5281 3a: 211c movs r1, #28
5282 3c: f7ff fffe bl 0 <_ZN4core9panicking5panic17h5c028258ca2fb3f5E>
5283 40: defe udf #254 ; 0xfe
5284```
5285"##,
5286 default_severity: Severity::Allow,
5287 warn_since: None,
5288 deny_since: None,
5289 },
5290 Lint {
5291 label: "codeview_annotation",
5292 description: r##"# `codeview_annotation`
5293
5294
5295
5296The tracking issue for this feature is: [#163964]
5297
5298[#163964]: https://github.com/rust-lang/rust/issues/163964
5299
5300------------------------
5301"##,
5302 default_severity: Severity::Allow,
5303 warn_since: None,
5304 deny_since: None,
5305 },
5306 Lint {
5307 label: "coerce_pointee_validated",
5308 description: r##"# `coerce_pointee_validated`
5309
5310
5311
5312This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
5313
5314------------------------
5315"##,
5316 default_severity: Severity::Allow,
5317 warn_since: None,
5318 deny_since: None,
5319 },
5320 Lint {
5321 label: "coerce_unsized",
5322 description: r##"# `coerce_unsized`
5323
5324
5325
5326The tracking issue for this feature is: [#18598]
5327
5328[#18598]: https://github.com/rust-lang/rust/issues/18598
5329
5330------------------------
5331"##,
5332 default_severity: Severity::Allow,
5333 warn_since: None,
5334 deny_since: None,
5335 },
5336 Lint {
5337 label: "command_resolved_envs",
5338 description: r##"# `command_resolved_envs`
5339
5340
5341
5342The tracking issue for this feature is: [#149070]
5343
5344[#149070]: https://github.com/rust-lang/rust/issues/149070
5345
5346------------------------
5347"##,
5348 default_severity: Severity::Allow,
5349 warn_since: None,
5350 deny_since: None,
5351 },
5352 Lint {
5353 label: "compiler_builtins",
5354 description: r##"# `compiler_builtins`
5355
5356This feature is internal to the Rust compiler and is not intended for general use.
5357
5358------------------------
5359"##,
5360 default_severity: Severity::Allow,
5361 warn_since: None,
5362 deny_since: None,
5363 },
5364 Lint {
5365 label: "complex_numbers",
5366 description: r##"# `complex_numbers`
5367
5368
5369
5370The tracking issue for this feature is: [#154023]
5371
5372[#154023]: https://github.com/rust-lang/rust/issues/154023
5373
5374------------------------
5375"##,
5376 default_severity: Severity::Allow,
5377 warn_since: None,
5378 deny_since: None,
5379 },
5380 Lint {
5381 label: "concat_bytes",
5382 description: r##"# `concat_bytes`
5383
5384
5385
5386The tracking issue for this feature is: [#87555]
5387
5388[#87555]: https://github.com/rust-lang/rust/issues/87555
5389
5390------------------------
5391"##,
5392 default_severity: Severity::Allow,
5393 warn_since: None,
5394 deny_since: None,
5395 },
5396 Lint {
5397 label: "const_alloc_error",
5398 description: r##"# `const_alloc_error`
5399
5400
5401
5402The tracking issue for this feature is: [#92523]
5403
5404[#92523]: https://github.com/rust-lang/rust/issues/92523
5405
5406------------------------
5407"##,
5408 default_severity: Severity::Allow,
5409 warn_since: None,
5410 deny_since: None,
5411 },
5412 Lint {
5413 label: "const_array",
5414 description: r##"# `const_array`
5415
5416
5417
5418The tracking issue for this feature is: [#147606]
5419
5420[#147606]: https://github.com/rust-lang/rust/issues/147606
5421
5422------------------------
5423"##,
5424 default_severity: Severity::Allow,
5425 warn_since: None,
5426 deny_since: None,
5427 },
5428 Lint {
5429 label: "const_async_blocks",
5430 description: r##"# `const_async_blocks`
5431
5432Allows `async {}` expressions in const contexts.
5433
5434The tracking issue for this feature is: [#85368]
5435
5436[#85368]: https://github.com/rust-lang/rust/issues/85368
5437
5438------------------------
5439"##,
5440 default_severity: Severity::Allow,
5441 warn_since: None,
5442 deny_since: None,
5443 },
5444 Lint {
5445 label: "const_atomic",
5446 description: r##"# `const_atomic`
5447
5448
5449
5450The tracking issue for this feature is: [#160078]
5451
5452[#160078]: https://github.com/rust-lang/rust/issues/160078
5453
5454------------------------
5455"##,
5456 default_severity: Severity::Allow,
5457 warn_since: None,
5458 deny_since: None,
5459 },
5460 Lint {
5461 label: "const_binary_search",
5462 description: r##"# `const_binary_search`
5463
5464
5465
5466The tracking issue for this feature is: [#159532]
5467
5468[#159532]: https://github.com/rust-lang/rust/issues/159532
5469
5470------------------------
5471"##,
5472 default_severity: Severity::Allow,
5473 warn_since: None,
5474 deny_since: None,
5475 },
5476 Lint {
5477 label: "const_block_items",
5478 description: r##"# `const_block_items`
5479
5480Allows `const { ... }` as a shorthand for `const _: () = const { ... };` for module items.
5481
5482The tracking issue for this feature is: [#149226]
5483
5484[#149226]: https://github.com/rust-lang/rust/issues/149226
5485
5486------------------------
5487"##,
5488 default_severity: Severity::Allow,
5489 warn_since: None,
5490 deny_since: None,
5491 },
5492 Lint {
5493 label: "const_bool",
5494 description: r##"# `const_bool`
5495
5496
5497
5498The tracking issue for this feature is: [#151531]
5499
5500[#151531]: https://github.com/rust-lang/rust/issues/151531
5501
5502------------------------
5503"##,
5504 default_severity: Severity::Allow,
5505 warn_since: None,
5506 deny_since: None,
5507 },
5508 Lint {
5509 label: "const_c_variadic",
5510 description: r##"# `const_c_variadic`
5511
5512Allows defining and calling c-variadic functions in const contexts.
5513
5514The tracking issue for this feature is: [#151787]
5515
5516[#151787]: https://github.com/rust-lang/rust/issues/151787
5517
5518------------------------
5519"##,
5520 default_severity: Severity::Allow,
5521 warn_since: None,
5522 deny_since: None,
5523 },
5524 Lint {
5525 label: "const_cell_traits",
5526 description: r##"# `const_cell_traits`
5527
5528
5529
5530The tracking issue for this feature is: [#147787]
5531
5532[#147787]: https://github.com/rust-lang/rust/issues/147787
5533
5534------------------------
5535"##,
5536 default_severity: Severity::Allow,
5537 warn_since: None,
5538 deny_since: None,
5539 },
5540 Lint {
5541 label: "const_clone",
5542 description: r##"# `const_clone`
5543
5544
5545
5546The tracking issue for this feature is: [#142757]
5547
5548[#142757]: https://github.com/rust-lang/rust/issues/142757
5549
5550------------------------
5551"##,
5552 default_severity: Severity::Allow,
5553 warn_since: None,
5554 deny_since: None,
5555 },
5556 Lint {
5557 label: "const_closures",
5558 description: r##"# `const_closures`
5559
5560Allows `const || {}` closures in const contexts.
5561
5562The tracking issue for this feature is: [#106003]
5563
5564[#106003]: https://github.com/rust-lang/rust/issues/106003
5565
5566------------------------
5567"##,
5568 default_severity: Severity::Allow,
5569 warn_since: None,
5570 deny_since: None,
5571 },
5572 Lint {
5573 label: "const_cmp",
5574 description: r##"# `const_cmp`
5575
5576
5577
5578The tracking issue for this feature is: [#143800]
5579
5580[#143800]: https://github.com/rust-lang/rust/issues/143800
5581
5582------------------------
5583"##,
5584 default_severity: Severity::Allow,
5585 warn_since: None,
5586 deny_since: None,
5587 },
5588 Lint {
5589 label: "const_control_flow",
5590 description: r##"# `const_control_flow`
5591
5592
5593
5594The tracking issue for this feature is: [#148739]
5595
5596[#148739]: https://github.com/rust-lang/rust/issues/148739
5597
5598------------------------
5599"##,
5600 default_severity: Severity::Allow,
5601 warn_since: None,
5602 deny_since: None,
5603 },
5604 Lint {
5605 label: "const_convert",
5606 description: r##"# `const_convert`
5607
5608
5609
5610The tracking issue for this feature is: [#143773]
5611
5612[#143773]: https://github.com/rust-lang/rust/issues/143773
5613
5614------------------------
5615"##,
5616 default_severity: Severity::Allow,
5617 warn_since: None,
5618 deny_since: None,
5619 },
5620 Lint {
5621 label: "const_default",
5622 description: r##"# `const_default`
5623
5624
5625
5626The tracking issue for this feature is: [#143894]
5627
5628[#143894]: https://github.com/rust-lang/rust/issues/143894
5629
5630------------------------
5631"##,
5632 default_severity: Severity::Allow,
5633 warn_since: None,
5634 deny_since: None,
5635 },
5636 Lint {
5637 label: "const_destruct",
5638 description: r##"# `const_destruct`
5639
5640Allows using `[const] Destruct` bounds and calling drop impls in const contexts.
5641
5642The tracking issue for this feature is: [#133214]
5643
5644[#133214]: https://github.com/rust-lang/rust/issues/133214
5645
5646------------------------
5647"##,
5648 default_severity: Severity::Allow,
5649 warn_since: None,
5650 deny_since: None,
5651 },
5652 Lint {
5653 label: "const_drop_guard",
5654 description: r##"# `const_drop_guard`
5655
5656
5657
5658This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
5659
5660------------------------
5661"##,
5662 default_severity: Severity::Allow,
5663 warn_since: None,
5664 deny_since: None,
5665 },
5666 Lint {
5667 label: "const_drop_in_place",
5668 description: r##"# `const_drop_in_place`
5669
5670
5671
5672The tracking issue for this feature is: [#109342]
5673
5674[#109342]: https://github.com/rust-lang/rust/issues/109342
5675
5676------------------------
5677"##,
5678 default_severity: Severity::Allow,
5679 warn_since: None,
5680 deny_since: None,
5681 },
5682 Lint {
5683 label: "const_eval_select",
5684 description: r##"# `const_eval_select`
5685
5686
5687
5688The tracking issue for this feature is: [#124625]
5689
5690[#124625]: https://github.com/rust-lang/rust/issues/124625
5691
5692------------------------
5693"##,
5694 default_severity: Severity::Allow,
5695 warn_since: None,
5696 deny_since: None,
5697 },
5698 Lint {
5699 label: "const_for",
5700 description: r##"# `const_for`
5701
5702Allows `for _ in _` loops in const contexts.
5703
5704The tracking issue for this feature is: [#87575]
5705
5706[#87575]: https://github.com/rust-lang/rust/issues/87575
5707
5708------------------------
5709"##,
5710 default_severity: Severity::Allow,
5711 warn_since: None,
5712 deny_since: None,
5713 },
5714 Lint {
5715 label: "const_format_args",
5716 description: r##"# `const_format_args`
5717
5718
5719
5720This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
5721
5722------------------------
5723"##,
5724 default_severity: Severity::Allow,
5725 warn_since: None,
5726 deny_since: None,
5727 },
5728 Lint {
5729 label: "const_heap",
5730 description: r##"# `const_heap`
5731
5732
5733
5734The tracking issue for this feature is: [#79597]
5735
5736[#79597]: https://github.com/rust-lang/rust/issues/79597
5737
5738------------------------
5739"##,
5740 default_severity: Severity::Allow,
5741 warn_since: None,
5742 deny_since: None,
5743 },
5744 Lint {
5745 label: "const_index",
5746 description: r##"# `const_index`
5747
5748
5749
5750The tracking issue for this feature is: [#143775]
5751
5752[#143775]: https://github.com/rust-lang/rust/issues/143775
5753
5754------------------------
5755"##,
5756 default_severity: Severity::Allow,
5757 warn_since: None,
5758 deny_since: None,
5759 },
5760 Lint {
5761 label: "const_iter",
5762 description: r##"# `const_iter`
5763
5764
5765
5766The tracking issue for this feature is: [#92476]
5767
5768[#92476]: https://github.com/rust-lang/rust/issues/92476
5769
5770------------------------
5771"##,
5772 default_severity: Severity::Allow,
5773 warn_since: None,
5774 deny_since: None,
5775 },
5776 Lint {
5777 label: "const_manually_drop_take",
5778 description: r##"# `const_manually_drop_take`
5779
5780
5781
5782The tracking issue for this feature is: [#148773]
5783
5784[#148773]: https://github.com/rust-lang/rust/issues/148773
5785
5786------------------------
5787"##,
5788 default_severity: Severity::Allow,
5789 warn_since: None,
5790 deny_since: None,
5791 },
5792 Lint {
5793 label: "const_never_short_circuit",
5794 description: r##"# `const_never_short_circuit`
5795
5796
5797
5798This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
5799
5800------------------------
5801"##,
5802 default_severity: Severity::Allow,
5803 warn_since: None,
5804 deny_since: None,
5805 },
5806 Lint {
5807 label: "const_nonnull_with_exposed_provenance",
5808 description: r##"# `const_nonnull_with_exposed_provenance`
5809
5810
5811
5812The tracking issue for this feature is: [#154215]
5813
5814[#154215]: https://github.com/rust-lang/rust/issues/154215
5815
5816------------------------
5817"##,
5818 default_severity: Severity::Allow,
5819 warn_since: None,
5820 deny_since: None,
5821 },
5822 Lint {
5823 label: "const_nonzero_strict_ops",
5824 description: r##"# `const_nonzero_strict_ops`
5825
5826
5827
5828The tracking issue for this feature is: [#164850]
5829
5830[#164850]: https://github.com/rust-lang/rust/issues/164850
5831
5832------------------------
5833"##,
5834 default_severity: Severity::Allow,
5835 warn_since: None,
5836 deny_since: None,
5837 },
5838 Lint {
5839 label: "const_ops",
5840 description: r##"# `const_ops`
5841
5842
5843
5844The tracking issue for this feature is: [#143802]
5845
5846[#143802]: https://github.com/rust-lang/rust/issues/143802
5847
5848------------------------
5849"##,
5850 default_severity: Severity::Allow,
5851 warn_since: None,
5852 deny_since: None,
5853 },
5854 Lint {
5855 label: "const_option_ops",
5856 description: r##"# `const_option_ops`
5857
5858
5859
5860The tracking issue for this feature is: [#143956]
5861
5862[#143956]: https://github.com/rust-lang/rust/issues/143956
5863
5864------------------------
5865"##,
5866 default_severity: Severity::Allow,
5867 warn_since: None,
5868 deny_since: None,
5869 },
5870 Lint {
5871 label: "const_param_ty_trait",
5872 description: r##"# `const_param_ty_trait`
5873
5874
5875
5876The tracking issue for this feature is: [#95174]
5877
5878[#95174]: https://github.com/rust-lang/rust/issues/95174
5879
5880------------------------
5881"##,
5882 default_severity: Severity::Allow,
5883 warn_since: None,
5884 deny_since: None,
5885 },
5886 Lint {
5887 label: "const_param_ty_unchecked",
5888 description: r##"# `const_param_ty_unchecked`
5889
5890Allows skipping `ConstParamTy_` trait implementation checks
5891
5892This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
5893
5894------------------------
5895"##,
5896 default_severity: Severity::Allow,
5897 warn_since: None,
5898 deny_since: None,
5899 },
5900 Lint {
5901 label: "const_path_separators",
5902 description: r##"# `const_path_separators`
5903
5904
5905
5906The tracking issue for this feature is: [#153106]
5907
5908[#153106]: https://github.com/rust-lang/rust/issues/153106
5909
5910------------------------
5911"##,
5912 default_severity: Severity::Allow,
5913 warn_since: None,
5914 deny_since: None,
5915 },
5916 Lint {
5917 label: "const_precise_live_drops",
5918 description: r##"# `const_precise_live_drops`
5919
5920Be more precise when looking for live drops in a const context.
5921
5922The tracking issue for this feature is: [#73255]
5923
5924[#73255]: https://github.com/rust-lang/rust/issues/73255
5925
5926------------------------
5927"##,
5928 default_severity: Severity::Allow,
5929 warn_since: None,
5930 deny_since: None,
5931 },
5932 Lint {
5933 label: "const_range",
5934 description: r##"# `const_range`
5935
5936
5937
5938This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
5939
5940------------------------
5941"##,
5942 default_severity: Severity::Allow,
5943 warn_since: None,
5944 deny_since: None,
5945 },
5946 Lint {
5947 label: "const_range_bounds",
5948 description: r##"# `const_range_bounds`
5949
5950
5951
5952The tracking issue for this feature is: [#108082]
5953
5954[#108082]: https://github.com/rust-lang/rust/issues/108082
5955
5956------------------------
5957"##,
5958 default_severity: Severity::Allow,
5959 warn_since: None,
5960 deny_since: None,
5961 },
5962 Lint {
5963 label: "const_raw_ptr_comparison",
5964 description: r##"# `const_raw_ptr_comparison`
5965
5966
5967
5968The tracking issue for this feature is: [#53020]
5969
5970[#53020]: https://github.com/rust-lang/rust/issues/53020
5971
5972------------------------
5973"##,
5974 default_severity: Severity::Allow,
5975 warn_since: None,
5976 deny_since: None,
5977 },
5978 Lint {
5979 label: "const_ref_cell",
5980 description: r##"# `const_ref_cell`
5981
5982
5983
5984The tracking issue for this feature is: [#137844]
5985
5986[#137844]: https://github.com/rust-lang/rust/issues/137844
5987
5988------------------------
5989"##,
5990 default_severity: Severity::Allow,
5991 warn_since: None,
5992 deny_since: None,
5993 },
5994 Lint {
5995 label: "const_result_trait_fn",
5996 description: r##"# `const_result_trait_fn`
5997
5998
5999
6000The tracking issue for this feature is: [#144211]
6001
6002[#144211]: https://github.com/rust-lang/rust/issues/144211
6003
6004------------------------
6005"##,
6006 default_severity: Severity::Allow,
6007 warn_since: None,
6008 deny_since: None,
6009 },
6010 Lint {
6011 label: "const_result_unwrap_unchecked",
6012 description: r##"# `const_result_unwrap_unchecked`
6013
6014
6015
6016The tracking issue for this feature is: [#148714]
6017
6018[#148714]: https://github.com/rust-lang/rust/issues/148714
6019
6020------------------------
6021"##,
6022 default_severity: Severity::Allow,
6023 warn_since: None,
6024 deny_since: None,
6025 },
6026 Lint {
6027 label: "const_select_unpredictable",
6028 description: r##"# `const_select_unpredictable`
6029
6030
6031
6032The tracking issue for this feature is: [#145938]
6033
6034[#145938]: https://github.com/rust-lang/rust/issues/145938
6035
6036------------------------
6037"##,
6038 default_severity: Severity::Allow,
6039 warn_since: None,
6040 deny_since: None,
6041 },
6042 Lint {
6043 label: "const_slice_from_mut_ptr_range",
6044 description: r##"# `const_slice_from_mut_ptr_range`
6045
6046
6047
6048The tracking issue for this feature is: [#89792]
6049
6050[#89792]: https://github.com/rust-lang/rust/issues/89792
6051
6052------------------------
6053"##,
6054 default_severity: Severity::Allow,
6055 warn_since: None,
6056 deny_since: None,
6057 },
6058 Lint {
6059 label: "const_slice_from_ptr_range",
6060 description: r##"# `const_slice_from_ptr_range`
6061
6062
6063
6064The tracking issue for this feature is: [#89792]
6065
6066[#89792]: https://github.com/rust-lang/rust/issues/89792
6067
6068------------------------
6069"##,
6070 default_severity: Severity::Allow,
6071 warn_since: None,
6072 deny_since: None,
6073 },
6074 Lint {
6075 label: "const_slice_make_iter",
6076 description: r##"# `const_slice_make_iter`
6077
6078
6079
6080The tracking issue for this feature is: [#137737]
6081
6082[#137737]: https://github.com/rust-lang/rust/issues/137737
6083
6084------------------------
6085"##,
6086 default_severity: Severity::Allow,
6087 warn_since: None,
6088 deny_since: None,
6089 },
6090 Lint {
6091 label: "const_split_off_first_last",
6092 description: r##"# `const_split_off_first_last`
6093
6094
6095
6096The tracking issue for this feature is: [#138539]
6097
6098[#138539]: https://github.com/rust-lang/rust/issues/138539
6099
6100------------------------
6101"##,
6102 default_severity: Severity::Allow,
6103 warn_since: None,
6104 deny_since: None,
6105 },
6106 Lint {
6107 label: "const_swap_with_slice",
6108 description: r##"# `const_swap_with_slice`
6109
6110
6111
6112The tracking issue for this feature is: [#142204]
6113
6114[#142204]: https://github.com/rust-lang/rust/issues/142204
6115
6116------------------------
6117"##,
6118 default_severity: Severity::Allow,
6119 warn_since: None,
6120 deny_since: None,
6121 },
6122 Lint {
6123 label: "const_trait_impl",
6124 description: r##"# `const_trait_impl`
6125
6126Allows `impl const Trait for T` syntax.
6127
6128The tracking issue for this feature is: [#143874]
6129
6130[#143874]: https://github.com/rust-lang/rust/issues/143874
6131
6132------------------------
6133"##,
6134 default_severity: Severity::Allow,
6135 warn_since: None,
6136 deny_since: None,
6137 },
6138 Lint {
6139 label: "const_try",
6140 description: r##"# `const_try`
6141
6142Allows the `?` operator in const contexts.
6143
6144The tracking issue for this feature is: [#74935]
6145
6146[#74935]: https://github.com/rust-lang/rust/issues/74935
6147
6148------------------------
6149"##,
6150 default_severity: Severity::Allow,
6151 warn_since: None,
6152 deny_since: None,
6153 },
6154 Lint {
6155 label: "const_try_residual",
6156 description: r##"# `const_try_residual`
6157
6158
6159
6160The tracking issue for this feature is: [#91285]
6161
6162[#91285]: https://github.com/rust-lang/rust/issues/91285
6163
6164------------------------
6165"##,
6166 default_severity: Severity::Allow,
6167 warn_since: None,
6168 deny_since: None,
6169 },
6170 Lint {
6171 label: "const_type_name",
6172 description: r##"# `const_type_name`
6173
6174
6175
6176The tracking issue for this feature is: [#63084]
6177
6178[#63084]: https://github.com/rust-lang/rust/issues/63084
6179
6180------------------------
6181"##,
6182 default_severity: Severity::Allow,
6183 warn_since: None,
6184 deny_since: None,
6185 },
6186 Lint {
6187 label: "const_unsigned_bigint_helpers",
6188 description: r##"# `const_unsigned_bigint_helpers`
6189
6190
6191
6192The tracking issue for this feature is: [#152015]
6193
6194[#152015]: https://github.com/rust-lang/rust/issues/152015
6195
6196------------------------
6197"##,
6198 default_severity: Severity::Allow,
6199 warn_since: None,
6200 deny_since: None,
6201 },
6202 Lint {
6203 label: "const_volatile",
6204 description: r##"# `const_volatile`
6205
6206
6207
6208The tracking issue for this feature is: [#159094]
6209
6210[#159094]: https://github.com/rust-lang/rust/issues/159094
6211
6212------------------------
6213"##,
6214 default_severity: Severity::Allow,
6215 warn_since: None,
6216 deny_since: None,
6217 },
6218 Lint {
6219 label: "container_error_extra",
6220 description: r##"# `container_error_extra`
6221
6222
6223
6224This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
6225
6226------------------------
6227"##,
6228 default_severity: Severity::Allow,
6229 warn_since: None,
6230 deny_since: None,
6231 },
6232 Lint {
6233 label: "context_ext",
6234 description: r##"# `context_ext`
6235
6236
6237
6238The tracking issue for this feature is: [#123392]
6239
6240[#123392]: https://github.com/rust-lang/rust/issues/123392
6241
6242------------------------
6243"##,
6244 default_severity: Severity::Allow,
6245 warn_since: None,
6246 deny_since: None,
6247 },
6248 Lint {
6249 label: "contracts",
6250 description: r##"# `contracts`
6251
6252Allows use of contracts attributes.
6253
6254The tracking issue for this feature is: [#128044]
6255
6256[#128044]: https://github.com/rust-lang/rust/issues/128044
6257
6258------------------------
6259"##,
6260 default_severity: Severity::Allow,
6261 warn_since: None,
6262 deny_since: None,
6263 },
6264 Lint {
6265 label: "contracts_internals",
6266 description: r##"# `contracts_internals`
6267
6268Allows access to internal machinery used to implement contracts.
6269
6270The tracking issue for this feature is: [#128044]
6271
6272[#128044]: https://github.com/rust-lang/rust/issues/128044
6273
6274------------------------
6275"##,
6276 default_severity: Severity::Allow,
6277 warn_since: None,
6278 deny_since: None,
6279 },
6280 Lint {
6281 label: "control_flow_into_value",
6282 description: r##"# `control_flow_into_value`
6283
6284
6285
6286The tracking issue for this feature is: [#137461]
6287
6288[#137461]: https://github.com/rust-lang/rust/issues/137461
6289
6290------------------------
6291"##,
6292 default_severity: Severity::Allow,
6293 warn_since: None,
6294 deny_since: None,
6295 },
6296 Lint {
6297 label: "convert_float_to_int",
6298 description: r##"# `convert_float_to_int`
6299
6300
6301
6302The tracking issue for this feature is: [#67057]
6303
6304[#67057]: https://github.com/rust-lang/rust/issues/67057
6305
6306------------------------
6307"##,
6308 default_severity: Severity::Allow,
6309 warn_since: None,
6310 deny_since: None,
6311 },
6312 Lint {
6313 label: "copied_into_inner",
6314 description: r##"# `copied_into_inner`
6315
6316
6317
6318This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
6319
6320------------------------
6321"##,
6322 default_severity: Severity::Allow,
6323 warn_since: None,
6324 deny_since: None,
6325 },
6326 Lint {
6327 label: "core_float_math",
6328 description: r##"# `core_float_math`
6329
6330
6331
6332The tracking issue for this feature is: [#137578]
6333
6334[#137578]: https://github.com/rust-lang/rust/issues/137578
6335
6336------------------------
6337"##,
6338 default_severity: Severity::Allow,
6339 warn_since: None,
6340 deny_since: None,
6341 },
6342 Lint {
6343 label: "core_intrinsics",
6344 description: r##"# `core_intrinsics`
6345
6346This feature is internal to the Rust compiler and is not intended for general use.
6347
6348------------------------
6349"##,
6350 default_severity: Severity::Allow,
6351 warn_since: None,
6352 deny_since: None,
6353 },
6354 Lint {
6355 label: "core_intrinsics_fallbacks",
6356 description: r##"# `core_intrinsics_fallbacks`
6357
6358
6359
6360This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
6361
6362------------------------
6363"##,
6364 default_severity: Severity::Allow,
6365 warn_since: None,
6366 deny_since: None,
6367 },
6368 Lint {
6369 label: "core_io",
6370 description: r##"# `core_io`
6371
6372
6373
6374The tracking issue for this feature is: [#154046]
6375
6376[#154046]: https://github.com/rust-lang/rust/issues/154046
6377
6378------------------------
6379"##,
6380 default_severity: Severity::Allow,
6381 warn_since: None,
6382 deny_since: None,
6383 },
6384 Lint {
6385 label: "core_io_borrowed_buf",
6386 description: r##"# `core_io_borrowed_buf`
6387
6388
6389
6390The tracking issue for this feature is: [#117693]
6391
6392[#117693]: https://github.com/rust-lang/rust/issues/117693
6393
6394------------------------
6395"##,
6396 default_severity: Severity::Allow,
6397 warn_since: None,
6398 deny_since: None,
6399 },
6400 Lint {
6401 label: "core_io_internals",
6402 description: r##"# `core_io_internals`
6403
6404
6405
6406This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
6407
6408------------------------
6409"##,
6410 default_severity: Severity::Allow,
6411 warn_since: None,
6412 deny_since: None,
6413 },
6414 Lint {
6415 label: "core_os",
6416 description: r##"# `core_os`
6417
6418
6419
6420This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
6421
6422------------------------
6423"##,
6424 default_severity: Severity::Allow,
6425 warn_since: None,
6426 deny_since: None,
6427 },
6428 Lint {
6429 label: "core_private_bignum",
6430 description: r##"# `core_private_bignum`
6431
6432This feature is internal to the Rust compiler and is not intended for general use.
6433
6434------------------------
6435"##,
6436 default_severity: Severity::Allow,
6437 warn_since: None,
6438 deny_since: None,
6439 },
6440 Lint {
6441 label: "core_private_diy_float",
6442 description: r##"# `core_private_diy_float`
6443
6444This feature is internal to the Rust compiler and is not intended for general use.
6445
6446------------------------
6447"##,
6448 default_severity: Severity::Allow,
6449 warn_since: None,
6450 deny_since: None,
6451 },
6452 Lint {
6453 label: "coroutine_clone",
6454 description: r##"# `coroutine_clone`
6455
6456Allows coroutines to be cloned.
6457
6458The tracking issue for this feature is: [#95360]
6459
6460[#95360]: https://github.com/rust-lang/rust/issues/95360
6461
6462------------------------
6463"##,
6464 default_severity: Severity::Allow,
6465 warn_since: None,
6466 deny_since: None,
6467 },
6468 Lint {
6469 label: "coroutine_trait",
6470 description: r##"# `coroutine_trait`
6471
6472
6473
6474The tracking issue for this feature is: [#43122]
6475
6476[#43122]: https://github.com/rust-lang/rust/issues/43122
6477
6478------------------------
6479"##,
6480 default_severity: Severity::Allow,
6481 warn_since: None,
6482 deny_since: None,
6483 },
6484 Lint {
6485 label: "coroutines",
6486 description: r##"# `coroutines`
6487
6488The tracking issue for this feature is: [#43122]
6489
6490[#43122]: https://github.com/rust-lang/rust/issues/43122
6491
6492------------------------
6493
6494The `coroutines` feature gate in Rust allows you to define coroutine or
6495coroutine literals. A coroutine is a "resumable function" that syntactically
6496resembles a closure but compiles to much different semantics in the compiler
6497itself. The primary feature of a coroutine is that it can be suspended during
6498execution to be resumed at a later date. Coroutines use the `yield` keyword to
6499"return", and then the caller can `resume` a coroutine to resume execution just
6500after the `yield` keyword.
6501
6502Coroutines are an extra-unstable feature in the compiler right now. Added in
6503[RFC 2033] they're mostly intended right now as a information/constraint
6504gathering phase. The intent is that experimentation can happen on the nightly
6505compiler before actual stabilization. A further RFC will be required to
6506stabilize coroutines and will likely contain at least a few small
6507tweaks to the overall design.
6508
6509[RFC 2033]: https://github.com/rust-lang/rfcs/pull/2033
6510
6511A syntactical example of a coroutine is:
6512
6513```rust
6514#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
6515
6516use std::ops::{Coroutine, CoroutineState};
6517use std::pin::Pin;
6518
6519fn main() {
6520 let mut coroutine = #[coroutine] || {
6521 yield 1;
6522 return "foo"
6523 };
6524
6525 match Pin::new(&mut coroutine).resume(()) {
6526 CoroutineState::Yielded(1) => {}
6527 _ => panic!("unexpected value from resume"),
6528 }
6529 match Pin::new(&mut coroutine).resume(()) {
6530 CoroutineState::Complete("foo") => {}
6531 _ => panic!("unexpected value from resume"),
6532 }
6533}
6534```
6535
6536Coroutines are closure-like literals which are annotated with `#[coroutine]`
6537and can contain a `yield` statement. The
6538`yield` statement takes an optional expression of a value to yield out of the
6539coroutine. All coroutine literals implement the `Coroutine` trait in the
6540`std::ops` module. The `Coroutine` trait has one main method, `resume`, which
6541resumes execution of the coroutine at the previous suspension point.
6542
6543An example of the control flow of coroutines is that the following example
6544prints all numbers in order:
6545
6546```rust
6547#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
6548
6549use std::ops::Coroutine;
6550use std::pin::Pin;
6551
6552fn main() {
6553 let mut coroutine = #[coroutine] || {
6554 println!("2");
6555 yield;
6556 println!("4");
6557 };
6558
6559 println!("1");
6560 Pin::new(&mut coroutine).resume(());
6561 println!("3");
6562 Pin::new(&mut coroutine).resume(());
6563 println!("5");
6564}
6565```
6566
6567At this time the main use case of coroutines is an implementation
6568primitive for `async`/`await` and `gen` syntax, but coroutines
6569will likely be extended to other primitives in the future.
6570Feedback on the design and usage is always appreciated!
6571
6572### The `Coroutine` trait
6573
6574The `Coroutine` trait in `std::ops` currently looks like:
6575
6576```rust
6577# #![feature(arbitrary_self_types, coroutine_trait)]
6578# use std::ops::CoroutineState;
6579# use std::pin::Pin;
6580
6581pub trait Coroutine<R = ()> {
6582 type Yield;
6583 type Return;
6584 fn resume(self: Pin<&mut Self>, resume: R) -> CoroutineState<Self::Yield, Self::Return>;
6585}
6586```
6587
6588The `Coroutine::Yield` type is the type of values that can be yielded with the
6589`yield` statement. The `Coroutine::Return` type is the returned type of the
6590coroutine. This is typically the last expression in a coroutine's definition or
6591any value passed to `return` in a coroutine. The `resume` function is the entry
6592point for executing the `Coroutine` itself.
6593
6594The return value of `resume`, `CoroutineState`, looks like:
6595
6596```rust
6597pub enum CoroutineState<Y, R> {
6598 Yielded(Y),
6599 Complete(R),
6600}
6601```
6602
6603The `Yielded` variant indicates that the coroutine can later be resumed. This
6604corresponds to a `yield` point in a coroutine. The `Complete` variant indicates
6605that the coroutine is complete and cannot be resumed again. Calling `resume`
6606after a coroutine has returned `Complete` will likely result in a panic of the
6607program.
6608
6609### Closure-like semantics
6610
6611The closure-like syntax for coroutines alludes to the fact that they also have
6612closure-like semantics. Namely:
6613
6614* When created, a coroutine executes no code. A closure literal does not
6615 actually execute any of the closure's code on construction, and similarly a
6616 coroutine literal does not execute any code inside the coroutine when
6617 constructed.
6618
6619* Coroutines can capture outer variables by reference or by move, and this can
6620 be tweaked with the `move` keyword at the beginning of the closure. Like
6621 closures all coroutines will have an implicit environment which is inferred by
6622 the compiler. Outer variables can be moved into a coroutine for use as the
6623 coroutine progresses.
6624
6625* Coroutine literals produce a value with a unique type which implements the
6626 `std::ops::Coroutine` trait. This allows actual execution of the coroutine
6627 through the `Coroutine::resume` method as well as also naming it in return
6628 types and such.
6629
6630* Traits like `Send` and `Sync` are automatically implemented for a `Coroutine`
6631 depending on the captured variables of the environment. Unlike closures,
6632 coroutines also depend on variables live across suspension points. This means
6633 that although the ambient environment may be `Send` or `Sync`, the coroutine
6634 itself may not be due to internal variables live across `yield` points being
6635 not-`Send` or not-`Sync`. Note that coroutines do
6636 not implement traits like `Copy` or `Clone` automatically.
6637
6638* Whenever a coroutine is dropped it will drop all captured environment
6639 variables.
6640
6641### Coroutines as state machines
6642
6643In the compiler, coroutines are currently compiled as state machines. Each
6644`yield` expression will correspond to a different state that stores all live
6645variables over that suspension point. Resumption of a coroutine will dispatch on
6646the current state and then execute internally until a `yield` is reached, at
6647which point all state is saved off in the coroutine and a value is returned.
6648
6649Let's take a look at an example to see what's going on here:
6650
6651```rust
6652#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
6653
6654use std::ops::Coroutine;
6655use std::pin::Pin;
6656
6657fn main() {
6658 let ret = "foo";
6659 let mut coroutine = #[coroutine] move || {
6660 yield 1;
6661 return ret
6662 };
6663
6664 Pin::new(&mut coroutine).resume(());
6665 Pin::new(&mut coroutine).resume(());
6666}
6667```
6668
6669This coroutine literal will compile down to something similar to:
6670
6671```rust
6672#![feature(arbitrary_self_types, coroutine_trait)]
6673
6674use std::ops::{Coroutine, CoroutineState};
6675use std::pin::Pin;
6676
6677fn main() {
6678 let ret = "foo";
6679 let mut coroutine = {
6680 enum __Coroutine {
6681 Start(&'static str),
6682 Yield1(&'static str),
6683 Done,
6684 }
6685
6686 impl Coroutine for __Coroutine {
6687 type Yield = i32;
6688 type Return = &'static str;
6689
6690 fn resume(mut self: Pin<&mut Self>, resume: ()) -> CoroutineState<i32, &'static str> {
6691 use std::mem;
6692 match mem::replace(&mut *self, __Coroutine::Done) {
6693 __Coroutine::Start(s) => {
6694 *self = __Coroutine::Yield1(s);
6695 CoroutineState::Yielded(1)
6696 }
6697
6698 __Coroutine::Yield1(s) => {
6699 *self = __Coroutine::Done;
6700 CoroutineState::Complete(s)
6701 }
6702
6703 __Coroutine::Done => {
6704 panic!("coroutine resumed after completion")
6705 }
6706 }
6707 }
6708 }
6709
6710 __Coroutine::Start(ret)
6711 };
6712
6713 Pin::new(&mut coroutine).resume(());
6714 Pin::new(&mut coroutine).resume(());
6715}
6716```
6717
6718Notably here we can see that the compiler is generating a fresh type,
6719`__Coroutine` in this case. This type has a number of states (represented here
6720as an `enum`) corresponding to each of the conceptual states of the coroutine.
6721At the beginning we're closing over our outer variable `foo` and then that
6722variable is also live over the `yield` point, so it's stored in both states.
6723
6724When the coroutine starts it'll immediately yield 1, but it saves off its state
6725just before it does so indicating that it has reached the yield point. Upon
6726resuming again we'll execute the `return ret` which returns the `Complete`
6727state.
6728
6729Here we can also note that the `Done` state, if resumed, panics immediately as
6730it's invalid to resume a completed coroutine. It's also worth noting that this
6731is just a rough desugaring, not a normative specification for what the compiler
6732does.
6733"##,
6734 default_severity: Severity::Allow,
6735 warn_since: None,
6736 deny_since: None,
6737 },
6738 Lint {
6739 label: "covariant_unsafe_cell",
6740 description: r##"# `covariant_unsafe_cell`
6741
6742
6743
6744The tracking issue for this feature is: [#159735]
6745
6746[#159735]: https://github.com/rust-lang/rust/issues/159735
6747
6748------------------------
6749"##,
6750 default_severity: Severity::Allow,
6751 warn_since: None,
6752 deny_since: None,
6753 },
6754 Lint {
6755 label: "coverage_attribute",
6756 description: r##"# `coverage_attribute`
6757
6758The tracking issue for this feature is: [#84605]
6759
6760[#84605]: https://github.com/rust-lang/rust/issues/84605
6761
6762---
6763
6764The `coverage` attribute can be used to selectively disable coverage
6765instrumentation in an annotated function. This might be useful to:
6766
6767- Avoid instrumentation overhead in a performance critical function
6768- Avoid generating coverage for a function that is not meant to be executed,
6769 but still target 100% coverage for the rest of the program.
6770
6771## Example
6772
6773```rust
6774#![feature(coverage_attribute)]
6775
6776// `foo()` will get coverage instrumentation (by default)
6777fn foo() {
6778 // ...
6779}
6780
6781#[coverage(off)]
6782fn bar() {
6783 // ...
6784}
6785```
6786"##,
6787 default_severity: Severity::Allow,
6788 warn_since: None,
6789 deny_since: None,
6790 },
6791 Lint {
6792 label: "cow_is_borrowed",
6793 description: r##"# `cow_is_borrowed`
6794
6795
6796
6797The tracking issue for this feature is: [#65143]
6798
6799[#65143]: https://github.com/rust-lang/rust/issues/65143
6800
6801------------------------
6802"##,
6803 default_severity: Severity::Allow,
6804 warn_since: None,
6805 deny_since: None,
6806 },
6807 Lint {
6808 label: "csky_target_feature",
6809 description: r##"# `csky_target_feature`
6810
6811Target features on csky.
6812
6813The tracking issue for this feature is: [#150248]
6814
6815[#150248]: https://github.com/rust-lang/rust/issues/150248
6816
6817------------------------
6818"##,
6819 default_severity: Severity::Allow,
6820 warn_since: None,
6821 deny_since: None,
6822 },
6823 Lint {
6824 label: "cstr_bytes",
6825 description: r##"# `cstr_bytes`
6826
6827
6828
6829The tracking issue for this feature is: [#112115]
6830
6831[#112115]: https://github.com/rust-lang/rust/issues/112115
6832
6833------------------------
6834"##,
6835 default_severity: Severity::Allow,
6836 warn_since: None,
6837 deny_since: None,
6838 },
6839 Lint {
6840 label: "cstr_internals",
6841 description: r##"# `cstr_internals`
6842
6843
6844
6845This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
6846
6847------------------------
6848"##,
6849 default_severity: Severity::Allow,
6850 warn_since: None,
6851 deny_since: None,
6852 },
6853 Lint {
6854 label: "current_thread_id",
6855 description: r##"# `current_thread_id`
6856
6857
6858
6859The tracking issue for this feature is: [#147194]
6860
6861[#147194]: https://github.com/rust-lang/rust/issues/147194
6862
6863------------------------
6864"##,
6865 default_severity: Severity::Allow,
6866 warn_since: None,
6867 deny_since: None,
6868 },
6869 Lint {
6870 label: "cursor_split",
6871 description: r##"# `cursor_split`
6872
6873
6874
6875The tracking issue for this feature is: [#86369]
6876
6877[#86369]: https://github.com/rust-lang/rust/issues/86369
6878
6879------------------------
6880"##,
6881 default_severity: Severity::Allow,
6882 warn_since: None,
6883 deny_since: None,
6884 },
6885 Lint {
6886 label: "custom_inner_attributes",
6887 description: r##"# `custom_inner_attributes`
6888
6889Allows non-builtin attributes in inner attribute position.
6890
6891The tracking issue for this feature is: [#54726]
6892
6893[#54726]: https://github.com/rust-lang/rust/issues/54726
6894
6895------------------------
6896"##,
6897 default_severity: Severity::Allow,
6898 warn_since: None,
6899 deny_since: None,
6900 },
6901 Lint {
6902 label: "custom_mir",
6903 description: r##"# `custom_mir`
6904
6905Allows writing custom MIR
6906
6907This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
6908
6909------------------------
6910"##,
6911 default_severity: Severity::Allow,
6912 warn_since: None,
6913 deny_since: None,
6914 },
6915 Lint {
6916 label: "custom_test_frameworks",
6917 description: r##"# `custom_test_frameworks`
6918
6919The tracking issue for this feature is: [#50297]
6920
6921[#50297]: https://github.com/rust-lang/rust/issues/50297
6922
6923------------------------
6924
6925The `custom_test_frameworks` feature allows the use of `#[test_case]` and `#![test_runner]`.
6926Any function, const, or static can be annotated with `#[test_case]` causing it to be aggregated (like `#[test]`)
6927and be passed to the test runner determined by the `#![test_runner]` crate attribute.
6928
6929```rust
6930#![feature(custom_test_frameworks)]
6931#![test_runner(my_runner)]
6932
6933fn my_runner(tests: &[&i32]) {
6934 for t in tests {
6935 if **t == 0 {
6936 println!("PASSED");
6937 } else {
6938 println!("FAILED");
6939 }
6940 }
6941}
6942
6943#[test_case]
6944const WILL_PASS: i32 = 0;
6945
6946#[test_case]
6947const WILL_FAIL: i32 = 4;
6948```
6949"##,
6950 default_severity: Severity::Allow,
6951 warn_since: None,
6952 deny_since: None,
6953 },
6954 Lint {
6955 label: "darwin_objc",
6956 description: r##"# `darwin_objc`
6957
6958
6959
6960The tracking issue for this feature is: [#145496]
6961
6962[#145496]: https://github.com/rust-lang/rust/issues/145496
6963
6964------------------------
6965"##,
6966 default_severity: Severity::Allow,
6967 warn_since: None,
6968 deny_since: None,
6969 },
6970 Lint {
6971 label: "deadline_api",
6972 description: r##"# `deadline_api`
6973
6974
6975
6976The tracking issue for this feature is: [#46316]
6977
6978[#46316]: https://github.com/rust-lang/rust/issues/46316
6979
6980------------------------
6981"##,
6982 default_severity: Severity::Allow,
6983 warn_since: None,
6984 deny_since: None,
6985 },
6986 Lint {
6987 label: "dec2flt",
6988 description: r##"# `dec2flt`
6989
6990This feature is internal to the Rust compiler and is not intended for general use.
6991
6992------------------------
6993"##,
6994 default_severity: Severity::Allow,
6995 warn_since: None,
6996 deny_since: None,
6997 },
6998 Lint {
6999 label: "decl_macro",
7000 description: r##"# `decl_macro`
7001
7002Allows declarative macros 2.0 (`macro`).
7003
7004The tracking issue for this feature is: [#39412]
7005
7006[#39412]: https://github.com/rust-lang/rust/issues/39412
7007
7008------------------------
7009"##,
7010 default_severity: Severity::Allow,
7011 warn_since: None,
7012 deny_since: None,
7013 },
7014 Lint {
7015 label: "default_field_values",
7016 description: r##"# `default_field_values`
7017
7018The tracking issue for this feature is: [#132162]
7019
7020[#132162]: https://github.com/rust-lang/rust/issues/132162
7021
7022The RFC for this feature is: [#3681]
7023
7024[#3681]: https://rust-lang.github.io/rfcs/3681-default-field-values.html
7025
7026------------------------
7027
7028The `default_field_values` feature allows users to specify a const value for
7029individual fields in struct definitions, allowing those to be omitted from
7030initializers.
7031
7032## Examples
7033
7034```rust
7035#![feature(default_field_values)]
7036
7037#[derive(Default)]
7038struct Pet {
7039 name: Option<String>, // impl Default for Pet will use Default::default() for name
7040 age: i128 = 42, // impl Default for Pet will use the literal 42 for age
7041}
7042
7043fn main() {
7044 let a = Pet { name: Some(String::new()), .. }; // Pet { name: Some(""), age: 42 }
7045 let b = Pet::default(); // Pet { name: None, age: 42 }
7046 assert_eq!(a.age, b.age);
7047 // The following would be a compilation error: `name` needs to be specified
7048 // let _ = Pet { .. };
7049}
7050```
7051
7052## `#[derive(Default)]`
7053
7054When deriving Default, the provided values are then used. On enum variants,
7055the variant must still be marked with `#[default]` and have all its fields
7056with default values.
7057
7058```rust
7059#![feature(default_field_values)]
7060
7061#[derive(Default)]
7062enum A {
7063 #[default]
7064 B {
7065 x: i32 = 0,
7066 y: i32 = 0,
7067 },
7068 C,
7069}
7070```
7071
7072## Enum variants
7073
7074This feature also supports enum variants for both specifying default values
7075and `#[derive(Default)]`.
7076
7077## Interaction with `#[non_exhaustive]`
7078
7079A struct or enum variant marked with `#[non_exhaustive]` is not allowed to
7080have default field values.
7081
7082## Lints
7083
7084When manually implementing the `Default` trait for a type that has default
7085field values, if any of these are overridden in the impl the
7086`default_overrides_default_fields` lint will trigger. This lint is in place
7087to avoid surprising diverging behavior between `S { .. }` and
7088`S::default()`, where using the same type in both ways could result in
7089different values. The appropriate way to write a manual `Default`
7090implementation is to use the functional update syntax:
7091
7092```rust
7093#![feature(default_field_values)]
7094
7095struct Pet {
7096 name: String,
7097 age: i128 = 42, // impl Default for Pet will use the literal 42 for age
7098}
7099
7100impl Default for Pet {
7101 fn default() -> Pet {
7102 Pet {
7103 name: "no-name".to_string(),
7104 ..
7105 }
7106 }
7107}
7108```
7109"##,
7110 default_severity: Severity::Allow,
7111 warn_since: None,
7112 deny_since: None,
7113 },
7114 Lint {
7115 label: "default_ignorable",
7116 description: r##"# `default_ignorable`
7117
7118
7119
7120The tracking issue for this feature is: [#160583]
7121
7122[#160583]: https://github.com/rust-lang/rust/issues/160583
7123
7124------------------------
7125"##,
7126 default_severity: Severity::Allow,
7127 warn_since: None,
7128 deny_since: None,
7129 },
7130 Lint {
7131 label: "deprecated_suggestion",
7132 description: r##"# `deprecated_suggestion`
7133
7134Allows having using `suggestion` in the `#[deprecated]` attribute.
7135
7136The tracking issue for this feature is: [#94785]
7137
7138[#94785]: https://github.com/rust-lang/rust/issues/94785
7139
7140------------------------
7141"##,
7142 default_severity: Severity::Allow,
7143 warn_since: None,
7144 deny_since: None,
7145 },
7146 Lint {
7147 label: "deque_extend_front",
7148 description: r##"# `deque_extend_front`
7149
7150
7151
7152The tracking issue for this feature is: [#146975]
7153
7154[#146975]: https://github.com/rust-lang/rust/issues/146975
7155
7156------------------------
7157"##,
7158 default_severity: Severity::Allow,
7159 warn_since: None,
7160 deny_since: None,
7161 },
7162 Lint {
7163 label: "deref_patterns",
7164 description: r##"# `deref_patterns`
7165
7166The tracking issue for this feature is: [#87121]
7167
7168[#87121]: https://github.com/rust-lang/rust/issues/87121
7169
7170------------------------
7171
7172> **Note**: This feature supersedes `box_patterns`.
7173
7174This feature permits pattern matching on [smart pointers in the standard library] through their
7175`Deref` target types, either implicitly or with explicit `deref!(_)` patterns (the syntax of which
7176is currently a placeholder).
7177
7178```rust
7179#![feature(deref_patterns)]
7180
7181let mut v = vec![Box::new(Some(0))];
7182
7183// Implicit dereferences are inserted when a pattern can match against the
7184// result of repeatedly dereferencing but can't match against a smart
7185// pointer itself. This works alongside match ergonomics for references.
7186if let [Some(x)] = &mut v {
7187 *x += 1;
7188}
7189
7190// Explicit `deref!(_)` patterns may instead be used when finer control is
7191// needed, e.g. to dereference only a single smart pointer, or to bind the
7192// the result of dereferencing to a variable.
7193if let deref!([deref!(opt_x @ Some(1))]) = &mut v {
7194 opt_x.as_mut().map(|x| *x += 1);
7195}
7196
7197assert_eq!(v, [Box::new(Some(2))]);
7198```
7199
7200Without this feature, it may be necessary to introduce temporaries to represent dereferenced places
7201when matching on nested structures:
7202
7203```rust
7204let mut v = vec![Box::new(Some(0))];
7205if let [b] = &mut *v {
7206 if let Some(x) = &mut **b {
7207 *x += 1;
7208 }
7209}
7210if let [b] = &mut *v {
7211 if let opt_x @ Some(1) = &mut **b {
7212 opt_x.as_mut().map(|x| *x += 1);
7213 }
7214}
7215assert_eq!(v, [Box::new(Some(2))]);
7216```
7217
7218Deref patterns may move out of boxes:
7219
7220```rust
7221# #![feature(deref_patterns)]
7222struct NoCopy;
7223let deref!(x) = Box::new(NoCopy);
7224drop::<NoCopy>(x);
7225```
7226
7227Additionally, `deref_patterns` implements changes to string and byte string literal patterns,
7228allowing then to be used in deref patterns:
7229
7230```rust
7231# #![feature(deref_patterns)]
7232match ("test".to_string(), Box::from("test"), b"test".to_vec()) {
7233 ("test", "test", b"test") => {}
7234 _ => panic!(),
7235}
7236
7237// This works through multiple layers of reference and smart pointer:
7238match (&Box::new(&"test".to_string()), &&&"test") {
7239 ("test", "test") => {}
7240 _ => panic!(),
7241}
7242
7243// `deref!("...")` syntax may also be used:
7244match "test".to_string() {
7245 deref!("test") => {}
7246 _ => panic!(),
7247}
7248
7249// Matching on slices and arrays using literals is possible elsewhere as well:
7250match *"test" {
7251 "test" => {}
7252 _ => panic!(),
7253}
7254match *b"test" {
7255 b"test" => {}
7256 _ => panic!(),
7257}
7258match *(b"test" as &[u8]) {
7259 b"test" => {}
7260 _ => panic!(),
7261}
7262```
7263
7264[smart pointers in the standard library]: https://doc.rust-lang.org/std/ops/trait.DerefPure.html#implementors
7265"##,
7266 default_severity: Severity::Allow,
7267 warn_since: None,
7268 deny_since: None,
7269 },
7270 Lint {
7271 label: "deref_pure_trait",
7272 description: r##"# `deref_pure_trait`
7273
7274
7275
7276The tracking issue for this feature is: [#87121]
7277
7278[#87121]: https://github.com/rust-lang/rust/issues/87121
7279
7280------------------------
7281"##,
7282 default_severity: Severity::Allow,
7283 warn_since: None,
7284 deny_since: None,
7285 },
7286 Lint {
7287 label: "derive_clone_copy_internals",
7288 description: r##"# `derive_clone_copy_internals`
7289
7290This feature is internal to the Rust compiler and is not intended for general use.
7291
7292------------------------
7293"##,
7294 default_severity: Severity::Allow,
7295 warn_since: None,
7296 deny_since: None,
7297 },
7298 Lint {
7299 label: "derive_coerce_pointee",
7300 description: r##"# `derive_coerce_pointee`
7301
7302
7303
7304The tracking issue for this feature is: [#123430]
7305
7306[#123430]: https://github.com/rust-lang/rust/issues/123430
7307
7308------------------------
7309"##,
7310 default_severity: Severity::Allow,
7311 warn_since: None,
7312 deny_since: None,
7313 },
7314 Lint {
7315 label: "derive_const",
7316 description: r##"# `derive_const`
7317
7318
7319
7320The tracking issue for this feature is: [#143874]
7321
7322[#143874]: https://github.com/rust-lang/rust/issues/143874
7323
7324------------------------
7325"##,
7326 default_severity: Severity::Allow,
7327 warn_since: None,
7328 deny_since: None,
7329 },
7330 Lint {
7331 label: "derive_eq_internals",
7332 description: r##"# `derive_eq_internals`
7333
7334This feature is internal to the Rust compiler and is not intended for general use.
7335
7336------------------------
7337"##,
7338 default_severity: Severity::Allow,
7339 warn_since: None,
7340 deny_since: None,
7341 },
7342 Lint {
7343 label: "derive_from",
7344 description: r##"# `derive_from`
7345
7346Allows deriving the From trait on single-field structs.
7347
7348The tracking issue for this feature is: [#144889]
7349
7350[#144889]: https://github.com/rust-lang/rust/issues/144889
7351
7352------------------------
7353"##,
7354 default_severity: Severity::Allow,
7355 warn_since: None,
7356 deny_since: None,
7357 },
7358 Lint {
7359 label: "derive_macro_global_path",
7360 description: r##"# `derive_macro_global_path`
7361
7362
7363
7364The tracking issue for this feature is: [#154645]
7365
7366[#154645]: https://github.com/rust-lang/rust/issues/154645
7367
7368------------------------
7369"##,
7370 default_severity: Severity::Allow,
7371 warn_since: None,
7372 deny_since: None,
7373 },
7374 Lint {
7375 label: "diagnostic_on_const",
7376 description: r##"# `diagnostic_on_const`
7377
7378Allows giving non-const impls custom diagnostic messages if attempted to be used as const
7379
7380The tracking issue for this feature is: [#143874]
7381
7382[#143874]: https://github.com/rust-lang/rust/issues/143874
7383
7384------------------------
7385"##,
7386 default_severity: Severity::Allow,
7387 warn_since: None,
7388 deny_since: None,
7389 },
7390 Lint {
7391 label: "diagnostic_on_move",
7392 description: r##"# `diagnostic_on_move`
7393
7394The tracking issue for this feature is: [#154181]
7395
7396------------------------
7397
7398The `diagnostic_on_move` feature allows use of the `#[diagnostic::on_move]` attribute. It should be
7399placed on struct, enum and union declarations, though it is not an error to be located in other
7400positions. This attribute is a hint to the compiler to supplement the error message when the
7401annotated type is involved in a borrowcheck error.
7402
7403For example, [`File`] is annotated as such:
7404```rust
7405#![feature(diagnostic_on_move)]
7406
7407#[diagnostic::on_move(note = "you can use `File::try_clone` \
7408 to duplicate a `File` instance")]
7409pub struct File {
7410 // ...
7411}
7412```
7413
7414When you try to use a `File` after it's already been moved, it will helpfully tell you about `try_clone`.
7415
7416The message and label can also be customized:
7417
7418```rust
7419#![feature(diagnostic_on_move)]
7420
7421use std::marker::PhantomData;
7422
7423#[diagnostic::on_move(
7424 message = "`{Self}` cannot be used multiple times",
7425 label = "this token may only be used once",
7426 note = "you can create a new `Token` with `Token::conjure()`"
7427)]
7428pub struct Token<'brand> {
7429 spooky: PhantomData<&'brand ()>,
7430}
7431
7432impl Token<'_> {
7433 pub fn conjure<'u>() -> Token<'u> {
7434 Token {
7435 spooky: PhantomData,
7436 }
7437 }
7438}
7439```
7440The user may try to use it like this:
7441```rust,compile_fail,E0382
7442# #![feature(diagnostic_on_move)]
7443#
7444# use std::marker::PhantomData;
7445#
7446# #[diagnostic::on_move(
7447# message = "`{Self}` cannot be used multiple times",
7448# label = "this token may only be used once",
7449# note = "you can create a new `Token` with `Token::conjure()`"
7450# )]
7451# pub struct Token<'brand> {
7452# spooky: PhantomData<&'brand ()>,
7453# }
7454#
7455# impl Token<'_> {
7456# pub fn conjure<'u>() -> Token<'u> {
7457# Token {
7458# spooky: PhantomData,
7459# }
7460# }
7461# }
7462# fn main() {
7463let token = Token::conjure();
7464let _ = (token, token);
7465# }
7466```
7467This will result in the following error:
7468```text
7469error[E0382]: `Token` cannot be used multiple times
7470 --> src/main.rs:24:21
7471 |
7472 1 | let token = Token::conjure();
7473 | ----- this token may only be used once
7474 2 | let _ = (token, token);
7475 | ----- ^^^^^ value used here after move
7476 | |
7477 | value moved here
7478 |
7479 = note: you can create a new `Token` with `Token::conjure()`
7480```
7481
7482[`File`]: https://doc.rust-lang.org/nightly/std/fs/struct.File.html "File in std::fs"
7483[#154181]: https://github.com/rust-lang/rust/issues/154181 "Tracking Issue for #[diagnostic::on_move]"
7484"##,
7485 default_severity: Severity::Allow,
7486 warn_since: None,
7487 deny_since: None,
7488 },
7489 Lint {
7490 label: "diagnostic_on_type_error",
7491 description: r##"# `diagnostic_on_type_error`
7492
7493Allows giving custom types diagnostic messages on type errors
7494
7495The tracking issue for this feature is: [#155382]
7496
7497[#155382]: https://github.com/rust-lang/rust/issues/155382
7498
7499------------------------
7500"##,
7501 default_severity: Severity::Allow,
7502 warn_since: None,
7503 deny_since: None,
7504 },
7505 Lint {
7506 label: "diagnostic_on_unknown",
7507 description: r##"# `diagnostic_on_unknown`
7508
7509The tracking issue for this feature is: [#152900](https://github.com/rust-lang/rust/issues/152900)
7510
7511------------------------
7512
7513The `diagnostic_on_unknown` feature allows use of the `#[diagnostic::on_unknown]` attribute. It should be
7514placed on use and module declarations as well as the crate root, though it is not an error to be located in other
7515positions. This attribute is a hint to the compiler to supplement the error message when the
7516annotated declaration is involved in a name resolution error.
7517
7518Format parameters with the given named parameter will be replaced with the following text:
7519
7520- `{Unresolved}` — The `SimplePathSegment` of the import path that could not be resolved.
7521- `{this}` — The name of the annotated item. On `use` statements this is identical to `{unresolved}`.
7522
7523The original error message will not be suppressed but is emitted as a note instead.
7524
7525### On use declarations
7526
7527```rust,edition2018,compile_fail,E0432
7528#![feature(diagnostic_on_unknown)]
7529
7530#[diagnostic::on_unknown(
7531 message = "`{Unresolved}` doesn't exist",
7532 label = "you did something silly here"
7533)]
7534use doesnt_exist;
7535```
7536This will result in the following error:
7537```text
7538error[E0432]: `doesnt_exist` doesn't exist
7539 --> src/lib.rs:7:5
7540 |
75417 | use doesnt_exist;
7542 | ^^^^^^^^^^^^ you did something silly here
7543 |
7544 = note: unresolved import `doesnt_exist`
7545
7546For more information about this error, try `rustc --explain E0432`.
7547```
7548
7549### On module declarations
7550
7551```rust,edition2018,compile_fail,E0432
7552#![feature(diagnostic_on_unknown)]
7553
7554#[diagnostic::on_unknown(
7555 message = "module `{this}` is empty, there is no `{unresolved}` here",
7556 label = "can't import something from an empty module"
7557)]
7558mod empty {}
7559
7560use empty::what;
7561```
7562This will result in the following error:
7563
7564```text
7565error[E0432]: module `empty` is empty, there is no `what` here
7566 --> src/lib.rs:9:5
7567 |
75689 | use empty::what;
7569 | ^^^^^^^----
7570 | |
7571 | can't import something from an empty module
7572 |
7573 = note: unresolved import `empty::what`
7574```
7575
7576### On the crate root
7577
7578This additionally requires the `#![feature(custom_inner_attributes)]` feature:
7579
7580```rust,edition2018,compile_fail,E0432
7581#![feature(diagnostic_on_unknown)]
7582#![feature(custom_inner_attributes)]
7583#![diagnostic::on_unknown(message = "Say `{Unresolved}` again!")]
7584
7585use self::what;
7586```
7587### Example
7588
7589Consider the following pair of macros, one which creates a hidden module with a constant and another that reads it.
7590
7591```rust
7592#![feature(macro_metavar_expr, macro_attr)]
7593
7594macro_rules! instrument {
7595 attr() { $vis:vis fn $fn_name:ident ($($arg_name:ident : $arg_ty:ty),*) $(-> $ret:ty)? $body:block } => {
7596 $vis fn $fn_name ($($arg_name:$arg_ty),*) $(-> $ret)? $body
7597 #[doc(hidden)]
7598 $vis mod $fn_name {
7599 pub const LEN: usize = ${ count($arg_name) };
7600 }
7601 }
7602}
7603
7604macro_rules! count_args {
7605 ($name:ident) => {{
7606 $name::LEN
7607 }}
7608}
7609
7610#[instrument]
7611fn add(a: u8, b: u8) -> u8 {
7612 a + b
7613}
7614
7615fn main() {
7616 let n = count_args!(add);
7617 println!("`add` has {n} arguments");
7618}
7619```
7620
7621If the `#[instrument]` macro is omitted it will emit this confusing error:
7622```text
7623error[E0433]: cannot find module or crate `add` in this scope
7624 --> src/main.rs:25:25
7625 |
762625 | let n = count_args!(add);
7627 | ^^^ function `add` is not a crate or module
7628```
7629
7630`#[diagnostic::on_unknown]` can be used to customize this error message:
7631
7632```rust,edition2018,compile_fail,E0432
7633#![feature(diagnostic_on_unknown)]
7634# #![feature(macro_metavar_expr, macro_attr)]
7635#
7636# #[allow(unused_macros)]
7637# macro_rules! instrument {
7638# attr() { $vis:vis fn $fn_name:ident ($($arg_name:ident : $arg_ty:ty),*) $(-> $ret:ty)? $body:block } => {
7639# $vis fn $fn_name ($($arg_name:$arg_ty),*) $(-> $ret)? $body
7640# #[doc(hidden)]
7641# $vis mod $fn_name {
7642# pub const LEN: usize = ${ count($arg_name) };
7643# }
7644# }
7645# }
7646
7647macro_rules! count_args {
7648 ($name:ident) => {{
7649 #[diagnostic::on_unknown(
7650 message = "cannot count arguments of `{Unresolved}`",
7651 label = "`{Unresolved}` is not a function decorated \
7652 with the `#[instrument]` macro"
7653 )]
7654 use $name::LEN as length;
7655 length
7656 }}
7657}
7658
7659// #[instrument]
7660fn add(a: u8, b: u8) -> u8 {
7661 a + b
7662}
7663
7664fn main() {
7665 let n = count_args!(add);
7666 println!("`add` has {n} arguments");
7667}
7668```
7669This produces:
7670```text
7671error[E0432]: cannot count arguments of `add`
7672 --> src/main.rs:33:25
7673 |
767433 | let n = count_args!(add);
7675 | ^^^ `add` is not a function decorated with
7676 | the `#[instrument]` macro
7677 |
7678 = note: unresolved import `add`
7679```
7680
7681### Edition differences
7682
7683In the 2015 edition, use paths are relative to the crate root. For example, `use empty` will be resolved relative to the crate root and resolution will not encounter the `mod empty {}` declaration.
7684```rust,edition2015,compile_fail,E0432
7685#![feature(diagnostic_on_unknown)]
7686
7687mod foo {
7688 #[diagnostic::on_unknown(message = "oh oh")]
7689 mod empty {}
7690
7691 use empty::what;
7692}
7693```
7694
7695```text
7696error[E0432]: unresolved import `empty`
7697 --> src/main.rs:9:8
7698 |
76999 | use empty::what;
7700 | ^^^^^
7701 |
7702```
7703"##,
7704 default_severity: Severity::Allow,
7705 warn_since: None,
7706 deny_since: None,
7707 },
7708 Lint {
7709 label: "diagnostic_on_unmatched_args",
7710 description: r##"# `diagnostic_on_unmatched_args`
7711
7712The tracking issue for this feature is: [#155642]
7713
7714[#155642]: https://github.com/rust-lang/rust/issues/155642
7715
7716------------------------
7717
7718The `diagnostic_on_unmatched_args` feature adds the
7719`#[diagnostic::on_unmatched_args(...)]` attribute for declarative macros.
7720It lets a macro definition customize diagnostics for matcher failures after all arms have been
7721tried, such as incomplete invocations or trailing extra arguments.
7722
7723This attribute currently applies to declarative macros such as `macro_rules!` and `pub macro`.
7724It is currently used for errors emitted by declarative macro matching itself; fragment parser
7725errors still use their existing diagnostics.
7726
7727```rust,compile_fail
7728#![feature(diagnostic_on_unmatched_args)]
7729
7730#[diagnostic::on_unmatched_args(
7731 message = "invalid arguments to {this} macro invocation",
7732 label = "expected a type and value here",
7733 note = "this macro expects a type and a value, like `pair!(u8, 0)`",
7734 note = "see <link/to/docs>",
7735)]
7736macro_rules! pair {
7737 ($ty:ty, $value:expr) => {};
7738}
7739
7740pair!(u8);
7741```
7742
7743This emits output like:
7744
7745```text
7746error: invalid arguments to pair macro invocation
7747 --> example.rs:13:9
7748 |
77499 | macro_rules! pair {
7750 | ----------------- when calling this macro
7751...
775213 | pair!(u8);
7753 | ^ expected a type and value here
7754 |
7755note: while trying to match `,`
7756 --> example.rs:10:12
7757 |
775810 | ($ty:ty, $value:expr) => {};
7759 | ^
7760 = note: this macro expects a type and a value, like `pair!(u8, 0)`
7761 = note: see <link/to/docs>
7762```
7763"##,
7764 default_severity: Severity::Allow,
7765 warn_since: None,
7766 deny_since: None,
7767 },
7768 Lint {
7769 label: "diagnostic_opaque",
7770 description: r##"# `diagnostic_opaque`
7771
7772Used by macros to not show their bodies in error messages. No-op with `-Z macro-backtrace`.
7773
7774The tracking issue for this feature is: [#158813]
7775
7776[#158813]: https://github.com/rust-lang/rust/issues/158813
7777
7778------------------------
7779"##,
7780 default_severity: Severity::Allow,
7781 warn_since: None,
7782 deny_since: None,
7783 },
7784 Lint {
7785 label: "dir_entry_ext2",
7786 description: r##"# `dir_entry_ext2`
7787
7788
7789
7790The tracking issue for this feature is: [#85573]
7791
7792[#85573]: https://github.com/rust-lang/rust/issues/85573
7793
7794------------------------
7795"##,
7796 default_severity: Severity::Allow,
7797 warn_since: None,
7798 deny_since: None,
7799 },
7800 Lint {
7801 label: "dirfd",
7802 description: r##"# `dirfd`
7803
7804
7805
7806The tracking issue for this feature is: [#120426]
7807
7808[#120426]: https://github.com/rust-lang/rust/issues/120426
7809
7810------------------------
7811"##,
7812 default_severity: Severity::Allow,
7813 warn_since: None,
7814 deny_since: None,
7815 },
7816 Lint {
7817 label: "discriminant_kind",
7818 description: r##"# `discriminant_kind`
7819
7820
7821
7822This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
7823
7824------------------------
7825"##,
7826 default_severity: Severity::Allow,
7827 warn_since: None,
7828 deny_since: None,
7829 },
7830 Lint {
7831 label: "discriminant_ord",
7832 description: r##"# `discriminant_ord`
7833
7834
7835
7836The tracking issue for this feature is: [#165438]
7837
7838[#165438]: https://github.com/rust-lang/rust/issues/165438
7839
7840------------------------
7841"##,
7842 default_severity: Severity::Allow,
7843 warn_since: None,
7844 deny_since: None,
7845 },
7846 Lint {
7847 label: "disjoint_bitor",
7848 description: r##"# `disjoint_bitor`
7849
7850
7851
7852The tracking issue for this feature is: [#135758]
7853
7854[#135758]: https://github.com/rust-lang/rust/issues/135758
7855
7856------------------------
7857"##,
7858 default_severity: Severity::Allow,
7859 warn_since: None,
7860 deny_since: None,
7861 },
7862 Lint {
7863 label: "dispatch_from_dyn",
7864 description: r##"# `dispatch_from_dyn`
7865
7866
7867
7868This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
7869
7870------------------------
7871"##,
7872 default_severity: Severity::Allow,
7873 warn_since: None,
7874 deny_since: None,
7875 },
7876 Lint {
7877 label: "doc_cfg",
7878 description: r##"# `doc_cfg`
7879
7880The tracking issue for this feature is: [#43781]
7881
7882------
7883
7884The `doc_cfg` feature allows an API be documented as only available in some specific platforms.
7885This attribute has two effects:
7886
78871. In the annotated item's documentation, there will be a message saying "Available on
7888 (platform) only".
7889
78902. The item's doc-tests will only run on the specific platform.
7891
7892In addition to allowing the use of the `#[doc(cfg)]` attribute, this feature enables the use of a
7893special conditional compilation flag, `#[cfg(doc)]`, set whenever building documentation on your
7894crate.
7895
7896This feature was introduced as part of PR [#43348] to allow the platform-specific parts of the
7897standard library be documented.
7898
7899```rust
7900#![feature(doc_cfg)]
7901
7902#[cfg(any(windows, doc))]
7903#[doc(cfg(windows))]
7904/// The application's icon in the notification area (a.k.a. system tray).
7905///
7906/// # Examples
7907///
7908/// ```no_run
7909/// extern crate my_awesome_ui_library;
7910/// use my_awesome_ui_library::current_app;
7911/// use my_awesome_ui_library::windows::notification;
7912///
7913/// let icon = current_app().get::<notification::Icon>();
7914/// icon.show();
7915/// icon.show_message("Hello");
7916/// ```
7917pub struct Icon {
7918 // ...
7919}
7920```
7921
7922[#43781]: https://github.com/rust-lang/rust/issues/43781
7923[#43348]: https://github.com/rust-lang/rust/issues/43348
7924"##,
7925 default_severity: Severity::Allow,
7926 warn_since: None,
7927 deny_since: None,
7928 },
7929 Lint {
7930 label: "doc_masked",
7931 description: r##"# `doc_masked`
7932
7933The tracking issue for this feature is: [#44027]
7934
7935-----
7936
7937The `doc_masked` feature allows a crate to exclude types from a given crate from appearing in lists
7938of trait implementations. The specifics of the feature are as follows:
7939
79401. When rustdoc encounters an `extern crate` statement annotated with a `#[doc(masked)]` attribute,
7941 it marks the crate as being masked.
7942
79432. When listing traits a given type implements, rustdoc ensures that traits from masked crates are
7944 not emitted into the documentation.
7945
79463. When listing types that implement a given trait, rustdoc ensures that types from masked crates
7947 are not emitted into the documentation.
7948
7949This feature was introduced in PR [#44026] to ensure that compiler-internal and
7950implementation-specific types and traits were not included in the standard library's documentation.
7951Such types would introduce broken links into the documentation.
7952
7953[#44026]: https://github.com/rust-lang/rust/pull/44026
7954[#44027]: https://github.com/rust-lang/rust/pull/44027
7955"##,
7956 default_severity: Severity::Allow,
7957 warn_since: None,
7958 deny_since: None,
7959 },
7960 Lint {
7961 label: "doc_notable_trait",
7962 description: r##"# `doc_notable_trait`
7963
7964The tracking issue for this feature is: [#45040]
7965
7966The `doc_notable_trait` feature allows the use of the `#[doc(notable_trait)]`
7967attribute, which will display the trait in a "Notable traits" dialog for
7968functions returning types that implement the trait. For example, this attribute
7969is applied to the `Iterator`, `Future`, `io::Read`, and `io::Write` traits in
7970the standard library.
7971
7972You can do this on your own traits like so:
7973
7974```
7975#![feature(doc_notable_trait)]
7976
7977#[doc(notable_trait)]
7978pub trait MyTrait {}
7979
7980pub struct MyStruct;
7981impl MyTrait for MyStruct {}
7982
7983/// The docs for this function will have a button that displays a dialog about
7984/// `MyStruct` implementing `MyTrait`.
7985pub fn my_fn() -> MyStruct { MyStruct }
7986```
7987
7988This feature was originally implemented in PR [#45039].
7989
7990See also its documentation in [the rustdoc book][rustdoc-book-notable_trait].
7991
7992[#45040]: https://github.com/rust-lang/rust/issues/45040
7993[#45039]: https://github.com/rust-lang/rust/pull/45039
7994[rustdoc-book-notable_trait]: ../../rustdoc/unstable-features.html#adding-your-trait-to-the-notable-traits-dialog
7995"##,
7996 default_severity: Severity::Allow,
7997 warn_since: None,
7998 deny_since: None,
7999 },
8000 Lint {
8001 label: "downcast_unchecked",
8002 description: r##"# `downcast_unchecked`
8003
8004
8005
8006The tracking issue for this feature is: [#90850]
8007
8008[#90850]: https://github.com/rust-lang/rust/issues/90850
8009
8010------------------------
8011"##,
8012 default_severity: Severity::Allow,
8013 warn_since: None,
8014 deny_since: None,
8015 },
8016 Lint {
8017 label: "drain_keep_rest",
8018 description: r##"# `drain_keep_rest`
8019
8020
8021
8022The tracking issue for this feature is: [#101122]
8023
8024[#101122]: https://github.com/rust-lang/rust/issues/101122
8025
8026------------------------
8027"##,
8028 default_severity: Severity::Allow,
8029 warn_since: None,
8030 deny_since: None,
8031 },
8032 Lint {
8033 label: "dropck_eyepatch",
8034 description: r##"# `dropck_eyepatch`
8035
8036Allows using the `may_dangle` attribute (RFC 1327).
8037
8038The tracking issue for this feature is: [#34761]
8039
8040[#34761]: https://github.com/rust-lang/rust/issues/34761
8041
8042------------------------
8043"##,
8044 default_severity: Severity::Allow,
8045 warn_since: None,
8046 deny_since: None,
8047 },
8048 Lint {
8049 label: "duration_constants",
8050 description: r##"# `duration_constants`
8051
8052
8053
8054The tracking issue for this feature is: [#57391]
8055
8056[#57391]: https://github.com/rust-lang/rust/issues/57391
8057
8058------------------------
8059"##,
8060 default_severity: Severity::Allow,
8061 warn_since: None,
8062 deny_since: None,
8063 },
8064 Lint {
8065 label: "duration_constructors",
8066 description: r##"# `duration_constructors`
8067
8068The tracking issue for this feature is: [#120301]
8069
8070[#120301]: https://github.com/rust-lang/rust/issues/120301
8071
8072------------------------
8073
8074Add the methods `from_days` and `from_weeks` to `Duration`.
8075"##,
8076 default_severity: Severity::Allow,
8077 warn_since: None,
8078 deny_since: None,
8079 },
8080 Lint {
8081 label: "duration_display_seconds",
8082 description: r##"# `duration_display_seconds`
8083
8084
8085
8086The tracking issue for this feature is: [#165108]
8087
8088[#165108]: https://github.com/rust-lang/rust/issues/165108
8089
8090------------------------
8091"##,
8092 default_severity: Severity::Allow,
8093 warn_since: None,
8094 deny_since: None,
8095 },
8096 Lint {
8097 label: "duration_integer_division",
8098 description: r##"# `duration_integer_division`
8099
8100
8101
8102The tracking issue for this feature is: [#149573]
8103
8104[#149573]: https://github.com/rust-lang/rust/issues/149573
8105
8106------------------------
8107"##,
8108 default_severity: Severity::Allow,
8109 warn_since: None,
8110 deny_since: None,
8111 },
8112 Lint {
8113 label: "duration_millis_float",
8114 description: r##"# `duration_millis_float`
8115
8116
8117
8118The tracking issue for this feature is: [#122451]
8119
8120[#122451]: https://github.com/rust-lang/rust/issues/122451
8121
8122------------------------
8123"##,
8124 default_severity: Severity::Allow,
8125 warn_since: None,
8126 deny_since: None,
8127 },
8128 Lint {
8129 label: "duration_units",
8130 description: r##"# `duration_units`
8131
8132
8133
8134The tracking issue for this feature is: [#120301]
8135
8136[#120301]: https://github.com/rust-lang/rust/issues/120301
8137
8138------------------------
8139"##,
8140 default_severity: Severity::Allow,
8141 warn_since: None,
8142 deny_since: None,
8143 },
8144 Lint {
8145 label: "edition_panic",
8146 description: r##"# `edition_panic`
8147
8148
8149
8150This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
8151
8152------------------------
8153"##,
8154 default_severity: Severity::Allow,
8155 warn_since: None,
8156 deny_since: None,
8157 },
8158 Lint {
8159 label: "effective_target_features",
8160 description: r##"# `effective_target_features`
8161
8162Allows features to allow target_feature to better interact with traits.
8163
8164The tracking issue for this feature is: [#143352]
8165
8166[#143352]: https://github.com/rust-lang/rust/issues/143352
8167
8168------------------------
8169"##,
8170 default_severity: Severity::Allow,
8171 warn_since: None,
8172 deny_since: None,
8173 },
8174 Lint {
8175 label: "eii_internals",
8176 description: r##"# `eii_internals`
8177
8178Implementation details of externally implementable items
8179
8180This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
8181
8182------------------------
8183"##,
8184 default_severity: Severity::Allow,
8185 warn_since: None,
8186 deny_since: None,
8187 },
8188 Lint {
8189 label: "env_split_paths_ref",
8190 description: r##"# `env_split_paths_ref`
8191
8192
8193
8194This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
8195
8196------------------------
8197"##,
8198 default_severity: Severity::Allow,
8199 warn_since: None,
8200 deny_since: None,
8201 },
8202 Lint {
8203 label: "ergonomic_clones",
8204 description: r##"# `ergonomic_clones`
8205
8206Allows the .use postfix syntax `x.use` and use closures `use |x| { ... }`
8207
8208The tracking issue for this feature is: [#132290]
8209
8210[#132290]: https://github.com/rust-lang/rust/issues/132290
8211
8212------------------------
8213"##,
8214 default_severity: Severity::Allow,
8215 warn_since: None,
8216 deny_since: None,
8217 },
8218 Lint {
8219 label: "ermsb_target_feature",
8220 description: r##"# `ermsb_target_feature`
8221
8222ermsb target feature on x86.
8223
8224The tracking issue for this feature is: [#150249]
8225
8226[#150249]: https://github.com/rust-lang/rust/issues/150249
8227
8228------------------------
8229"##,
8230 default_severity: Severity::Allow,
8231 warn_since: None,
8232 deny_since: None,
8233 },
8234 Lint {
8235 label: "error_generic_member_access",
8236 description: r##"# `error_generic_member_access`
8237
8238
8239
8240The tracking issue for this feature is: [#99301]
8241
8242[#99301]: https://github.com/rust-lang/rust/issues/99301
8243
8244------------------------
8245"##,
8246 default_severity: Severity::Allow,
8247 warn_since: None,
8248 deny_since: None,
8249 },
8250 Lint {
8251 label: "error_iter",
8252 description: r##"# `error_iter`
8253
8254
8255
8256The tracking issue for this feature is: [#58520]
8257
8258[#58520]: https://github.com/rust-lang/rust/issues/58520
8259
8260------------------------
8261"##,
8262 default_severity: Severity::Allow,
8263 warn_since: None,
8264 deny_since: None,
8265 },
8266 Lint {
8267 label: "error_reporter",
8268 description: r##"# `error_reporter`
8269
8270
8271
8272The tracking issue for this feature is: [#90172]
8273
8274[#90172]: https://github.com/rust-lang/rust/issues/90172
8275
8276------------------------
8277"##,
8278 default_severity: Severity::Allow,
8279 warn_since: None,
8280 deny_since: None,
8281 },
8282 Lint {
8283 label: "error_type_id",
8284 description: r##"# `error_type_id`
8285
8286
8287
8288The tracking issue for this feature is: [#60784]
8289
8290[#60784]: https://github.com/rust-lang/rust/issues/60784
8291
8292------------------------
8293"##,
8294 default_severity: Severity::Allow,
8295 warn_since: None,
8296 deny_since: None,
8297 },
8298 Lint {
8299 label: "error_type_id_internal",
8300 description: r##"# `error_type_id_internal`
8301
8302
8303
8304This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
8305
8306------------------------
8307"##,
8308 default_severity: Severity::Allow,
8309 warn_since: None,
8310 deny_since: None,
8311 },
8312 Lint {
8313 label: "exact_bitshifts",
8314 description: r##"# `exact_bitshifts`
8315
8316
8317
8318The tracking issue for this feature is: [#144336]
8319
8320[#144336]: https://github.com/rust-lang/rust/issues/144336
8321
8322------------------------
8323"##,
8324 default_severity: Severity::Allow,
8325 warn_since: None,
8326 deny_since: None,
8327 },
8328 Lint {
8329 label: "exact_div",
8330 description: r##"# `exact_div`
8331
8332
8333
8334The tracking issue for this feature is: [#139911]
8335
8336[#139911]: https://github.com/rust-lang/rust/issues/139911
8337
8338------------------------
8339"##,
8340 default_severity: Severity::Allow,
8341 warn_since: None,
8342 deny_since: None,
8343 },
8344 Lint {
8345 label: "exact_size_is_empty",
8346 description: r##"# `exact_size_is_empty`
8347
8348
8349
8350The tracking issue for this feature is: [#35428]
8351
8352[#35428]: https://github.com/rust-lang/rust/issues/35428
8353
8354------------------------
8355"##,
8356 default_severity: Severity::Allow,
8357 warn_since: None,
8358 deny_since: None,
8359 },
8360 Lint {
8361 label: "exhaustive_patterns",
8362 description: r##"# `exhaustive_patterns`
8363
8364Allows exhaustive pattern matching on types that contain uninhabited types.
8365
8366The tracking issue for this feature is: [#51085]
8367
8368[#51085]: https://github.com/rust-lang/rust/issues/51085
8369
8370------------------------
8371"##,
8372 default_severity: Severity::Allow,
8373 warn_since: None,
8374 deny_since: None,
8375 },
8376 Lint {
8377 label: "exit_status_error",
8378 description: r##"# `exit_status_error`
8379
8380
8381
8382The tracking issue for this feature is: [#84908]
8383
8384[#84908]: https://github.com/rust-lang/rust/issues/84908
8385
8386------------------------
8387"##,
8388 default_severity: Severity::Allow,
8389 warn_since: None,
8390 deny_since: None,
8391 },
8392 Lint {
8393 label: "exitcode_exit_method",
8394 description: r##"# `exitcode_exit_method`
8395
8396
8397
8398The tracking issue for this feature is: [#97100]
8399
8400[#97100]: https://github.com/rust-lang/rust/issues/97100
8401
8402------------------------
8403"##,
8404 default_severity: Severity::Allow,
8405 warn_since: None,
8406 deny_since: None,
8407 },
8408 Lint {
8409 label: "explicit_extern_abis",
8410 description: r##"# `explicit_extern_abis`
8411
8412The tracking issue for this feature is: [#134986]
8413
8414------
8415
8416Disallow `extern` without an explicit ABI. We should write `extern "C"`
8417(or another ABI) instead of just `extern`.
8418
8419By making the ABI explicit, it becomes much clearer that "C" is just one of the
8420possible choices, rather than the "standard" way for external functions.
8421Removing the default makes it easier to add a new ABI on equal footing as "C".
8422
8423```rust,editionfuture,compile_fail
8424#![feature(explicit_extern_abis)]
8425
8426extern fn function1() {} // ERROR `extern` declarations without an explicit ABI
8427 // are disallowed
8428
8429extern "C" fn function2() {} // compiles
8430
8431extern "aapcs" fn function3() {} // compiles
8432```
8433
8434[#134986]: https://github.com/rust-lang/rust/issues/134986
8435"##,
8436 default_severity: Severity::Allow,
8437 warn_since: None,
8438 deny_since: None,
8439 },
8440 Lint {
8441 label: "explicit_tail_calls",
8442 description: r##"# `explicit_tail_calls`
8443
8444Allows explicit tail calls via `become` expression.
8445
8446The tracking issue for this feature is: [#112788]
8447
8448[#112788]: https://github.com/rust-lang/rust/issues/112788
8449
8450------------------------
8451"##,
8452 default_severity: Severity::Allow,
8453 warn_since: None,
8454 deny_since: None,
8455 },
8456 Lint {
8457 label: "export_stable",
8458 description: r##"# `export_stable`
8459
8460Allows using `#[export_stable]` which indicates that an item is exportable.
8461
8462The tracking issue for this feature is: [#139939]
8463
8464[#139939]: https://github.com/rust-lang/rust/issues/139939
8465
8466------------------------
8467"##,
8468 default_severity: Severity::Allow,
8469 warn_since: None,
8470 deny_since: None,
8471 },
8472 Lint {
8473 label: "extend_one",
8474 description: r##"# `extend_one`
8475
8476
8477
8478The tracking issue for this feature is: [#72631]
8479
8480[#72631]: https://github.com/rust-lang/rust/issues/72631
8481
8482------------------------
8483"##,
8484 default_severity: Severity::Allow,
8485 warn_since: None,
8486 deny_since: None,
8487 },
8488 Lint {
8489 label: "extend_one_unchecked",
8490 description: r##"# `extend_one_unchecked`
8491
8492
8493
8494This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
8495
8496------------------------
8497"##,
8498 default_severity: Severity::Allow,
8499 warn_since: None,
8500 deny_since: None,
8501 },
8502 Lint {
8503 label: "extended_float_error_kind",
8504 description: r##"# `extended_float_error_kind`
8505
8506
8507
8508The tracking issue for this feature is: [#164793]
8509
8510[#164793]: https://github.com/rust-lang/rust/issues/164793
8511
8512------------------------
8513"##,
8514 default_severity: Severity::Allow,
8515 warn_since: None,
8516 deny_since: None,
8517 },
8518 Lint {
8519 label: "extern_item_impls",
8520 description: r##"# `extern_item_impls`
8521
8522Externally implementable items
8523
8524The tracking issue for this feature is: [#125418]
8525
8526[#125418]: https://github.com/rust-lang/rust/issues/125418
8527
8528------------------------
8529"##,
8530 default_severity: Severity::Allow,
8531 warn_since: None,
8532 deny_since: None,
8533 },
8534 Lint {
8535 label: "extern_types",
8536 description: r##"# `extern_types`
8537
8538Allows defining `extern type`s.
8539
8540The tracking issue for this feature is: [#43467]
8541
8542[#43467]: https://github.com/rust-lang/rust/issues/43467
8543
8544------------------------
8545"##,
8546 default_severity: Severity::Allow,
8547 warn_since: None,
8548 deny_since: None,
8549 },
8550 Lint {
8551 label: "f128",
8552 description: r##"# `f128`
8553
8554The tracking issue for this feature is: [#116909]
8555
8556[#116909]: https://github.com/rust-lang/rust/issues/116909
8557
8558---
8559
8560Enable the `f128` type for IEEE 128-bit floating numbers (quad precision).
8561"##,
8562 default_severity: Severity::Allow,
8563 warn_since: None,
8564 deny_since: None,
8565 },
8566 Lint {
8567 label: "f16",
8568 description: r##"# `f16`
8569
8570The tracking issue for this feature is: [#116909]
8571
8572[#116909]: https://github.com/rust-lang/rust/issues/116909
8573
8574---
8575
8576Enable the `f16` type for IEEE 16-bit floating numbers (half precision).
8577"##,
8578 default_severity: Severity::Allow,
8579 warn_since: None,
8580 deny_since: None,
8581 },
8582 Lint {
8583 label: "f16b",
8584 description: r##"# `f16b`
8585
8586The tracking issue for this feature is: [#160630]
8587
8588[#160630]: https://github.com/rust-lang/rust/issues/160630
8589
8590---
8591
8592Enable the `core::num::f16b` type for values stored in the bfloat16 format.
8593
8594`f16b` is a nominal library type, not a primitive floating-point type: it has no literal suffix, arithmetic operators, or numeric `as` casts. A compiler lang item connects its layout to the chosen backend's representation.
8595"##,
8596 default_severity: Severity::Allow,
8597 warn_since: None,
8598 deny_since: None,
8599 },
8600 Lint {
8601 label: "f32_from_f16",
8602 description: r##"# `f32_from_f16`
8603
8604
8605
8606The tracking issue for this feature is: [#154005]
8607
8608[#154005]: https://github.com/rust-lang/rust/issues/154005
8609
8610------------------------
8611"##,
8612 default_severity: Severity::Allow,
8613 warn_since: None,
8614 deny_since: None,
8615 },
8616 Lint {
8617 label: "fd",
8618 description: r##"# `fd`
8619
8620This feature is internal to the Rust compiler and is not intended for general use.
8621
8622------------------------
8623"##,
8624 default_severity: Severity::Allow,
8625 warn_since: None,
8626 deny_since: None,
8627 },
8628 Lint {
8629 label: "fd_view",
8630 description: r##"# `fd_view`
8631
8632
8633
8634The tracking issue for this feature is: [#160402]
8635
8636[#160402]: https://github.com/rust-lang/rust/issues/160402
8637
8638------------------------
8639"##,
8640 default_severity: Severity::Allow,
8641 warn_since: None,
8642 deny_since: None,
8643 },
8644 Lint {
8645 label: "ffi_const",
8646 description: r##"# `ffi_const`
8647
8648The tracking issue for this feature is: [#58328]
8649
8650------
8651
8652The `#[ffi_const]` attribute applies clang's `const` attribute to foreign
8653functions declarations.
8654
8655That is, `#[ffi_const]` functions shall have no effects except for its return
8656value, which can only depend on the values of the function parameters, and is
8657not affected by changes to the observable state of the program.
8658
8659Applying the `#[ffi_const]` attribute to a function that violates these
8660requirements is undefined behaviour.
8661
8662This attribute enables Rust to perform common optimizations, like sub-expression
8663elimination, and it can avoid emitting some calls in repeated invocations of the
8664function with the same argument values regardless of other operations being
8665performed in between these functions calls (as opposed to `#[ffi_pure]`
8666functions).
8667
8668## Pitfalls
8669
8670A `#[ffi_const]` function can only read global memory that would not affect
8671its return value for the whole execution of the program (e.g. immutable global
8672memory). `#[ffi_const]` functions are referentially-transparent and therefore
8673more strict than `#[ffi_pure]` functions.
8674
8675A common pitfall involves applying the `#[ffi_const]` attribute to a
8676function that reads memory through pointer arguments which do not necessarily
8677point to immutable global memory.
8678
8679A `#[ffi_const]` function that returns unit has no effect on the abstract
8680machine's state, and a `#[ffi_const]` function cannot be `#[ffi_pure]`.
8681
8682A `#[ffi_const]` function must not diverge, neither via a side effect (e.g. a
8683call to `abort`) nor by infinite loops.
8684
8685When translating C headers to Rust FFI, it is worth verifying for which targets
8686the `const` attribute is enabled in those headers, and using the appropriate
8687`cfg` macros in the Rust side to match those definitions. While the semantics of
8688`const` are implemented identically by many C and C++ compilers, e.g., clang,
8689[GCC], [ARM C/C++ compiler], [IBM ILE C/C++], etc. they are not necessarily
8690implemented in this way on all of them. It is therefore also worth verifying
8691that the semantics of the C toolchain used to compile the binary being linked
8692against are compatible with those of the `#[ffi_const]`.
8693
8694[#58328]: https://github.com/rust-lang/rust/issues/58328
8695[ARM C/C++ compiler]: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/Cacgigch.html
8696[GCC]: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-const-function-attribute
8697[IBM ILE C/C++]: https://www.ibm.com/support/knowledgecenter/fr/ssw_ibm_i_71/rzarg/fn_attrib_const.htm
8698"##,
8699 default_severity: Severity::Allow,
8700 warn_since: None,
8701 deny_since: None,
8702 },
8703 Lint {
8704 label: "ffi_pure",
8705 description: r##"# `ffi_pure`
8706
8707The tracking issue for this feature is: [#58329]
8708
8709------
8710
8711The `#[ffi_pure]` attribute applies clang's `pure` attribute to foreign
8712functions declarations.
8713
8714That is, `#[ffi_pure]` functions shall have no effects except for its return
8715value, which shall not change across two consecutive function calls with
8716the same parameters.
8717
8718Applying the `#[ffi_pure]` attribute to a function that violates these
8719requirements is undefined behavior.
8720
8721This attribute enables Rust to perform common optimizations, like sub-expression
8722elimination and loop optimizations. Some common examples of pure functions are
8723`strlen` or `memcmp`.
8724
8725These optimizations are only applicable when the compiler can prove that no
8726program state observable by the `#[ffi_pure]` function has changed between calls
8727of the function, which could alter the result. See also the `#[ffi_const]`
8728attribute, which provides stronger guarantees regarding the allowable behavior
8729of a function, enabling further optimization.
8730
8731## Pitfalls
8732
8733A `#[ffi_pure]` function can read global memory through the function
8734parameters (e.g. pointers), globals, etc. `#[ffi_pure]` functions are not
8735referentially-transparent, and are therefore more relaxed than `#[ffi_const]`
8736functions.
8737
8738However, accessing global memory through volatile or atomic reads can violate the
8739requirement that two consecutive function calls shall return the same value.
8740
8741A `pure` function that returns unit has no effect on the abstract machine's
8742state.
8743
8744A `#[ffi_pure]` function must not diverge, neither via a side effect (e.g. a
8745call to `abort`) nor by infinite loops.
8746
8747When translating C headers to Rust FFI, it is worth verifying for which targets
8748the `pure` attribute is enabled in those headers, and using the appropriate
8749`cfg` macros in the Rust side to match those definitions. While the semantics of
8750`pure` are implemented identically by many C and C++ compilers, e.g., clang,
8751[GCC], [ARM C/C++ compiler], [IBM ILE C/C++], etc. they are not necessarily
8752implemented in this way on all of them. It is therefore also worth verifying
8753that the semantics of the C toolchain used to compile the binary being linked
8754against are compatible with those of the `#[ffi_pure]`.
8755
8756
8757[#58329]: https://github.com/rust-lang/rust/issues/58329
8758[ARM C/C++ compiler]: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/Cacigdac.html
8759[GCC]: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-pure-function-attribute
8760[IBM ILE C/C++]: https://www.ibm.com/support/knowledgecenter/fr/ssw_ibm_i_71/rzarg/fn_attrib_pure.htm
8761"##,
8762 default_severity: Severity::Allow,
8763 warn_since: None,
8764 deny_since: None,
8765 },
8766 Lint {
8767 label: "field_projections",
8768 description: r##"# `field_projections`
8769
8770Experimental field projections.
8771
8772The tracking issue for this feature is: [#145383]
8773
8774[#145383]: https://github.com/rust-lang/rust/issues/145383
8775
8776------------------------
8777"##,
8778 default_severity: Severity::Allow,
8779 warn_since: None,
8780 deny_since: None,
8781 },
8782 Lint {
8783 label: "field_representing_type_raw",
8784 description: r##"# `field_representing_type_raw`
8785
8786Implementation details of field representing types.
8787
8788This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
8789
8790------------------------
8791"##,
8792 default_severity: Severity::Allow,
8793 warn_since: None,
8794 deny_since: None,
8795 },
8796 Lint {
8797 label: "file_buffered",
8798 description: r##"# `file_buffered`
8799
8800
8801
8802The tracking issue for this feature is: [#130804]
8803
8804[#130804]: https://github.com/rust-lang/rust/issues/130804
8805
8806------------------------
8807"##,
8808 default_severity: Severity::Allow,
8809 warn_since: None,
8810 deny_since: None,
8811 },
8812 Lint {
8813 label: "final_associated_functions",
8814 description: r##"# `final_associated_functions`
8815
8816Allows marking trait functions as `final` to prevent overriding impls
8817
8818The tracking issue for this feature is: [#131179]
8819
8820[#131179]: https://github.com/rust-lang/rust/issues/131179
8821
8822------------------------
8823"##,
8824 default_severity: Severity::Allow,
8825 warn_since: None,
8826 deny_since: None,
8827 },
8828 Lint {
8829 label: "float_bits_const",
8830 description: r##"# `float_bits_const`
8831
8832
8833
8834The tracking issue for this feature is: [#151073]
8835
8836[#151073]: https://github.com/rust-lang/rust/issues/151073
8837
8838------------------------
8839"##,
8840 default_severity: Severity::Allow,
8841 warn_since: None,
8842 deny_since: None,
8843 },
8844 Lint {
8845 label: "float_conversions",
8846 description: r##"# `float_conversions`
8847
8848
8849
8850The tracking issue for this feature is: [#159913]
8851
8852[#159913]: https://github.com/rust-lang/rust/issues/159913
8853
8854------------------------
8855"##,
8856 default_severity: Severity::Allow,
8857 warn_since: None,
8858 deny_since: None,
8859 },
8860 Lint {
8861 label: "float_erf",
8862 description: r##"# `float_erf`
8863
8864
8865
8866The tracking issue for this feature is: [#136321]
8867
8868[#136321]: https://github.com/rust-lang/rust/issues/136321
8869
8870------------------------
8871"##,
8872 default_severity: Severity::Allow,
8873 warn_since: None,
8874 deny_since: None,
8875 },
8876 Lint {
8877 label: "float_exact_integer_constants",
8878 description: r##"# `float_exact_integer_constants`
8879
8880
8881
8882The tracking issue for this feature is: [#152466]
8883
8884[#152466]: https://github.com/rust-lang/rust/issues/152466
8885
8886------------------------
8887"##,
8888 default_severity: Severity::Allow,
8889 warn_since: None,
8890 deny_since: None,
8891 },
8892 Lint {
8893 label: "float_gamma",
8894 description: r##"# `float_gamma`
8895
8896
8897
8898The tracking issue for this feature is: [#99842]
8899
8900[#99842]: https://github.com/rust-lang/rust/issues/99842
8901
8902------------------------
8903"##,
8904 default_severity: Severity::Allow,
8905 warn_since: None,
8906 deny_since: None,
8907 },
8908 Lint {
8909 label: "float_masks",
8910 description: r##"# `float_masks`
8911
8912
8913
8914The tracking issue for this feature is: [#154064]
8915
8916[#154064]: https://github.com/rust-lang/rust/issues/154064
8917
8918------------------------
8919"##,
8920 default_severity: Severity::Allow,
8921 warn_since: None,
8922 deny_since: None,
8923 },
8924 Lint {
8925 label: "float_minimum_maximum",
8926 description: r##"# `float_minimum_maximum`
8927
8928
8929
8930The tracking issue for this feature is: [#91079]
8931
8932[#91079]: https://github.com/rust-lang/rust/issues/91079
8933
8934------------------------
8935"##,
8936 default_severity: Severity::Allow,
8937 warn_since: None,
8938 deny_since: None,
8939 },
8940 Lint {
8941 label: "float_mul_add_relaxed",
8942 description: r##"# `float_mul_add_relaxed`
8943
8944
8945
8946The tracking issue for this feature is: [#151770]
8947
8948[#151770]: https://github.com/rust-lang/rust/issues/151770
8949
8950------------------------
8951"##,
8952 default_severity: Severity::Allow,
8953 warn_since: None,
8954 deny_since: None,
8955 },
8956 Lint {
8957 label: "float_nan_to",
8958 description: r##"# `float_nan_to`
8959
8960
8961
8962The tracking issue for this feature is: [#161248]
8963
8964[#161248]: https://github.com/rust-lang/rust/issues/161248
8965
8966------------------------
8967"##,
8968 default_severity: Severity::Allow,
8969 warn_since: None,
8970 deny_since: None,
8971 },
8972 Lint {
8973 label: "flt2dec",
8974 description: r##"# `flt2dec`
8975
8976This feature is internal to the Rust compiler and is not intended for general use.
8977
8978------------------------
8979"##,
8980 default_severity: Severity::Allow,
8981 warn_since: None,
8982 deny_since: None,
8983 },
8984 Lint {
8985 label: "fma4_target_feature",
8986 description: r##"# `fma4_target_feature`
8987
8988fma4 target feature on x86.
8989
8990The tracking issue for this feature is: [#155233]
8991
8992[#155233]: https://github.com/rust-lang/rust/issues/155233
8993
8994------------------------
8995"##,
8996 default_severity: Severity::Allow,
8997 warn_since: None,
8998 deny_since: None,
8999 },
9000 Lint {
9001 label: "fmt_arguments_from_str",
9002 description: r##"# `fmt_arguments_from_str`
9003
9004
9005
9006The tracking issue for this feature is: [#148905]
9007
9008[#148905]: https://github.com/rust-lang/rust/issues/148905
9009
9010------------------------
9011"##,
9012 default_severity: Severity::Allow,
9013 warn_since: None,
9014 deny_since: None,
9015 },
9016 Lint {
9017 label: "fmt_debug",
9018 description: r##"# `fmt_debug`
9019
9020Controlling the behavior of fmt::Debug
9021
9022The tracking issue for this feature is: [#129709]
9023
9024[#129709]: https://github.com/rust-lang/rust/issues/129709
9025
9026------------------------
9027"##,
9028 default_severity: Severity::Allow,
9029 warn_since: None,
9030 deny_since: None,
9031 },
9032 Lint {
9033 label: "fmt_helpers_for_derive",
9034 description: r##"# `fmt_helpers_for_derive`
9035
9036
9037
9038This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
9039
9040------------------------
9041"##,
9042 default_severity: Severity::Allow,
9043 warn_since: None,
9044 deny_since: None,
9045 },
9046 Lint {
9047 label: "fmt_internals",
9048 description: r##"# `fmt_internals`
9049
9050This feature is internal to the Rust compiler and is not intended for general use.
9051
9052------------------------
9053"##,
9054 default_severity: Severity::Allow,
9055 warn_since: None,
9056 deny_since: None,
9057 },
9058 Lint {
9059 label: "fn_align",
9060 description: r##"# `fn_align`
9061
9062Allows using `#[align(...)]` on function items
9063
9064The tracking issue for this feature is: [#82232]
9065
9066[#82232]: https://github.com/rust-lang/rust/issues/82232
9067
9068------------------------
9069"##,
9070 default_severity: Severity::Allow,
9071 warn_since: None,
9072 deny_since: None,
9073 },
9074 Lint {
9075 label: "fn_delegation",
9076 description: r##"# `fn_delegation`
9077
9078Support delegating implementation of functions to other already implemented functions.
9079
9080The tracking issue for this feature is: [#118212]
9081
9082[#118212]: https://github.com/rust-lang/rust/issues/118212
9083
9084------------------------
9085"##,
9086 default_severity: Severity::Allow,
9087 warn_since: None,
9088 deny_since: None,
9089 },
9090 Lint {
9091 label: "fn_static",
9092 description: r##"# `fn_static`
9093
9094Traits for function pointers and items
9095
9096The tracking issue for this feature is: [#148768]
9097
9098[#148768]: https://github.com/rust-lang/rust/issues/148768
9099
9100------------------------
9101"##,
9102 default_severity: Severity::Allow,
9103 warn_since: None,
9104 deny_since: None,
9105 },
9106 Lint {
9107 label: "fn_traits",
9108 description: r##"# `fn_traits`
9109
9110The tracking issue for this feature is [#29625]
9111
9112See Also: [`unboxed_closures`](../language-features/unboxed-closures.md)
9113
9114[#29625]: https://github.com/rust-lang/rust/issues/29625
9115
9116----
9117
9118The `fn_traits` feature allows for implementation of the [`Fn*`] traits
9119for creating custom closure-like types.
9120
9121[`Fn*`]: ../../std/ops/trait.Fn.html
9122
9123```rust
9124#![feature(unboxed_closures)]
9125#![feature(fn_traits)]
9126
9127struct Adder {
9128 a: u32
9129}
9130
9131impl FnOnce<(u32, )> for Adder {
9132 type Output = u32;
9133 extern "rust-call" fn call_once(self, b: (u32, )) -> Self::Output {
9134 self.a + b.0
9135 }
9136}
9137
9138fn main() {
9139 let adder = Adder { a: 3 };
9140 assert_eq!(adder(2), 5);
9141}
9142```
9143"##,
9144 default_severity: Severity::Allow,
9145 warn_since: None,
9146 deny_since: None,
9147 },
9148 Lint {
9149 label: "forced_keywords",
9150 description: r##"# `forced_keywords`
9151
9152Allows using forced keywords `k#fn`.
9153
9154The tracking issue for this feature is: [#153839]
9155
9156[#153839]: https://github.com/rust-lang/rust/issues/153839
9157
9158------------------------
9159"##,
9160 default_severity: Severity::Allow,
9161 warn_since: None,
9162 deny_since: None,
9163 },
9164 Lint {
9165 label: "forget_trait",
9166 description: r##"# `forget_trait`
9167
9168The `Forget` autotrait.
9169
9170The tracking issue for this feature is: [#165370]
9171
9172[#165370]: https://github.com/rust-lang/rust/issues/165370
9173
9174------------------------
9175"##,
9176 default_severity: Severity::Allow,
9177 warn_since: None,
9178 deny_since: None,
9179 },
9180 Lint {
9181 label: "forget_unsized",
9182 description: r##"# `forget_unsized`
9183
9184
9185
9186This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
9187
9188------------------------
9189"##,
9190 default_severity: Severity::Allow,
9191 warn_since: None,
9192 deny_since: None,
9193 },
9194 Lint {
9195 label: "format_args_nl",
9196 description: r##"# `format_args_nl`
9197
9198
9199
9200This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
9201
9202------------------------
9203"##,
9204 default_severity: Severity::Allow,
9205 warn_since: None,
9206 deny_since: None,
9207 },
9208 Lint {
9209 label: "formatting_options",
9210 description: r##"# `formatting_options`
9211
9212
9213
9214The tracking issue for this feature is: [#118117]
9215
9216[#118117]: https://github.com/rust-lang/rust/issues/118117
9217
9218------------------------
9219"##,
9220 default_severity: Severity::Allow,
9221 warn_since: None,
9222 deny_since: None,
9223 },
9224 Lint {
9225 label: "freeze",
9226 description: r##"# `freeze`
9227
9228
9229
9230The tracking issue for this feature is: [#121675]
9231
9232[#121675]: https://github.com/rust-lang/rust/issues/121675
9233
9234------------------------
9235"##,
9236 default_severity: Severity::Allow,
9237 warn_since: None,
9238 deny_since: None,
9239 },
9240 Lint {
9241 label: "freeze_impls",
9242 description: r##"# `freeze_impls`
9243
9244Allows impls for the Freeze trait.
9245
9246The tracking issue for this feature is: [#121675]
9247
9248[#121675]: https://github.com/rust-lang/rust/issues/121675
9249
9250------------------------
9251"##,
9252 default_severity: Severity::Allow,
9253 warn_since: None,
9254 deny_since: None,
9255 },
9256 Lint {
9257 label: "frontmatter",
9258 description: r##"# `frontmatter`
9259
9260The tracking issue for this feature is: [#136889]
9261
9262------
9263
9264The `frontmatter` feature allows an extra metadata block at the top of files for consumption by
9265external tools. For example, it can be used by [`cargo-script`] files to specify dependencies.
9266
9267```rust
9268#!/usr/bin/env -S cargo -Zscript
9269---
9270[dependencies]
9271libc = "0.2.172"
9272---
9273#![feature(frontmatter)]
9274# mod libc { pub type c_int = i32; }
9275
9276fn main() {
9277 let x: libc::c_int = 1i32;
9278}
9279```
9280
9281[#136889]: https://github.com/rust-lang/rust/issues/136889
9282[`cargo-script`]: https://rust-lang.github.io/rfcs/3502-cargo-script.html
9283"##,
9284 default_severity: Severity::Allow,
9285 warn_since: None,
9286 deny_since: None,
9287 },
9288 Lint {
9289 label: "fs_home_dirs",
9290 description: r##"# `fs_home_dirs`
9291
9292
9293
9294The tracking issue for this feature is: [#162082]
9295
9296[#162082]: https://github.com/rust-lang/rust/issues/162082
9297
9298------------------------
9299"##,
9300 default_severity: Severity::Allow,
9301 warn_since: None,
9302 deny_since: None,
9303 },
9304 Lint {
9305 label: "fs_media_dirs",
9306 description: r##"# `fs_media_dirs`
9307
9308
9309
9310The tracking issue for this feature is: [#162083]
9311
9312[#162083]: https://github.com/rust-lang/rust/issues/162083
9313
9314------------------------
9315"##,
9316 default_severity: Severity::Allow,
9317 warn_since: None,
9318 deny_since: None,
9319 },
9320 Lint {
9321 label: "function_arg_const_generics",
9322 description: r##"# function_arg_const_generics
9323
9324The tracking issue for this feature is: [#163261]
9325
9326[#163261]: https://github.com/rust-lang/rust/issues/163261
9327
9328------------------------
9329
9330The `#![feature(function_arg_const_generics)]` allows const generic parameters to be declared in a function's value parameter list and supplied as ordinary call arguments, rather than through generic arguments (turbofish syntax).
9331
9332Warning: This feature is incomplete; its design and syntax may change.
9333
9334This feature requires either `#![feature(gca_min_const_items)]` or `#![feature(gca_adts)]`.
9335
9336## Examples
9337
9338Normally, const generic parameters are declared in the generic parameter list and supplied using turbofish syntax:
9339
9340```rust
9341fn foo<const N: usize>(value: u8) {
9342 let _ = N;
9343}
9344
9345fn main() {
9346 foo::<42>(10);
9347}
9348```
9349
9350With `function_arg_const_generics`, the const generic parameter can instead be declared in the function's value parameter list:
9351
9352```rust
9353#![allow(incomplete_features)]
9354#![feature(function_arg_const_generics, gca_min_const_items)]
9355
9356fn foo(const N: usize, value: u8) {
9357 let _ = (N, value);
9358}
9359
9360fn main() {
9361 foo(42, 10);
9362}
9363```
9364
9365Here, `N` is still a const generic parameter, but its value is supplied as the first argument to the function call.
9366
9367### Methods and trait functions
9368
9369Argument position const generic parameters are supported in free functions, inherent methods, trait methods, and trait implementations.
9370
9371```rust
9372#![allow(incomplete_features)]
9373#![feature(function_arg_const_generics, gca_min_const_items)]
9374
9375struct Foo;
9376
9377impl Foo {
9378 fn bar(&self, const N: usize) {
9379 let _ = N;
9380 }
9381}
9382
9383trait Trait {
9384 fn baz(const N: usize);
9385}
9386
9387impl Trait for Foo {
9388 fn baz(const N: usize) {
9389 let _ = N;
9390 }
9391}
9392
9393fn main() {
9394 Foo.bar(10);
9395 Foo::baz(20);
9396}
9397```
9398
9399### Supported const arguments
9400
9401Currently, only the following forms of const arguments are supported:
9402
9403- Literals.
9404- Paths to const generic parameters.
9405- Paths to const items, provided the const item is marked for use in the type system, for example using `gca!`.
9406
9407```rust
9408#![allow(incomplete_features)]
9409#![feature(function_arg_const_generics, gca_min_const_items)]
9410
9411fn foo(const N: usize) {
9412 let _ = N;
9413}
9414
9415const VALUE: usize = core::gca!(42);
9416
9417fn bar<const K: usize>() {
9418 foo(K);
9419}
9420
9421fn main() {
9422 foo(10); // OK: integer literal
9423 foo(VALUE); // OK: const item marked with gca!
9424 bar::<20>();
9425}
9426```
9427
9428### Restrictions
9429
9430Argument position const generic parameters have the following restrictions:
9431
9432- They must be declared using a plain identifier, such as `const N: usize`.
9433- They cannot be explicitly supplied using turbofish syntax.
9434- Arguments must use one of the supported const argument forms described above.
9435
9436For example, a runtime local variable cannot be used as a const argument:
9437
9438```rust,compile_fail
9439#![allow(incomplete_features)]
9440#![feature(function_arg_const_generics, gca_min_const_items)]
9441
9442fn foo(const N: usize) {}
9443
9444fn main() {
9445 let n = 10;
9446 foo(n); // ERROR: runtime local variable
9447}
9448```
9449
9450Similarly, argument position const generic parameters cannot be specified using turbofish syntax:
9451
9452```rust,compile_fail,E0107
9453#![allow(incomplete_features)]
9454#![feature(function_arg_const_generics, gca_min_const_items)]
9455
9456fn foo(const N: usize) {}
9457
9458fn main() {
9459 foo::<10>(10); // ERROR: N cannot be specified using turbofish
9460}
9461```
9462
9463Argument position const generic parameters are not currently supported in function pointer types, `Fn()` trait syntax, or foreign function declarations.
9464"##,
9465 default_severity: Severity::Allow,
9466 warn_since: None,
9467 deny_since: None,
9468 },
9469 Lint {
9470 label: "fundamental",
9471 description: r##"# `fundamental`
9472
9473Allows using the `#[fundamental]` attribute.
9474
9475The tracking issue for this feature is: [#29635]
9476
9477[#29635]: https://github.com/rust-lang/rust/issues/29635
9478
9479------------------------
9480"##,
9481 default_severity: Severity::Allow,
9482 warn_since: None,
9483 deny_since: None,
9484 },
9485 Lint {
9486 label: "future_join",
9487 description: r##"# `future_join`
9488
9489
9490
9491The tracking issue for this feature is: [#91642]
9492
9493[#91642]: https://github.com/rust-lang/rust/issues/91642
9494
9495------------------------
9496"##,
9497 default_severity: Severity::Allow,
9498 warn_since: None,
9499 deny_since: None,
9500 },
9501 Lint {
9502 label: "gca_adts",
9503 description: r##"# gca_adts
9504
9505Enables ADTs under the generic const args family of features (e.g. `gca!` macro).
9506
9507The tracking issue for this feature is: [#163420]
9508
9509[#163420]: https://github.com/rust-lang/rust/issues/163420
9510
9511## Examples
9512
9513```rust
9514#![feature(gca_min_const_items, min_adt_const_params, gca_adts)]
9515
9516use std::gca;
9517
9518struct S<const A: [u32; 2]>;
9519
9520fn main() {
9521 let _: S<gca!([1, 2])> = S::<gca!([1, 2])>;
9522}
9523```
9524"##,
9525 default_severity: Severity::Allow,
9526 warn_since: None,
9527 deny_since: None,
9528 },
9529 Lint {
9530 label: "gca_const_items",
9531 description: r##"# gca_const_items
9532
9533Allows using generics in more complex const expressions, based on definitional equality.
9534
9535The tracking issue for this feature is: [#151972]
9536
9537[#151972]: https://github.com/rust-lang/rust/issues/151972
9538
9539------------------------
9540
9541Warning: This feature is incomplete; its design and syntax may change.
9542
9543This feature enables many of the same use cases supported by [generic_const_exprs],
9544but based on the machinery developed for [gca_min_const_items]. In a way, it is
9545meant to be an interim successor for GCE (though it might not currently support all
9546the valid cases that supported by GCE).
9547
9548See also: [generic_const_items]
9549
9550[gca_min_const_items]: gca-min-const-items.md
9551[generic_const_exprs]: generic-const-exprs.md
9552[generic_const_items]: generic-const-items.md
9553
9554## Examples
9555
9556<!-- NOTE(ignore) gca_const_items requires -Znext-solver to compile -->
9557```rust,ignore (requires-Z-next-solver)
9558#![feature(generic_const_items)]
9559#![feature(gca_min_const_items)]
9560#![feature(gca_const_items)]
9561#![expect(incomplete_features)]
9562
9563type const ADD1<const N: usize>: usize = const { N + 1 };
9564
9565type const INC<const N: usize>: usize = ADD1::<N>;
9566
9567const ARR: [(); ADD1::<0>] = [(); INC::<0>];
9568```
9569"##,
9570 default_severity: Severity::Allow,
9571 warn_since: None,
9572 deny_since: None,
9573 },
9574 Lint {
9575 label: "gca_macroless_args",
9576 description: r##"# gca_macroless_args
9577
9578Enables using `#![feature(gca_min_const_items)]` without the `gca!` macro.
9579
9580The tracking issue for this feature is: [#159006]
9581
9582[#159006]: https://github.com/rust-lang/rust/issues/159006
9583
9584------------------------
9585
9586Warning: This feature is incomplete; its design and syntax may change.
9587
9588Related features:
9589- [gca_min_const_items]. See that doc for what the `gca!` is. This feature enables
9590support for directly represented const arguments without the macro.
9591- [gca_macroless_items]. For a version of this feature that works for const arguments
9592as the right hand side of a const item.
9593
9594[gca_min_const_items]: gca-min-const-items.md
9595[gca_macroless_items]: gca-macroless-items.md
9596
9597## Examples
9598
9599Here is an example from [gca_min_const_items]:
9600
9601[gca_min_const_items]: gca-min-const-items.md
9602
9603```rust
9604#![allow(incomplete_features)]
9605#![feature(gca_min_const_items)]
9606
9607trait Bar {
9608 #[rustc_always_gca]
9609 const VAL: usize;
9610 #[rustc_always_gca]
9611 const VAL2: usize;
9612}
9613
9614struct Baz;
9615
9616impl Bar for Baz {
9617 const VAL: usize = core::gca!(2);
9618 const VAL2: usize = core::gca!(const { Self::VAL * 2 });
9619}
9620
9621struct Foo<B: Bar> {
9622 arr1: [usize; core::gca!(B::VAL)],
9623 arr2: [usize; core::gca!(B::VAL2)],
9624}
9625```
9626
9627Using `#![feature(gca_macroless_args)]` enables you to write the above without the macro:
9628
9629```rust
9630#![allow(incomplete_features)]
9631#![feature(gca_min_const_items, gca_macroless_args)]
9632
9633trait Bar {
9634 #[rustc_always_gca]
9635 const VAL: usize;
9636 #[rustc_always_gca]
9637 const VAL2: usize;
9638}
9639
9640struct Baz;
9641
9642impl Bar for Baz {
9643 // note these still need a macro, macroless for these is `gca_macroless_items`
9644 const VAL: usize = core::gca!(2);
9645 const VAL2: usize = core::gca!(const { Self::VAL * 2 });
9646}
9647
9648struct Foo<B: Bar> {
9649 arr1: [usize; B::VAL],
9650 arr2: [usize; B::VAL2],
9651}
9652```
9653"##,
9654 default_severity: Severity::Allow,
9655 warn_since: None,
9656 deny_since: None,
9657 },
9658 Lint {
9659 label: "gca_macroless_items",
9660 description: r##"# gca_macroless_args
9661
9662Enables implementing const items under `#![feature(gca_min_const_items)]` and `#![feature(gca_const_items)]` without the `gca!` macro.
9663
9664The tracking issue for this feature is: [#162540]
9665
9666[#162540]: https://github.com/rust-lang/rust/issues/162540
9667
9668------------------------
9669
9670Warning: This feature is incomplete; its design and syntax may change.
9671
9672Related features:
9673- [gca_min_const_items]. See that doc for what the `gca!` is. This feature enables
9674support for directly represented const arguments as the rhs of const items without the macro.
9675- [gca_macroless_args]. For a version of this feature that works for const arguments in other
9676positions
9677
9678[gca_min_const_items]: gca-min-const-items.md
9679[gca_macroless_args]: gca-macroless-args.md
9680
9681## Examples
9682
9683Here is an example from [gca_min_const_items]:
9684
9685[gca_min_const_items]: gca-min-const-items.md
9686
9687```rust,ignore (needs new solver)
9688#![allow(incomplete_features)]
9689#![feature(
9690 gca_min_const_items,
9691 gca_const_items,
9692 gca_macroless_args,
9693 generic_const_items,
9694)]
9695
9696trait Trait {
9697 const ASSOC<const N: usize>: usize;
9698}
9699
9700impl Trait for () {
9701 const ASSOC<const N: usize>: usize = core::gca!(N);
9702}
9703
9704fn foo<const N: usize>() {
9705 let a: [(); <() as Trait>::ASSOC::<N>]
9706 = [(); N];
9707}
9708```
9709
9710Using `#![feature(gca_macroless_items)]` enables you to write the above without the macro:
9711
9712```rust,ignore (needs new solver)
9713#![allow(incomplete_features)]
9714#![feature(
9715 gca_min_const_items,
9716 gca_const_items,
9717 gca_macroless_args,
9718 gca_macroless_items,
9719 generic_const_items,
9720)]
9721
9722trait Trait {
9723 const ASSOC<const N: usize>: usize;
9724}
9725
9726impl Trait for () {
9727 const ASSOC<const N: usize>: usize = N;
9728}
9729
9730fn foo<const N: usize>() {
9731 let a: [(); <() as Trait>::ASSOC::<N>]
9732 = [(); N];
9733}
9734```
9735"##,
9736 default_severity: Severity::Allow,
9737 warn_since: None,
9738 deny_since: None,
9739 },
9740 Lint {
9741 label: "gca_min_const_items",
9742 description: r##"# gca_min_const_items
9743
9744Enables the generic const args MVP (paths to direct const items and primitives).
9745
9746The tracking issue for this feature is: [#132980]
9747
9748[#132980]: https://github.com/rust-lang/rust/issues/132980
9749
9750------------------------
9751
9752Warning: This feature is incomplete; its design and syntax may change.
9753
9754This feature acts as a minimal alternative to [generic_const_exprs] that allows a smaller subset of functionality,
9755and uses a different approach for implementation. It is intentionally more restrictive, which helps with avoiding edge
9756cases that make the `generic_const_exprs` hard to implement properly. See [Feature background][feature_background]
9757for more details.
9758
9759Related features: [gca_macroless_args], [gca_const_items], [generic_const_items].
9760
9761[feature_background]: https://github.com/rust-lang/project-const-generics/blob/main/documents/min_const_generics_plan.md
9762[generic_const_exprs]: generic-const-exprs.md
9763[gca_macroless_args]: gca-macroless-args.md
9764[gca_const_items]: gca-const-items.md
9765[generic_const_items]: generic-const-items.md
9766
9767## `gca!` macro
9768
9769This feature introduces a new macro: `gca!`.
9770
9771When an expression is used as a generic argument, it is typically lowered as an "anon const", which is an expression
9772that is opaque to the type system and cannot contain generics. Using `gca!` instead represents the
9773expression "directly", i.e. without an anon const, in a way that is visible to the type system.
9774
9775(Note that plain paths to generic parameters are always represented directly, without `gca!`, as this
9776already works on stable)
9777
9778See [gca_macroless_args] as a feature to disable the requirement of writing `gca!`.
9779
9780[gca_macroless_args]: gca-macroless-args.md
9781
9782## direct const items
9783
9784This feature introduces a new item kind: consts with a `gca!` right-hand side.
9785Constants with a direct right-hand side are allowed to be used in type contexts, e.g.:
9786
9787```compile_fail
9788#![allow(incomplete_features)]
9789#![feature(gca_min_const_items)]
9790
9791const X: usize = core::gca!(1);
9792const Y: usize = 1;
9793
9794struct Foo {
9795 good_arr: [(); core::gca!(X)], // Allowed
9796 bad_arr: [(); core::gca!(Y)], // Will not compile
9797}
9798```
9799
9800## Examples
9801
9802```rust
9803#![allow(incomplete_features)]
9804#![feature(gca_min_const_items)]
9805
9806trait Bar {
9807 #[rustc_always_gca]
9808 const VAL: usize;
9809 #[rustc_always_gca]
9810 const VAL2: usize;
9811}
9812
9813struct Baz;
9814
9815impl Bar for Baz {
9816 const VAL: usize = core::gca!(2);
9817 const VAL2: usize = core::gca!(const { Self::VAL * 2 });
9818}
9819
9820struct Foo<B: Bar> {
9821 arr1: [usize; core::gca!(B::VAL)],
9822 arr2: [usize; core::gca!(B::VAL2)],
9823}
9824```
9825
9826Note that with [generic_const_exprs] the same example would look as follows:
9827
9828```rust
9829#![allow(incomplete_features)]
9830#![feature(generic_const_exprs)]
9831
9832trait Bar {
9833 const VAL: usize;
9834 const VAL2: usize;
9835}
9836
9837struct Baz;
9838
9839impl Bar for Baz {
9840 const VAL: usize = 2;
9841 const VAL2: usize = const { Self::VAL * 2 };
9842}
9843
9844struct Foo<B: Bar>
9845where
9846 [(); B::VAL]:,
9847 [(); B::VAL2]:,
9848{
9849 arr1: [usize; B::VAL],
9850 arr2: [usize; B::VAL2],
9851}
9852```
9853
9854Use of const functions is allowed:
9855
9856```rust
9857#![allow(incomplete_features)]
9858#![feature(gca_min_const_items)]
9859
9860const VAL: usize = 1;
9861
9862const fn inc(val: usize) -> usize {
9863 val + 1
9864}
9865
9866const INC: usize = core::gca!(const { inc(VAL) });
9867
9868const ARR: [usize; INC] = [0; INC];
9869```
9870"##,
9871 default_severity: Severity::Allow,
9872 warn_since: None,
9873 deny_since: None,
9874 },
9875 Lint {
9876 label: "gen_blocks",
9877 description: r##"# `gen_blocks`
9878
9879Allows defining gen blocks and `gen fn`.
9880
9881The tracking issue for this feature is: [#117078]
9882
9883[#117078]: https://github.com/rust-lang/rust/issues/117078
9884
9885------------------------
9886"##,
9887 default_severity: Severity::Allow,
9888 warn_since: None,
9889 deny_since: None,
9890 },
9891 Lint {
9892 label: "gen_future",
9893 description: r##"# `gen_future`
9894
9895
9896
9897This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
9898
9899------------------------
9900"##,
9901 default_severity: Severity::Allow,
9902 warn_since: None,
9903 deny_since: None,
9904 },
9905 Lint {
9906 label: "generic_assert",
9907 description: r##"# `generic_assert`
9908
9909Outputs useful `assert!` messages
9910
9911This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
9912
9913------------------------
9914"##,
9915 default_severity: Severity::Allow,
9916 warn_since: None,
9917 deny_since: None,
9918 },
9919 Lint {
9920 label: "generic_assert_internals",
9921 description: r##"# `generic_assert_internals`
9922
9923
9924
9925The tracking issue for this feature is: [#44838]
9926
9927[#44838]: https://github.com/rust-lang/rust/issues/44838
9928
9929------------------------
9930"##,
9931 default_severity: Severity::Allow,
9932 warn_since: None,
9933 deny_since: None,
9934 },
9935 Lint {
9936 label: "generic_atomic",
9937 description: r##"# `generic_atomic`
9938
9939
9940
9941The tracking issue for this feature is: [#130539]
9942
9943[#130539]: https://github.com/rust-lang/rust/issues/130539
9944
9945------------------------
9946"##,
9947 default_severity: Severity::Allow,
9948 warn_since: None,
9949 deny_since: None,
9950 },
9951 Lint {
9952 label: "generic_const_exprs",
9953 description: r##"# generic_const_exprs
9954
9955Allows non-trivial generic constants which have to be shown to successfully evaluate
9956to a value by being part of an item signature.
9957
9958The tracking issue for this feature is: [#76560]
9959
9960
9961[#76560]: https://github.com/rust-lang/rust/issues/76560
9962
9963------------------------
9964
9965Warning: This feature is incomplete; its design and syntax may change.
9966
9967See also: [gca_min_const_items], [gca_const_items]
9968
9969[gca_min_const_items]: gca-min-const-items.md
9970[gca_const_items]: gca-const-items.md
9971
9972## Examples
9973
9974```rust
9975#![allow(incomplete_features)]
9976#![feature(generic_const_exprs)]
9977
9978// Use parameters that depend on a generic argument.
9979struct Foo<const N: usize>
9980where
9981 [(); N + 1]:,
9982{
9983 array: [usize; N + 1],
9984}
9985
9986// Use generic parameters in const operations.
9987trait Bar {
9988 const X: usize;
9989 const Y: usize;
9990}
9991
9992// Note `B::X * B::Y`.
9993const fn baz<B: Bar>(x: [usize; B::X], y: [usize; B::Y]) -> [usize; B::X * B::Y] {
9994 let mut out = [0; B::X * B::Y];
9995 let mut i = 0;
9996 while i < B::Y {
9997 let mut j = 0;
9998 while j < B::X {
9999 out[i * B::X + j] = y[i].saturating_mul(x[j]);
10000 j += 1;
10001 }
10002 i += 1;
10003 }
10004 out
10005}
10006
10007
10008// Create a new type based on a generic argument.
10009pub struct Grow<const N: usize> {
10010 arr: [usize; N],
10011}
10012
10013impl<const N: usize> Grow<N> {
10014 pub const fn grow(self, val: usize) -> Grow<{ N + 1 }> {
10015 let mut new_arr = [0; { N + 1 }];
10016 let mut idx = 0;
10017 while idx < N {
10018 new_arr[idx] = self.arr[idx];
10019 idx += 1;
10020 }
10021 new_arr[N] = val;
10022 Grow { arr: new_arr }
10023 }
10024}
10025```
10026"##,
10027 default_severity: Severity::Allow,
10028 warn_since: None,
10029 deny_since: None,
10030 },
10031 Lint {
10032 label: "generic_const_items",
10033 description: r##"# generic_const_items
10034
10035Allows generic parameters and where-clauses on free & associated const items.
10036
10037The tracking issue for this feature is: [#113521]
10038
10039[#113521]: https://github.com/rust-lang/rust/issues/113521
10040
10041------------------------
10042
10043Warning: This feature is an [experiment] and lacks an RFC.
10044There are no guarantees that it will ever be stabilized.
10045
10046See also: [generic_const_exprs], [gca_min_const_items].
10047
10048[experiment]: https://lang-team.rust-lang.org/how_to/experiment.html
10049[generic_const_exprs]: generic-const-exprs.md
10050[gca_min_const_items]: gca-min-const-items.md
10051
10052## Examples
10053
10054### Generic constant values
10055
10056```rust
10057#![allow(incomplete_features)]
10058#![feature(generic_const_items)]
10059
10060const GENERIC_VAL<const ARG: usize>: usize = ARG + 1;
10061
10062#[test]
10063fn generic_const_arg() {
10064 assert_eq!(GENERIC_VAL::<1>, 2);
10065 assert_eq!(GENERIC_VAL::<2>, 3);
10066}
10067```
10068
10069### Conditional constants
10070
10071```rust
10072#![allow(incomplete_features)]
10073#![feature(generic_const_items)]
10074
10075// `GENERIC_VAL::<0>` will fail to compile
10076const GENERIC_VAL<const ARG: usize>: usize = if ARG > 0 { ARG + 1 } else { panic!("0 value") };
10077
10078// Will fail to compile if the `Copy` derive is removed.
10079const COPY_MARKER<C: Copy>: () = ();
10080
10081#[derive(Clone, Copy)]
10082struct Foo;
10083
10084const FOO_IS_COPY: () = COPY_MARKER::<Foo>;
10085```
10086"##,
10087 default_severity: Severity::Allow,
10088 warn_since: None,
10089 deny_since: None,
10090 },
10091 Lint {
10092 label: "generic_const_parameter_types",
10093 description: r##"# `generic_const_parameter_types`
10094
10095Allows the type of const generics to depend on generic parameters
10096
10097The tracking issue for this feature is: [#137626]
10098
10099[#137626]: https://github.com/rust-lang/rust/issues/137626
10100
10101------------------------
10102"##,
10103 default_severity: Severity::Allow,
10104 warn_since: None,
10105 deny_since: None,
10106 },
10107 Lint {
10108 label: "generic_pattern_types",
10109 description: r##"# `generic_pattern_types`
10110
10111Allows any generic constants being used as pattern type range ends
10112
10113The tracking issue for this feature is: [#136574]
10114
10115[#136574]: https://github.com/rust-lang/rust/issues/136574
10116
10117------------------------
10118"##,
10119 default_severity: Severity::Allow,
10120 warn_since: None,
10121 deny_since: None,
10122 },
10123 Lint {
10124 label: "get_disjoint_mut_helpers",
10125 description: r##"# `get_disjoint_mut_helpers`
10126
10127
10128
10129This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10130
10131------------------------
10132"##,
10133 default_severity: Severity::Allow,
10134 warn_since: None,
10135 deny_since: None,
10136 },
10137 Lint {
10138 label: "get_mut_unchecked",
10139 description: r##"# `get_mut_unchecked`
10140
10141
10142
10143The tracking issue for this feature is: [#63292]
10144
10145[#63292]: https://github.com/rust-lang/rust/issues/63292
10146
10147------------------------
10148"##,
10149 default_severity: Severity::Allow,
10150 warn_since: None,
10151 deny_since: None,
10152 },
10153 Lint {
10154 label: "get_set_bit",
10155 description: r##"# `get_set_bit`
10156
10157
10158
10159The tracking issue for this feature is: [#147702]
10160
10161[#147702]: https://github.com/rust-lang/rust/issues/147702
10162
10163------------------------
10164"##,
10165 default_severity: Severity::Allow,
10166 warn_since: None,
10167 deny_since: None,
10168 },
10169 Lint {
10170 label: "gethostname",
10171 description: r##"# `gethostname`
10172
10173
10174
10175The tracking issue for this feature is: [#135142]
10176
10177[#135142]: https://github.com/rust-lang/rust/issues/135142
10178
10179------------------------
10180"##,
10181 default_severity: Severity::Allow,
10182 warn_since: None,
10183 deny_since: None,
10184 },
10185 Lint {
10186 label: "global_registration",
10187 description: r##"# `global_registration`
10188
10189Allows registering static items globally, possibly across crates, to iterate over at runtime.
10190
10191The tracking issue for this feature is: [#125119]
10192
10193[#125119]: https://github.com/rust-lang/rust/issues/125119
10194
10195------------------------
10196"##,
10197 default_severity: Severity::Allow,
10198 warn_since: None,
10199 deny_since: None,
10200 },
10201 Lint {
10202 label: "gpu_intrinsics",
10203 description: r##"# `gpu_intrinsics`
10204
10205
10206
10207This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10208
10209------------------------
10210"##,
10211 default_severity: Severity::Allow,
10212 warn_since: None,
10213 deny_since: None,
10214 },
10215 Lint {
10216 label: "gpu_offload",
10217 description: r##"# `gpu_offload`
10218
10219
10220
10221The tracking issue for this feature is: [#131513]
10222
10223[#131513]: https://github.com/rust-lang/rust/issues/131513
10224
10225------------------------
10226"##,
10227 default_severity: Severity::Allow,
10228 warn_since: None,
10229 deny_since: None,
10230 },
10231 Lint {
10232 label: "guard_patterns",
10233 description: r##"# `guard_patterns`
10234
10235Allows using guards in patterns.
10236
10237The tracking issue for this feature is: [#129967]
10238
10239[#129967]: https://github.com/rust-lang/rust/issues/129967
10240
10241------------------------
10242"##,
10243 default_severity: Severity::Allow,
10244 warn_since: None,
10245 deny_since: None,
10246 },
10247 Lint {
10248 label: "half_open_range_patterns_in_slices",
10249 description: r##"# `half_open_range_patterns_in_slices`
10250
10251The tracking issue for this feature is: [#67264].
10252
10253[#67264]: https://github.com/rust-lang/rust/issues/67264
10254-----
10255
10256This feature allow using top-level half-open range patterns in slices.
10257
10258```rust
10259#![feature(half_open_range_patterns_in_slices)]
10260
10261fn main() {
10262 let xs = [13, 1, 5, 2, 3, 1, 21, 8];
10263 let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs else { return; };
10264}
10265```
10266
10267Note that this feature is not required if the patterns are wrapped between parenthesis.
10268
10269```rust
10270fn main() {
10271 let xs = [13, 1];
10272 let [(a @ 3..), c] = xs else { return; };
10273}
10274```
10275"##,
10276 default_severity: Severity::Allow,
10277 warn_since: None,
10278 deny_since: None,
10279 },
10280 Lint {
10281 label: "hash_map_internals",
10282 description: r##"# `hash_map_internals`
10283
10284
10285
10286This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10287
10288------------------------
10289"##,
10290 default_severity: Severity::Allow,
10291 warn_since: None,
10292 deny_since: None,
10293 },
10294 Lint {
10295 label: "hash_map_macro",
10296 description: r##"# `hash_map_macro`
10297
10298
10299
10300The tracking issue for this feature is: [#144032]
10301
10302[#144032]: https://github.com/rust-lang/rust/issues/144032
10303
10304------------------------
10305"##,
10306 default_severity: Severity::Allow,
10307 warn_since: None,
10308 deny_since: None,
10309 },
10310 Lint {
10311 label: "hash_set_entry",
10312 description: r##"# `hash_set_entry`
10313
10314
10315
10316The tracking issue for this feature is: [#60896]
10317
10318[#60896]: https://github.com/rust-lang/rust/issues/60896
10319
10320------------------------
10321"##,
10322 default_severity: Severity::Allow,
10323 warn_since: None,
10324 deny_since: None,
10325 },
10326 Lint {
10327 label: "hasher_prefixfree_extras",
10328 description: r##"# `hasher_prefixfree_extras`
10329
10330
10331
10332The tracking issue for this feature is: [#96762]
10333
10334[#96762]: https://github.com/rust-lang/rust/issues/96762
10335
10336------------------------
10337"##,
10338 default_severity: Severity::Allow,
10339 warn_since: None,
10340 deny_since: None,
10341 },
10342 Lint {
10343 label: "hashmap_internals",
10344 description: r##"# `hashmap_internals`
10345
10346
10347
10348This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10349
10350------------------------
10351"##,
10352 default_severity: Severity::Allow,
10353 warn_since: None,
10354 deny_since: None,
10355 },
10356 Lint {
10357 label: "hexagon_target_feature",
10358 description: r##"# `hexagon_target_feature`
10359
10360Target features on hexagon.
10361
10362The tracking issue for this feature is: [#150250]
10363
10364[#150250]: https://github.com/rust-lang/rust/issues/150250
10365
10366------------------------
10367"##,
10368 default_severity: Severity::Allow,
10369 warn_since: None,
10370 deny_since: None,
10371 },
10372 Lint {
10373 label: "hint_must_use",
10374 description: r##"# `hint_must_use`
10375
10376
10377
10378The tracking issue for this feature is: [#94745]
10379
10380[#94745]: https://github.com/rust-lang/rust/issues/94745
10381
10382------------------------
10383"##,
10384 default_severity: Severity::Allow,
10385 warn_since: None,
10386 deny_since: None,
10387 },
10388 Lint {
10389 label: "hint_prefetch",
10390 description: r##"# `hint_prefetch`
10391
10392
10393
10394The tracking issue for this feature is: [#146941]
10395
10396[#146941]: https://github.com/rust-lang/rust/issues/146941
10397
10398------------------------
10399"##,
10400 default_severity: Severity::Allow,
10401 warn_since: None,
10402 deny_since: None,
10403 },
10404 Lint {
10405 label: "impl_restriction",
10406 description: r##"# `impl_restriction`
10407
10408Allows `impl(crate) trait Foo` restrictions.
10409
10410The tracking issue for this feature is: [#105077]
10411
10412[#105077]: https://github.com/rust-lang/rust/issues/105077
10413
10414------------------------
10415"##,
10416 default_severity: Severity::Allow,
10417 warn_since: None,
10418 deny_since: None,
10419 },
10420 Lint {
10421 label: "impl_trait_in_assoc_type",
10422 description: r##"# `impl_trait_in_assoc_type`
10423
10424Allows `impl Trait` to be used inside associated types (RFC 2515).
10425
10426The tracking issue for this feature is: [#63063]
10427
10428[#63063]: https://github.com/rust-lang/rust/issues/63063
10429
10430------------------------
10431"##,
10432 default_severity: Severity::Allow,
10433 warn_since: None,
10434 deny_since: None,
10435 },
10436 Lint {
10437 label: "impl_trait_in_bindings",
10438 description: r##"# `impl_trait_in_bindings`
10439
10440Allows `impl Trait` in bindings (`let`).
10441
10442The tracking issue for this feature is: [#63065]
10443
10444[#63065]: https://github.com/rust-lang/rust/issues/63065
10445
10446------------------------
10447"##,
10448 default_severity: Severity::Allow,
10449 warn_since: None,
10450 deny_since: None,
10451 },
10452 Lint {
10453 label: "impl_trait_in_fn_trait_return",
10454 description: r##"# `impl_trait_in_fn_trait_return`
10455
10456Allows `impl Trait` as output type in `Fn` traits in return position of functions.
10457
10458The tracking issue for this feature is: [#99697]
10459
10460[#99697]: https://github.com/rust-lang/rust/issues/99697
10461
10462------------------------
10463"##,
10464 default_severity: Severity::Allow,
10465 warn_since: None,
10466 deny_since: None,
10467 },
10468 Lint {
10469 label: "import_trait_associated_functions",
10470 description: r##"# import_trait_associated_functions
10471
10472The tracking issue for this feature is: [#134691]
10473
10474[#134691]: https://github.com/rust-lang/rust/issues/134691
10475
10476------------------------
10477
10478This feature allows importing associated functions and constants from traits and then using them like regular items.
10479
10480```rust
10481#![feature(import_trait_associated_functions)]
10482
10483use std::ops::Add::add;
10484
10485fn main() {
10486 let numbers = vec![1, 2, 3, 4, 5, 6];
10487 let sum = numbers.into_iter().reduce(add); // instead of `.reduce(Add:add)`
10488
10489 assert_eq!(sum, Some(21));
10490}
10491```
10492"##,
10493 default_severity: Severity::Allow,
10494 warn_since: None,
10495 deny_since: None,
10496 },
10497 Lint {
10498 label: "inherent_associated_types",
10499 description: r##"# `inherent_associated_types`
10500
10501Allows associated types in inherent impls.
10502
10503The tracking issue for this feature is: [#8995]
10504
10505[#8995]: https://github.com/rust-lang/rust/issues/8995
10506
10507------------------------
10508"##,
10509 default_severity: Severity::Allow,
10510 warn_since: None,
10511 deny_since: None,
10512 },
10513 Lint {
10514 label: "inplace_iteration",
10515 description: r##"# `inplace_iteration`
10516
10517
10518
10519This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10520
10521------------------------
10522"##,
10523 default_severity: Severity::Allow,
10524 warn_since: None,
10525 deny_since: None,
10526 },
10527 Lint {
10528 label: "instrument_fn",
10529 description: r##"# `instrument_fn`
10530
10531Enable #[instrument_fn] on function.
10532
10533The tracking issue for this feature is: [#157081]
10534
10535[#157081]: https://github.com/rust-lang/rust/issues/157081
10536
10537------------------------
10538"##,
10539 default_severity: Severity::Allow,
10540 warn_since: None,
10541 deny_since: None,
10542 },
10543 Lint {
10544 label: "int_from_ascii",
10545 description: r##"# `int_from_ascii`
10546
10547
10548
10549The tracking issue for this feature is: [#134821]
10550
10551[#134821]: https://github.com/rust-lang/rust/issues/134821
10552
10553------------------------
10554"##,
10555 default_severity: Severity::Allow,
10556 warn_since: None,
10557 deny_since: None,
10558 },
10559 Lint {
10560 label: "int_roundings",
10561 description: r##"# `int_roundings`
10562
10563
10564
10565The tracking issue for this feature is: [#88581]
10566
10567[#88581]: https://github.com/rust-lang/rust/issues/88581
10568
10569------------------------
10570"##,
10571 default_severity: Severity::Allow,
10572 warn_since: None,
10573 deny_since: None,
10574 },
10575 Lint {
10576 label: "integer_atomics",
10577 description: r##"# `integer_atomics`
10578
10579
10580
10581The tracking issue for this feature is: [#99069]
10582
10583[#99069]: https://github.com/rust-lang/rust/issues/99069
10584
10585------------------------
10586"##,
10587 default_severity: Severity::Allow,
10588 warn_since: None,
10589 deny_since: None,
10590 },
10591 Lint {
10592 label: "integer_cast_extras",
10593 description: r##"# `integer_cast_extras`
10594
10595
10596
10597The tracking issue for this feature is: [#154650]
10598
10599[#154650]: https://github.com/rust-lang/rust/issues/154650
10600
10601------------------------
10602"##,
10603 default_severity: Severity::Allow,
10604 warn_since: None,
10605 deny_since: None,
10606 },
10607 Lint {
10608 label: "integer_casts",
10609 description: r##"# `integer_casts`
10610
10611
10612
10613The tracking issue for this feature is: [#157388]
10614
10615[#157388]: https://github.com/rust-lang/rust/issues/157388
10616
10617------------------------
10618"##,
10619 default_severity: Severity::Allow,
10620 warn_since: None,
10621 deny_since: None,
10622 },
10623 Lint {
10624 label: "integer_widen_truncate",
10625 description: r##"# `integer_widen_truncate`
10626
10627
10628
10629The tracking issue for this feature is: [#154330]
10630
10631[#154330]: https://github.com/rust-lang/rust/issues/154330
10632
10633------------------------
10634"##,
10635 default_severity: Severity::Allow,
10636 warn_since: None,
10637 deny_since: None,
10638 },
10639 Lint {
10640 label: "internal_output_capture",
10641 description: r##"# `internal_output_capture`
10642
10643This feature is internal to the Rust compiler and is not intended for general use.
10644
10645------------------------
10646"##,
10647 default_severity: Severity::Allow,
10648 warn_since: None,
10649 deny_since: None,
10650 },
10651 Lint {
10652 label: "internal_syntax",
10653 description: r##"# `internal_syntax`
10654
10655Allows internal syntax.
10656
10657The tracking issue for this feature is: [#110680]
10658
10659[#110680]: https://github.com/rust-lang/rust/issues/110680
10660
10661------------------------
10662"##,
10663 default_severity: Severity::Allow,
10664 warn_since: None,
10665 deny_since: None,
10666 },
10667 Lint {
10668 label: "intra_doc_pointers",
10669 description: r##"# `intra-doc-pointers`
10670
10671The tracking issue for this feature is: [#80896]
10672
10673[#80896]: https://github.com/rust-lang/rust/issues/80896
10674
10675------------------------
10676
10677Rustdoc does not currently allow disambiguating between `*const` and `*mut`, and
10678raw pointers in intra-doc links are unstable until it does.
10679
10680```rust
10681#![feature(intra_doc_pointers)]
10682//! [pointer::add]
10683```
10684"##,
10685 default_severity: Severity::Allow,
10686 warn_since: None,
10687 deny_since: None,
10688 },
10689 Lint {
10690 label: "intrinsics",
10691 description: r##"# `intrinsics`
10692
10693The tracking issue for this feature is: None.
10694
10695Intrinsics are rarely intended to be stable directly, but are usually
10696exported in some sort of stable manner. Prefer using the stable interfaces to
10697the intrinsic directly when you can.
10698
10699------------------------
10700
10701
10702## Intrinsics with fallback logic
10703
10704Many intrinsics can be written in pure rust, albeit inefficiently or without supporting
10705some features that only exist on some backends. Backends can simply not implement those
10706intrinsics without causing any code miscompilations or failures to compile.
10707All intrinsic fallback bodies are automatically made cross-crate inlineable (like `#[inline]`)
10708by the codegen backend, but not the MIR inliner.
10709
10710```rust
10711#![feature(intrinsics)]
10712#![allow(internal_features)]
10713
10714#[rustc_intrinsic]
10715const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {}
10716```
10717
10718Since these are just regular functions, it is perfectly ok to create the intrinsic twice:
10719
10720```rust
10721#![feature(intrinsics)]
10722#![allow(internal_features)]
10723
10724#[rustc_intrinsic]
10725const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {}
10726
10727mod foo {
10728 #[rustc_intrinsic]
10729 const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {
10730 panic!("noisy const dealloc")
10731 }
10732}
10733
10734```
10735
10736The behaviour on backends that override the intrinsic is exactly the same. On other
10737backends, the intrinsic behaviour depends on which implementation is called, just like
10738with any regular function.
10739
10740## Intrinsics lowered to MIR instructions
10741
10742Various intrinsics have native MIR operations that they correspond to. Instead of requiring
10743backends to implement both the intrinsic and the MIR operation, the `lower_intrinsics` pass
10744will convert the calls to the MIR operation. Backends do not need to know about these intrinsics
10745at all. These intrinsics only make sense without a body, and can be declared as a `#[rustc_intrinsic]`.
10746The body is never used as the lowering pass implements support for all backends, so we never have to
10747use the fallback logic.
10748
10749## Intrinsics without fallback logic
10750
10751These must be implemented by all backends.
10752
10753### `#[rustc_intrinsic]` declarations
10754
10755These are written without a body:
10756```rust
10757#![feature(intrinsics)]
10758#![allow(internal_features)]
10759
10760#[rustc_intrinsic]
10761pub fn abort_immediate() -> !;
10762```
10763"##,
10764 default_severity: Severity::Allow,
10765 warn_since: None,
10766 deny_since: None,
10767 },
10768 Lint {
10769 label: "io_const_error",
10770 description: r##"# `io_const_error`
10771
10772
10773
10774The tracking issue for this feature is: [#133448]
10775
10776[#133448]: https://github.com/rust-lang/rust/issues/133448
10777
10778------------------------
10779"##,
10780 default_severity: Severity::Allow,
10781 warn_since: None,
10782 deny_since: None,
10783 },
10784 Lint {
10785 label: "io_const_error_internals",
10786 description: r##"# `io_const_error_internals`
10787
10788
10789
10790This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10791
10792------------------------
10793"##,
10794 default_severity: Severity::Allow,
10795 warn_since: None,
10796 deny_since: None,
10797 },
10798 Lint {
10799 label: "io_copy_internals",
10800 description: r##"# `io_copy_internals`
10801
10802
10803
10804This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10805
10806------------------------
10807"##,
10808 default_severity: Severity::Allow,
10809 warn_since: None,
10810 deny_since: None,
10811 },
10812 Lint {
10813 label: "io_error_inprogress",
10814 description: r##"# `io_error_inprogress`
10815
10816
10817
10818The tracking issue for this feature is: [#130840]
10819
10820[#130840]: https://github.com/rust-lang/rust/issues/130840
10821
10822------------------------
10823"##,
10824 default_severity: Severity::Allow,
10825 warn_since: None,
10826 deny_since: None,
10827 },
10828 Lint {
10829 label: "io_error_input_output_error",
10830 description: r##"# `io_error_input_output_error`
10831
10832
10833
10834The tracking issue for this feature is: [#159066]
10835
10836[#159066]: https://github.com/rust-lang/rust/issues/159066
10837
10838------------------------
10839"##,
10840 default_severity: Severity::Allow,
10841 warn_since: None,
10842 deny_since: None,
10843 },
10844 Lint {
10845 label: "io_error_more",
10846 description: r##"# `io_error_more`
10847
10848
10849
10850The tracking issue for this feature is: [#86442]
10851
10852[#86442]: https://github.com/rust-lang/rust/issues/86442
10853
10854------------------------
10855"##,
10856 default_severity: Severity::Allow,
10857 warn_since: None,
10858 deny_since: None,
10859 },
10860 Lint {
10861 label: "io_error_too_many_open_files",
10862 description: r##"# `io_error_too_many_open_files`
10863
10864
10865
10866The tracking issue for this feature is: [#158319]
10867
10868[#158319]: https://github.com/rust-lang/rust/issues/158319
10869
10870------------------------
10871"##,
10872 default_severity: Severity::Allow,
10873 warn_since: None,
10874 deny_since: None,
10875 },
10876 Lint {
10877 label: "io_error_uncategorized",
10878 description: r##"# `io_error_uncategorized`
10879
10880
10881
10882This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10883
10884------------------------
10885"##,
10886 default_severity: Severity::Allow,
10887 warn_since: None,
10888 deny_since: None,
10889 },
10890 Lint {
10891 label: "io_slice_as_bytes",
10892 description: r##"# `io_slice_as_bytes`
10893
10894
10895
10896The tracking issue for this feature is: [#132818]
10897
10898[#132818]: https://github.com/rust-lang/rust/issues/132818
10899
10900------------------------
10901"##,
10902 default_severity: Severity::Allow,
10903 warn_since: None,
10904 deny_since: None,
10905 },
10906 Lint {
10907 label: "io_slice_const",
10908 description: r##"# `io_slice_const`
10909
10910
10911
10912The tracking issue for this feature is: [#146459]
10913
10914[#146459]: https://github.com/rust-lang/rust/issues/146459
10915
10916------------------------
10917"##,
10918 default_severity: Severity::Allow,
10919 warn_since: None,
10920 deny_since: None,
10921 },
10922 Lint {
10923 label: "ip",
10924 description: r##"# `ip`
10925
10926
10927
10928The tracking issue for this feature is: [#27709]
10929
10930[#27709]: https://github.com/rust-lang/rust/issues/27709
10931
10932------------------------
10933"##,
10934 default_severity: Severity::Allow,
10935 warn_since: None,
10936 deny_since: None,
10937 },
10938 Lint {
10939 label: "ip_as_octets",
10940 description: r##"# `ip_as_octets`
10941
10942
10943
10944The tracking issue for this feature is: [#137259]
10945
10946[#137259]: https://github.com/rust-lang/rust/issues/137259
10947
10948------------------------
10949"##,
10950 default_severity: Severity::Allow,
10951 warn_since: None,
10952 deny_since: None,
10953 },
10954 Lint {
10955 label: "ip_multicast_reserved",
10956 description: r##"# `ip_multicast_reserved`
10957
10958
10959
10960This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
10961
10962------------------------
10963"##,
10964 default_severity: Severity::Allow,
10965 warn_since: None,
10966 deny_since: None,
10967 },
10968 Lint {
10969 label: "ipv6_hop_limit",
10970 description: r##"# `ipv6_hop_limit`
10971
10972
10973
10974The tracking issue for this feature is: [#139166]
10975
10976[#139166]: https://github.com/rust-lang/rust/issues/139166
10977
10978------------------------
10979"##,
10980 default_severity: Severity::Allow,
10981 warn_since: None,
10982 deny_since: None,
10983 },
10984 Lint {
10985 label: "is_ascii_octdigit",
10986 description: r##"# `is_ascii_octdigit`
10987
10988
10989
10990The tracking issue for this feature is: [#101288]
10991
10992[#101288]: https://github.com/rust-lang/rust/issues/101288
10993
10994------------------------
10995"##,
10996 default_severity: Severity::Allow,
10997 warn_since: None,
10998 deny_since: None,
10999 },
11000 Lint {
11001 label: "iter_advance_by",
11002 description: r##"# `iter_advance_by`
11003
11004
11005
11006The tracking issue for this feature is: [#77404]
11007
11008[#77404]: https://github.com/rust-lang/rust/issues/77404
11009
11010------------------------
11011"##,
11012 default_severity: Severity::Allow,
11013 warn_since: None,
11014 deny_since: None,
11015 },
11016 Lint {
11017 label: "iter_array_chunks",
11018 description: r##"# `iter_array_chunks`
11019
11020
11021
11022The tracking issue for this feature is: [#100450]
11023
11024[#100450]: https://github.com/rust-lang/rust/issues/100450
11025
11026------------------------
11027"##,
11028 default_severity: Severity::Allow,
11029 warn_since: None,
11030 deny_since: None,
11031 },
11032 Lint {
11033 label: "iter_collect_into",
11034 description: r##"# `iter_collect_into`
11035
11036
11037
11038The tracking issue for this feature is: [#94780]
11039
11040[#94780]: https://github.com/rust-lang/rust/issues/94780
11041
11042------------------------
11043"##,
11044 default_severity: Severity::Allow,
11045 warn_since: None,
11046 deny_since: None,
11047 },
11048 Lint {
11049 label: "iter_from_coroutine",
11050 description: r##"# `iter_from_coroutine`
11051
11052
11053
11054The tracking issue for this feature is: [#43122]
11055
11056[#43122]: https://github.com/rust-lang/rust/issues/43122
11057
11058------------------------
11059"##,
11060 default_severity: Severity::Allow,
11061 warn_since: None,
11062 deny_since: None,
11063 },
11064 Lint {
11065 label: "iter_intersperse",
11066 description: r##"# `iter_intersperse`
11067
11068
11069
11070The tracking issue for this feature is: [#79524]
11071
11072[#79524]: https://github.com/rust-lang/rust/issues/79524
11073
11074------------------------
11075"##,
11076 default_severity: Severity::Allow,
11077 warn_since: None,
11078 deny_since: None,
11079 },
11080 Lint {
11081 label: "iter_is_partitioned",
11082 description: r##"# `iter_is_partitioned`
11083
11084
11085
11086The tracking issue for this feature is: [#62544]
11087
11088[#62544]: https://github.com/rust-lang/rust/issues/62544
11089
11090------------------------
11091"##,
11092 default_severity: Severity::Allow,
11093 warn_since: None,
11094 deny_since: None,
11095 },
11096 Lint {
11097 label: "iter_macro",
11098 description: r##"# `iter_macro`
11099
11100
11101
11102The tracking issue for this feature is: [#142269]
11103
11104[#142269]: https://github.com/rust-lang/rust/issues/142269
11105
11106------------------------
11107"##,
11108 default_severity: Severity::Allow,
11109 warn_since: None,
11110 deny_since: None,
11111 },
11112 Lint {
11113 label: "iter_map_windows",
11114 description: r##"# `iter_map_windows`
11115
11116
11117
11118The tracking issue for this feature is: [#87155]
11119
11120[#87155]: https://github.com/rust-lang/rust/issues/87155
11121
11122------------------------
11123"##,
11124 default_severity: Severity::Allow,
11125 warn_since: None,
11126 deny_since: None,
11127 },
11128 Lint {
11129 label: "iter_next_chunk",
11130 description: r##"# `iter_next_chunk`
11131
11132
11133
11134The tracking issue for this feature is: [#98326]
11135
11136[#98326]: https://github.com/rust-lang/rust/issues/98326
11137
11138------------------------
11139"##,
11140 default_severity: Severity::Allow,
11141 warn_since: None,
11142 deny_since: None,
11143 },
11144 Lint {
11145 label: "iter_order_by",
11146 description: r##"# `iter_order_by`
11147
11148
11149
11150The tracking issue for this feature is: [#64295]
11151
11152[#64295]: https://github.com/rust-lang/rust/issues/64295
11153
11154------------------------
11155"##,
11156 default_severity: Severity::Allow,
11157 warn_since: None,
11158 deny_since: None,
11159 },
11160 Lint {
11161 label: "iter_partition_in_place",
11162 description: r##"# `iter_partition_in_place`
11163
11164
11165
11166The tracking issue for this feature is: [#62543]
11167
11168[#62543]: https://github.com/rust-lang/rust/issues/62543
11169
11170------------------------
11171"##,
11172 default_severity: Severity::Allow,
11173 warn_since: None,
11174 deny_since: None,
11175 },
11176 Lint {
11177 label: "iterator_try_collect",
11178 description: r##"# `iterator_try_collect`
11179
11180
11181
11182The tracking issue for this feature is: [#94047]
11183
11184[#94047]: https://github.com/rust-lang/rust/issues/94047
11185
11186------------------------
11187"##,
11188 default_severity: Severity::Allow,
11189 warn_since: None,
11190 deny_since: None,
11191 },
11192 Lint {
11193 label: "iterator_try_reduce",
11194 description: r##"# `iterator_try_reduce`
11195
11196
11197
11198The tracking issue for this feature is: [#87053]
11199
11200[#87053]: https://github.com/rust-lang/rust/issues/87053
11201
11202------------------------
11203"##,
11204 default_severity: Severity::Allow,
11205 warn_since: None,
11206 deny_since: None,
11207 },
11208 Lint {
11209 label: "junction_point",
11210 description: r##"# `junction_point`
11211
11212
11213
11214The tracking issue for this feature is: [#121709]
11215
11216[#121709]: https://github.com/rust-lang/rust/issues/121709
11217
11218------------------------
11219"##,
11220 default_severity: Severity::Allow,
11221 warn_since: None,
11222 deny_since: None,
11223 },
11224 Lint {
11225 label: "lahfsahf_target_feature",
11226 description: r##"# `lahfsahf_target_feature`
11227
11228lahfsahf target feature on x86.
11229
11230The tracking issue for this feature is: [#150251]
11231
11232[#150251]: https://github.com/rust-lang/rust/issues/150251
11233
11234------------------------
11235"##,
11236 default_severity: Severity::Allow,
11237 warn_since: None,
11238 deny_since: None,
11239 },
11240 Lint {
11241 label: "lang_items",
11242 description: r##"# `lang_items`
11243
11244The tracking issue for this feature is: None.
11245
11246------------------------
11247
11248The `rustc` compiler has certain pluggable operations, that is,
11249functionality that isn't hard-coded into the language, but is
11250implemented in libraries, with a special marker to tell the compiler
11251it exists. The marker is the attribute `#[lang = "..."]` and there are
11252various different values of `...`, i.e. various different 'lang
11253items'. Most of them can only be defined once.
11254
11255Lang items are loaded lazily by the compiler; e.g. if one never uses `Box`
11256then there is no need to define a function for `exchange_malloc`.
11257`rustc` will emit an error when an item is needed but not found in the current
11258crate or any that it depends on.
11259
11260Some features provided by lang items:
11261
11262- overloadable operators via traits: the traits corresponding to the
11263 `==`, `<`, dereferencing (`*`) and `+` (etc.) operators are all
11264 marked with lang items; those specific four are `eq`, `partial_ord`,
11265 `deref`/`deref_mut`, and `add` respectively.
11266- panicking: the `panic` and `panic_impl` lang items, among others.
11267- stack unwinding: the lang item `eh_personality` is a function used by the
11268 failure mechanisms of the compiler. This is often mapped to GCC's personality
11269 function (see the [`std` implementation][personality] for more information),
11270 but programs which don't trigger a panic can be assured that this function is
11271 never called.
11272- the traits in `core::marker` used to indicate types of
11273 various kinds; e.g. lang items `sized`, `sync` and `copy`.
11274- memory allocation, see below.
11275
11276Most lang items are defined by `core`, but if you're trying to build
11277an executable without the `std` crate, you might run into the need
11278for lang item definitions.
11279
11280[personality]: https://github.com/rust-lang/rust/blob/HEAD/library/std/src/sys/personality/gcc.rs
11281
11282## Example: Implementing a `Box`
11283
11284`Box` pointers require two lang items: one for the type itself and one for
11285allocation. A freestanding program that uses the `Box` sugar for dynamic
11286allocations via `malloc` and `free`:
11287
11288```rust,ignore (libc-is-finicky)
11289#![feature(lang_items, core_intrinsics, rustc_private, panic_unwind, rustc_attrs)]
11290#![allow(internal_features)]
11291#![no_std]
11292#![no_main]
11293
11294extern crate libc;
11295extern crate unwind;
11296
11297use core::ffi::{c_int, c_void};
11298use core::intrinsics;
11299use core::panic::PanicInfo;
11300use core::ptr::NonNull;
11301
11302pub struct Global; // the global allocator
11303struct Unique<T>(NonNull<T>);
11304
11305#[lang = "owned_box"]
11306pub struct Box<T, A = Global>(Unique<T>, A);
11307
11308impl<T> Box<T> {
11309 pub fn new(x: T) -> Self {
11310 #[rustc_box]
11311 Box::new(x)
11312 }
11313}
11314
11315impl<T, A> Drop for Box<T, A> {
11316 fn drop(&mut self) {
11317 unsafe {
11318 libc::free(self.0.0.as_ptr() as *mut c_void);
11319 }
11320 }
11321}
11322
11323#[lang = "exchange_malloc"]
11324unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
11325 let p = libc::malloc(size) as *mut u8;
11326
11327 // Check if `malloc` failed:
11328 if p.is_null() {
11329 intrinsics::abort_immediate();
11330 }
11331
11332 p
11333}
11334
11335#[no_mangle]
11336extern "C" fn main(_argc: c_int, _argv: *const *const u8) -> c_int {
11337 let _x = Box::new(1);
11338
11339 0
11340}
11341
11342#[lang = "eh_personality"]
11343fn rust_eh_personality() {}
11344
11345#[panic_handler]
11346fn panic_handler(_info: &PanicInfo) -> ! { intrinsics::abort_immediate() }
11347```
11348
11349Note the use of `abort`: the `exchange_malloc` lang item is assumed to
11350return a valid pointer, and so needs to do the check internally.
11351
11352## List of all language items
11353
11354An up-to-date list of all language items can be found [here] in the compiler code.
11355
11356[here]: https://github.com/rust-lang/rust/blob/ac62df9b49f9b9036af2a4957db70bf3850785e1/compiler/rustc_attr_ir/src/lang_items.rs#L158
11357"##,
11358 default_severity: Severity::Allow,
11359 warn_since: None,
11360 deny_since: None,
11361 },
11362 Lint {
11363 label: "large_assignments",
11364 description: r##"# `large_assignments`
11365
11366Allows setting the threshold for the `large_assignments` lint.
11367
11368The tracking issue for this feature is: [#83518]
11369
11370[#83518]: https://github.com/rust-lang/rust/issues/83518
11371
11372------------------------
11373"##,
11374 default_severity: Severity::Allow,
11375 warn_since: None,
11376 deny_since: None,
11377 },
11378 Lint {
11379 label: "lazy_cell_into_inner",
11380 description: r##"# `lazy_cell_into_inner`
11381
11382
11383
11384The tracking issue for this feature is: [#125623]
11385
11386[#125623]: https://github.com/rust-lang/rust/issues/125623
11387
11388------------------------
11389"##,
11390 default_severity: Severity::Allow,
11391 warn_since: None,
11392 deny_since: None,
11393 },
11394 Lint {
11395 label: "legacy_receiver_trait",
11396 description: r##"# `legacy_receiver_trait`
11397
11398
11399
11400This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
11401
11402------------------------
11403"##,
11404 default_severity: Severity::Allow,
11405 warn_since: None,
11406 deny_since: None,
11407 },
11408 Lint {
11409 label: "liballoc_internals",
11410 description: r##"# `liballoc_internals`
11411
11412
11413
11414This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
11415
11416------------------------
11417"##,
11418 default_severity: Severity::Allow,
11419 warn_since: None,
11420 deny_since: None,
11421 },
11422 Lint {
11423 label: "libstd_sys_internals",
11424 description: r##"# `libstd_sys_internals`
11425
11426This feature is internal to the Rust compiler and is not intended for general use.
11427
11428------------------------
11429"##,
11430 default_severity: Severity::Allow,
11431 warn_since: None,
11432 deny_since: None,
11433 },
11434 Lint {
11435 label: "likely_unlikely",
11436 description: r##"# `likely_unlikely`
11437
11438
11439
11440The tracking issue for this feature is: [#151619]
11441
11442[#151619]: https://github.com/rust-lang/rust/issues/151619
11443
11444------------------------
11445"##,
11446 default_severity: Severity::Allow,
11447 warn_since: None,
11448 deny_since: None,
11449 },
11450 Lint {
11451 label: "link_arg_attribute",
11452 description: r##"# `link_arg_attribute`
11453
11454The tracking issue for this feature is: [#99427]
11455
11456------
11457
11458The `link_arg_attribute` feature allows passing arguments into the linker
11459from inside of the source code. Order is preserved for link attributes as
11460they were defined on a single extern block:
11461
11462```rust,no_run
11463#![feature(link_arg_attribute)]
11464
11465#[link(kind = "link-arg", name = "--start-group")]
11466#[link(kind = "static", name = "c")]
11467#[link(kind = "static", name = "gcc")]
11468#[link(kind = "link-arg", name = "--end-group")]
11469extern "C" {}
11470```
11471
11472[#99427]: https://github.com/rust-lang/rust/issues/99427
11473"##,
11474 default_severity: Severity::Allow,
11475 warn_since: None,
11476 deny_since: None,
11477 },
11478 Lint {
11479 label: "link_cfg",
11480 description: r##"# `link_cfg`
11481
11482This feature is internal to the Rust compiler and is not intended for general use.
11483
11484------------------------
11485"##,
11486 default_severity: Severity::Allow,
11487 warn_since: None,
11488 deny_since: None,
11489 },
11490 Lint {
11491 label: "link_enzyme_intrinsics",
11492 description: r##"# `link_enzyme_intrinsics`
11493
11494Allows using `#[link_name="__enzyme_*"]`.
11495
11496This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
11497
11498------------------------
11499"##,
11500 default_severity: Severity::Allow,
11501 warn_since: None,
11502 deny_since: None,
11503 },
11504 Lint {
11505 label: "link_llvm_intrinsics",
11506 description: r##"# `link_llvm_intrinsics`
11507
11508Allows using `#[link_name="llvm.*"]`.
11509
11510The tracking issue for this feature is: [#29602]
11511
11512[#29602]: https://github.com/rust-lang/rust/issues/29602
11513
11514------------------------
11515"##,
11516 default_severity: Severity::Allow,
11517 warn_since: None,
11518 deny_since: None,
11519 },
11520 Lint {
11521 label: "linkage",
11522 description: r##"# `linkage`
11523
11524Allows using the `#[linkage = ".."]` attribute.
11525
11526The tracking issue for this feature is: [#29603]
11527
11528[#29603]: https://github.com/rust-lang/rust/issues/29603
11529
11530------------------------
11531"##,
11532 default_severity: Severity::Allow,
11533 warn_since: None,
11534 deny_since: None,
11535 },
11536 Lint {
11537 label: "linked_list_cursors",
11538 description: r##"# `linked_list_cursors`
11539
11540
11541
11542The tracking issue for this feature is: [#58533]
11543
11544[#58533]: https://github.com/rust-lang/rust/issues/58533
11545
11546------------------------
11547"##,
11548 default_severity: Severity::Allow,
11549 warn_since: None,
11550 deny_since: None,
11551 },
11552 Lint {
11553 label: "linked_list_remove",
11554 description: r##"# `linked_list_remove`
11555
11556
11557
11558The tracking issue for this feature is: [#69210]
11559
11560[#69210]: https://github.com/rust-lang/rust/issues/69210
11561
11562------------------------
11563"##,
11564 default_severity: Severity::Allow,
11565 warn_since: None,
11566 deny_since: None,
11567 },
11568 Lint {
11569 label: "linked_list_retain",
11570 description: r##"# `linked_list_retain`
11571
11572
11573
11574The tracking issue for this feature is: [#114135]
11575
11576[#114135]: https://github.com/rust-lang/rust/issues/114135
11577
11578------------------------
11579"##,
11580 default_severity: Severity::Allow,
11581 warn_since: None,
11582 deny_since: None,
11583 },
11584 Lint {
11585 label: "linux_pidfd",
11586 description: r##"# `linux_pidfd`
11587
11588
11589
11590The tracking issue for this feature is: [#82971]
11591
11592[#82971]: https://github.com/rust-lang/rust/issues/82971
11593
11594------------------------
11595"##,
11596 default_severity: Severity::Allow,
11597 warn_since: None,
11598 deny_since: None,
11599 },
11600 Lint {
11601 label: "local_waker",
11602 description: r##"# `local_waker`
11603
11604
11605
11606The tracking issue for this feature is: [#118959]
11607
11608[#118959]: https://github.com/rust-lang/rust/issues/118959
11609
11610------------------------
11611"##,
11612 default_severity: Severity::Allow,
11613 warn_since: None,
11614 deny_since: None,
11615 },
11616 Lint {
11617 label: "lock_value_accessors",
11618 description: r##"# `lock_value_accessors`
11619
11620
11621
11622The tracking issue for this feature is: [#133407]
11623
11624[#133407]: https://github.com/rust-lang/rust/issues/133407
11625
11626------------------------
11627"##,
11628 default_severity: Severity::Allow,
11629 warn_since: None,
11630 deny_since: None,
11631 },
11632 Lint {
11633 label: "log_syntax",
11634 description: r##"# `log_syntax`
11635
11636
11637
11638The tracking issue for this feature is: [#29598]
11639
11640[#29598]: https://github.com/rust-lang/rust/issues/29598
11641
11642------------------------
11643"##,
11644 default_severity: Severity::Allow,
11645 warn_since: None,
11646 deny_since: None,
11647 },
11648 Lint {
11649 label: "loongarch_target_feature",
11650 description: r##"# `loongarch_target_feature`
11651
11652Target features on loongarch.
11653
11654The tracking issue for this feature is: [#150252]
11655
11656[#150252]: https://github.com/rust-lang/rust/issues/150252
11657
11658------------------------
11659"##,
11660 default_severity: Severity::Allow,
11661 warn_since: None,
11662 deny_since: None,
11663 },
11664 Lint {
11665 label: "loop_hints",
11666 description: r##"# `loop_hints`
11667
11668The tracking issue for this feature is: [#156874]
11669
11670[#156874]: https://github.com/rust-lang/rust/issues/156874
11671
11672------
11673
11674<!--
11675FIXME(#159429): temporarily renamed `#[unroll]` to mitigate a nameres ambiguity
11676-->
11677
11678Loop unrolling can be a powerful optimization but like inlining, it is sometimes useful to
11679manually provide hints to optimizations.
11680
11681`#[rustc_unroll]` will encourage unrolling of a loop.
11682
11683`#[rustc_unroll(full)]` is a stronger hint and can cause optimizations to completely ignore the code
11684side growth from repeating a loop body.
11685
11686`#[rustc_unroll(never)]` is a strong hint to not unroll the loop at all. Note that other loop
11687optimizations may still be applied.
11688
11689`#[rustc_unroll(N)]` is a hint to unroll `N` iterations of the loop.
11690
11691In all cases these are just hints and may be ignored. But unlike function inlining hints,
11692loops tend to be heavily modified during compilation, which can make obeying hints challenging.
11693If the attribute doesn't do what you want, please file an issue.
11694"##,
11695 default_severity: Severity::Allow,
11696 warn_since: None,
11697 deny_since: None,
11698 },
11699 Lint {
11700 label: "loop_match",
11701 description: r##"# `loop_match`
11702
11703The tracking issue for this feature is: [#132306]
11704
11705[#132306]: https://github.com/rust-lang/rust/issues/132306
11706
11707------
11708
11709The `#[loop_match]` and `#[const_continue]` attributes can be used to improve the code
11710generation of logic that fits this shape:
11711
11712```ignore (pseudo-rust)
11713loop {
11714 state = 'blk: {
11715 match state {
11716 State::A => {
11717 break 'blk State::B
11718 }
11719 State::B => { /* ... */ }
11720 /* ... */
11721 }
11722 }
11723}
11724```
11725
11726Here the loop itself can be annotated with `#[loop_match]`, and any `break 'blk` with
11727`#[const_continue]` if the value is know at compile time:
11728
11729```ignore (pseudo-rust)
11730#[loop_match]
11731loop {
11732 state = 'blk: {
11733 match state {
11734 State::A => {
11735 #[const_continue]
11736 break 'blk State::B
11737 }
11738 State::B => { /* ... */ }
11739 /* ... */
11740 }
11741 }
11742}
11743```
11744
11745The observable behavior of this loop is exactly the same as without the extra attributes.
11746The difference is in the generated output: normally, when the state is `A`, control flow
11747moves from the `A` branch, back to the top of the loop, then to the `B` branch. With the
11748attributes, The `A` branch will immediately jump to the `B` branch.
11749
11750Removing the indirection can be beneficial for stack usage and branch prediction, and
11751enables other optimizations by clearly splitting out the control flow paths that your
11752program will actually use.
11753"##,
11754 default_severity: Severity::Allow,
11755 warn_since: None,
11756 deny_since: None,
11757 },
11758 Lint {
11759 label: "m68k_target_feature",
11760 description: r##"# `m68k_target_feature`
11761
11762Target features on m68k.
11763
11764The tracking issue for this feature is: [#134328]
11765
11766[#134328]: https://github.com/rust-lang/rust/issues/134328
11767
11768------------------------
11769"##,
11770 default_severity: Severity::Allow,
11771 warn_since: None,
11772 deny_since: None,
11773 },
11774 Lint {
11775 label: "macro_attr",
11776 description: r##"# `macro_attr`
11777
11778Allow `macro_rules!` attribute rules
11779
11780The tracking issue for this feature is: [#143547]
11781
11782[#143547]: https://github.com/rust-lang/rust/issues/143547
11783
11784------------------------
11785"##,
11786 default_severity: Severity::Allow,
11787 warn_since: None,
11788 deny_since: None,
11789 },
11790 Lint {
11791 label: "macro_derive",
11792 description: r##"# `macro_derive`
11793
11794Allow `macro_rules!` derive rules
11795
11796The tracking issue for this feature is: [#143549]
11797
11798[#143549]: https://github.com/rust-lang/rust/issues/143549
11799
11800------------------------
11801"##,
11802 default_severity: Severity::Allow,
11803 warn_since: None,
11804 deny_since: None,
11805 },
11806 Lint {
11807 label: "macro_guard_matcher",
11808 description: r##"# `macro_guard_matcher`
11809
11810Allow `$x:guard` matcher in macros
11811
11812The tracking issue for this feature is: [#153104]
11813
11814[#153104]: https://github.com/rust-lang/rust/issues/153104
11815
11816------------------------
11817"##,
11818 default_severity: Severity::Allow,
11819 warn_since: None,
11820 deny_since: None,
11821 },
11822 Lint {
11823 label: "macro_metavar_expr",
11824 description: r##"# `macro_metavar_expr`
11825
11826The tracking issue for this feature is: [#83527]
11827
11828------------------------
11829
11830> This feature is not to be confused with [`macro_metavar_expr_concat`].
11831
11832[`macro_metavar_expr_concat`]: ./macro-metavar-expr-concat.md
11833[#83527]: https://github.com/rust-lang/rust/issues/83527
11834"##,
11835 default_severity: Severity::Allow,
11836 warn_since: None,
11837 deny_since: None,
11838 },
11839 Lint {
11840 label: "macro_metavar_expr_concat",
11841 description: r##"# `macro_metavar_expr_concat`
11842
11843The tracking issue for this feature is: [#124225]
11844
11845------------------------
11846
11847In stable Rust, there is no way to create new identifiers by joining identifiers to literals or other identifiers without using procedural macros such as [`paste`].
11848 `#![feature(macro_metavar_expr_concat)]` introduces a way to do this, using the concat metavariable expression.
11849
11850> This feature uses the syntax from [`macro_metavar_expr`] but is otherwise
11851> independent. It replaces the since-removed unstable feature
11852> [`concat_idents`].
11853
11854> This is an experimental feature; it and its syntax will require a RFC before stabilization.
11855
11856
11857### Overview
11858
11859`#![feature(macro_metavar_expr_concat)]` provides the `concat` metavariable expression for creating new identifiers:
11860
11861```rust
11862#![feature(macro_metavar_expr_concat)]
11863
11864macro_rules! create_some_structs {
11865 ($name:ident) => {
11866 pub struct ${ concat(First, $name) };
11867 pub struct ${ concat(Second, $name) };
11868 pub struct ${ concat(Third, $name) };
11869 }
11870}
11871
11872create_some_structs!(Thing);
11873```
11874
11875This macro invocation expands to:
11876
11877```rust
11878pub struct FirstThing;
11879pub struct SecondThing;
11880pub struct ThirdThing;
11881```
11882
11883### Syntax
11884
11885This feature builds upon the metavariable expression syntax `${ .. }` as specified in [RFC 3086] ([`macro_metavar_expr`]).
11886 `concat` is available like `${ concat(items) }`, where `items` is a comma separated sequence of idents and/or literals.
11887
11888### Examples
11889
11890#### Create a function or method with a concatenated name
11891
11892```rust
11893#![feature(macro_metavar_expr_concat)]
11894
11895macro_rules! make_getter {
11896 ($name:ident, $field: ident, $ret:ty) => {
11897 impl $name {
11898 pub fn ${ concat(get_, $field) }(&self) -> &$ret {
11899 &self.$field
11900 }
11901 }
11902 }
11903}
11904
11905pub struct Thing {
11906 description: String,
11907}
11908
11909make_getter!(Thing, description, String);
11910```
11911
11912This expands to:
11913
11914```rust
11915pub struct Thing {
11916 description: String,
11917}
11918
11919impl Thing {
11920 pub fn get_description(&self) -> &String {
11921 &self.description
11922 }
11923}
11924```
11925
11926#### Create names for macro generated tests
11927
11928```rust
11929#![feature(macro_metavar_expr_concat)]
11930
11931macro_rules! test_math {
11932 ($integer:ident) => {
11933 #[test]
11934 fn ${ concat(test_, $integer, _, addition) } () {
11935 let a: $integer = 73;
11936 let b: $integer = 42;
11937 assert_eq!(a + b, 115)
11938 }
11939
11940 #[test]
11941 fn ${ concat(test_, $integer, _, subtraction) } () {
11942 let a: $integer = 73;
11943 let b: $integer = 42;
11944 assert_eq!(a - b, 31)
11945 }
11946 }
11947}
11948
11949test_math!(i32);
11950test_math!(u64);
11951test_math!(u128);
11952```
11953
11954Running this returns the following output:
11955
11956```text
11957running 6 tests
11958test test_i32_subtraction ... ok
11959test test_i32_addition ... ok
11960test test_u128_addition ... ok
11961test test_u128_subtraction ... ok
11962test test_u64_addition ... ok
11963test test_u64_subtraction ... ok
11964
11965test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
11966```
11967
11968[`paste`]: https://crates.io/crates/paste
11969[RFC 3086]: https://rust-lang.github.io/rfcs/3086-macro-metavar-expr.html
11970[`macro_metavar_expr`]: ../language-features/macro-metavar-expr.md
11971[`concat_idents`]: https://github.com/rust-lang/rust/issues/29599
11972[#124225]: https://github.com/rust-lang/rust/issues/124225
11973[declarative macros]: https://doc.rust-lang.org/stable/reference/macros-by-example.html
11974"##,
11975 default_severity: Severity::Allow,
11976 warn_since: None,
11977 deny_since: None,
11978 },
11979 Lint {
11980 label: "map_try_insert",
11981 description: r##"# `map_try_insert`
11982
11983
11984
11985The tracking issue for this feature is: [#82766]
11986
11987[#82766]: https://github.com/rust-lang/rust/issues/82766
11988
11989------------------------
11990"##,
11991 default_severity: Severity::Allow,
11992 warn_since: None,
11993 deny_since: None,
11994 },
11995 Lint {
11996 label: "mapped_lock_guards",
11997 description: r##"# `mapped_lock_guards`
11998
11999
12000
12001The tracking issue for this feature is: [#117108]
12002
12003[#117108]: https://github.com/rust-lang/rust/issues/117108
12004
12005------------------------
12006"##,
12007 default_severity: Severity::Allow,
12008 warn_since: None,
12009 deny_since: None,
12010 },
12011 Lint {
12012 label: "marked_unchecked_type_aliases",
12013 description: r##"# `marked_unchecked_type_aliases`
12014
12015Allows explicitly marking type aliases as unchecked / opting type aliases out of being checked even if `checked_type_aliases` is enabled or they're a TAIT.
12016
12017The tracking issue for this feature is: [#112792]
12018
12019[#112792]: https://github.com/rust-lang/rust/issues/112792
12020
12021------------------------
12022"##,
12023 default_severity: Severity::Allow,
12024 warn_since: None,
12025 deny_since: None,
12026 },
12027 Lint {
12028 label: "marker_trait_attr",
12029 description: r##"# `marker_trait_attr`
12030
12031The tracking issue for this feature is: [#29864]
12032
12033[#29864]: https://github.com/rust-lang/rust/issues/29864
12034
12035------------------------
12036
12037Normally, Rust keeps you from adding trait implementations that could
12038overlap with each other, as it would be ambiguous which to use. This
12039feature, however, carves out an exception to that rule: a trait can
12040opt-in to having overlapping implementations, at the cost that those
12041implementations are not allowed to override anything (and thus the
12042trait itself cannot have any associated items, as they're pointless
12043when they'd need to do the same thing for every type anyway).
12044
12045```rust
12046#![feature(marker_trait_attr)]
12047
12048#[marker] trait CheapToClone: Clone {}
12049
12050impl<T: Copy> CheapToClone for T {}
12051
12052// These could potentially overlap with the blanket implementation above,
12053// so are only allowed because CheapToClone is a marker trait.
12054impl<T: CheapToClone, U: CheapToClone> CheapToClone for (T, U) {}
12055impl<T: CheapToClone> CheapToClone for std::ops::Range<T> {}
12056
12057fn cheap_clone<T: CheapToClone>(t: T) -> T {
12058 t.clone()
12059}
12060```
12061
12062This is expected to replace the unstable `overlapping_marker_traits`
12063feature, which applied to all empty traits (without needing an opt-in).
12064"##,
12065 default_severity: Severity::Allow,
12066 warn_since: None,
12067 deny_since: None,
12068 },
12069 Lint {
12070 label: "maybe_dangling",
12071 description: r##"# `maybe_dangling`
12072
12073
12074
12075The tracking issue for this feature is: [#118166]
12076
12077[#118166]: https://github.com/rust-lang/rust/issues/118166
12078
12079------------------------
12080"##,
12081 default_severity: Severity::Allow,
12082 warn_since: None,
12083 deny_since: None,
12084 },
12085 Lint {
12086 label: "maybe_uninit_array_assume_init",
12087 description: r##"# `maybe_uninit_array_assume_init`
12088
12089
12090
12091The tracking issue for this feature is: [#96097]
12092
12093[#96097]: https://github.com/rust-lang/rust/issues/96097
12094
12095------------------------
12096"##,
12097 default_severity: Severity::Allow,
12098 warn_since: None,
12099 deny_since: None,
12100 },
12101 Lint {
12102 label: "maybe_uninit_as_bytes",
12103 description: r##"# `maybe_uninit_as_bytes`
12104
12105
12106
12107The tracking issue for this feature is: [#93092]
12108
12109[#93092]: https://github.com/rust-lang/rust/issues/93092
12110
12111------------------------
12112"##,
12113 default_severity: Severity::Allow,
12114 warn_since: None,
12115 deny_since: None,
12116 },
12117 Lint {
12118 label: "maybe_uninit_fill",
12119 description: r##"# `maybe_uninit_fill`
12120
12121
12122
12123The tracking issue for this feature is: [#117428]
12124
12125[#117428]: https://github.com/rust-lang/rust/issues/117428
12126
12127------------------------
12128"##,
12129 default_severity: Severity::Allow,
12130 warn_since: None,
12131 deny_since: None,
12132 },
12133 Lint {
12134 label: "maybe_uninit_from_ref",
12135 description: r##"# `maybe_uninit_from_ref`
12136
12137
12138
12139The tracking issue for this feature is: [#165213]
12140
12141[#165213]: https://github.com/rust-lang/rust/issues/165213
12142
12143------------------------
12144"##,
12145 default_severity: Severity::Allow,
12146 warn_since: None,
12147 deny_since: None,
12148 },
12149 Lint {
12150 label: "maybe_uninit_uninit_array_transpose",
12151 description: r##"# `maybe_uninit_uninit_array_transpose`
12152
12153
12154
12155The tracking issue for this feature is: [#96097]
12156
12157[#96097]: https://github.com/rust-lang/rust/issues/96097
12158
12159------------------------
12160"##,
12161 default_severity: Severity::Allow,
12162 warn_since: None,
12163 deny_since: None,
12164 },
12165 Lint {
12166 label: "mem_copy_fn",
12167 description: r##"# `mem_copy_fn`
12168
12169
12170
12171The tracking issue for this feature is: [#98262]
12172
12173[#98262]: https://github.com/rust-lang/rust/issues/98262
12174
12175------------------------
12176"##,
12177 default_severity: Severity::Allow,
12178 warn_since: None,
12179 deny_since: None,
12180 },
12181 Lint {
12182 label: "min_adt_const_params",
12183 description: r##"# `min_adt_const_params`
12184
12185Allows additional const parameter types, such as [u8; 10] or user defined types. User defined types must not have fields more private than the type itself.
12186
12187The tracking issue for this feature is: [#154042]
12188
12189[#154042]: https://github.com/rust-lang/rust/issues/154042
12190
12191------------------------
12192"##,
12193 default_severity: Severity::Allow,
12194 warn_since: None,
12195 deny_since: None,
12196 },
12197 Lint {
12198 label: "min_specialization",
12199 description: r##"# `min_specialization`
12200
12201A minimal, sound subset of specialization intended to be used by the standard library until the soundness issues with specialization are fixed.
12202
12203The tracking issue for this feature is: [#31844]
12204
12205[#31844]: https://github.com/rust-lang/rust/issues/31844
12206
12207------------------------
12208"##,
12209 default_severity: Severity::Allow,
12210 warn_since: None,
12211 deny_since: None,
12212 },
12213 Lint {
12214 label: "mips_target_feature",
12215 description: r##"# `mips_target_feature`
12216
12217Target features on mips.
12218
12219The tracking issue for this feature is: [#150253]
12220
12221[#150253]: https://github.com/rust-lang/rust/issues/150253
12222
12223------------------------
12224"##,
12225 default_severity: Severity::Allow,
12226 warn_since: None,
12227 deny_since: None,
12228 },
12229 Lint {
12230 label: "more_float_constants",
12231 description: r##"# `more_float_constants`
12232
12233
12234
12235The tracking issue for this feature is: [#146939]
12236
12237[#146939]: https://github.com/rust-lang/rust/issues/146939
12238
12239------------------------
12240"##,
12241 default_severity: Severity::Allow,
12242 warn_since: None,
12243 deny_since: None,
12244 },
12245 Lint {
12246 label: "more_maybe_bounds",
12247 description: r##"# `more_maybe_bounds`
12248
12249Allows using `?Trait` trait bounds in more contexts.
12250
12251This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
12252
12253------------------------
12254"##,
12255 default_severity: Severity::Allow,
12256 warn_since: None,
12257 deny_since: None,
12258 },
12259 Lint {
12260 label: "more_qualified_paths",
12261 description: r##"# `more_qualified_paths`
12262
12263The `more_qualified_paths` feature can be used in order to enable the
12264use of qualified paths in patterns.
12265
12266The tracking issue for this feature is: [#86935](https://github.com/rust-lang/rust/issues/86935).
12267
12268------------------------
12269
12270## Example
12271
12272```rust
12273#![feature(more_qualified_paths)]
12274
12275fn main() {
12276 // destructure through a qualified path
12277 let <Foo as A>::Assoc { br } = StructStruct { br: 2 };
12278}
12279
12280struct StructStruct {
12281 br: i8,
12282}
12283
12284struct Foo;
12285
12286trait A {
12287 type Assoc;
12288}
12289
12290impl A for Foo {
12291 type Assoc = StructStruct;
12292}
12293```
12294"##,
12295 default_severity: Severity::Allow,
12296 warn_since: None,
12297 deny_since: None,
12298 },
12299 Lint {
12300 label: "motor_ext",
12301 description: r##"# `motor_ext`
12302
12303
12304
12305The tracking issue for this feature is: [#147456]
12306
12307[#147456]: https://github.com/rust-lang/rust/issues/147456
12308
12309------------------------
12310"##,
12311 default_severity: Severity::Allow,
12312 warn_since: None,
12313 deny_since: None,
12314 },
12315 Lint {
12316 label: "movdir64b_target_feature",
12317 description: r##"# `movdir64b_target_feature`
12318
12319The `movdir64b` target feature on x86.
12320
12321The tracking issue for this feature is: [#163741]
12322
12323[#163741]: https://github.com/rust-lang/rust/issues/163741
12324
12325------------------------
12326"##,
12327 default_severity: Severity::Allow,
12328 warn_since: None,
12329 deny_since: None,
12330 },
12331 Lint {
12332 label: "movdiri_target_feature",
12333 description: r##"# `movdiri_target_feature`
12334
12335The `movdiri` target feature on x86.
12336
12337The tracking issue for this feature is: [#163741]
12338
12339[#163741]: https://github.com/rust-lang/rust/issues/163741
12340
12341------------------------
12342"##,
12343 default_severity: Severity::Allow,
12344 warn_since: None,
12345 deny_since: None,
12346 },
12347 Lint {
12348 label: "move_expr",
12349 description: r##"# `move_expr`
12350
12351Allows `move(expr)` in closures.
12352
12353The tracking issue for this feature is: [#155050]
12354
12355[#155050]: https://github.com/rust-lang/rust/issues/155050
12356
12357------------------------
12358"##,
12359 default_severity: Severity::Allow,
12360 warn_since: None,
12361 deny_since: None,
12362 },
12363 Lint {
12364 label: "movrs_target_feature",
12365 description: r##"# `movrs_target_feature`
12366
12367The `movrs` target feature on x86.
12368
12369The tracking issue for this feature is: [#137976]
12370
12371[#137976]: https://github.com/rust-lang/rust/issues/137976
12372
12373------------------------
12374"##,
12375 default_severity: Severity::Allow,
12376 warn_since: None,
12377 deny_since: None,
12378 },
12379 Lint {
12380 label: "mpmc_channel",
12381 description: r##"# `mpmc_channel`
12382
12383
12384
12385The tracking issue for this feature is: [#126840]
12386
12387[#126840]: https://github.com/rust-lang/rust/issues/126840
12388
12389------------------------
12390"##,
12391 default_severity: Severity::Allow,
12392 warn_since: None,
12393 deny_since: None,
12394 },
12395 Lint {
12396 label: "mpsc_channel_len",
12397 description: r##"# `mpsc_channel_len`
12398
12399
12400
12401The tracking issue for this feature is: [#165247]
12402
12403[#165247]: https://github.com/rust-lang/rust/issues/165247
12404
12405------------------------
12406"##,
12407 default_severity: Severity::Allow,
12408 warn_since: None,
12409 deny_since: None,
12410 },
12411 Lint {
12412 label: "mpsc_is_disconnected",
12413 description: r##"# `mpsc_is_disconnected`
12414
12415
12416
12417The tracking issue for this feature is: [#153668]
12418
12419[#153668]: https://github.com/rust-lang/rust/issues/153668
12420
12421------------------------
12422"##,
12423 default_severity: Severity::Allow,
12424 warn_since: None,
12425 deny_since: None,
12426 },
12427 Lint {
12428 label: "multiple_supertrait_upcastable",
12429 description: r##"# `multiple_supertrait_upcastable`
12430
12431Allows the `multiple_supertrait_upcastable` lint.
12432
12433The tracking issue for this feature is: [#150833]
12434
12435[#150833]: https://github.com/rust-lang/rust/issues/150833
12436
12437------------------------
12438"##,
12439 default_severity: Severity::Allow,
12440 warn_since: None,
12441 deny_since: None,
12442 },
12443 Lint {
12444 label: "must_not_suspend",
12445 description: r##"# `must_not_suspend`
12446
12447Allows the `#[must_not_suspend]` attribute.
12448
12449The tracking issue for this feature is: [#83310]
12450
12451[#83310]: https://github.com/rust-lang/rust/issues/83310
12452
12453------------------------
12454"##,
12455 default_severity: Severity::Allow,
12456 warn_since: None,
12457 deny_since: None,
12458 },
12459 Lint {
12460 label: "mut_ref",
12461 description: r##"# `mut_ref`
12462
12463Allows `mut ref` and `mut ref mut` identifier patterns.
12464
12465The tracking issue for this feature is: [#123076]
12466
12467[#123076]: https://github.com/rust-lang/rust/issues/123076
12468
12469------------------------
12470"##,
12471 default_severity: Severity::Allow,
12472 warn_since: None,
12473 deny_since: None,
12474 },
12475 Lint {
12476 label: "mut_restriction",
12477 description: r##"# `mut_restriction`
12478
12479Allows `mut(crate) field: Type` restrictions.
12480
12481The tracking issue for this feature is: [#105077]
12482
12483[#105077]: https://github.com/rust-lang/rust/issues/105077
12484
12485------------------------
12486"##,
12487 default_severity: Severity::Allow,
12488 warn_since: None,
12489 deny_since: None,
12490 },
12491 Lint {
12492 label: "mutex_data_ptr",
12493 description: r##"# `mutex_data_ptr`
12494
12495
12496
12497The tracking issue for this feature is: [#140368]
12498
12499[#140368]: https://github.com/rust-lang/rust/issues/140368
12500
12501------------------------
12502"##,
12503 default_severity: Severity::Allow,
12504 warn_since: None,
12505 deny_since: None,
12506 },
12507 Lint {
12508 label: "naked_functions_rustic_abi",
12509 description: r##"# `naked_functions_rustic_abi`
12510
12511Allows using `#[naked]` on `extern "Rust"` functions.
12512
12513The tracking issue for this feature is: [#138997]
12514
12515[#138997]: https://github.com/rust-lang/rust/issues/138997
12516
12517------------------------
12518"##,
12519 default_severity: Severity::Allow,
12520 warn_since: None,
12521 deny_since: None,
12522 },
12523 Lint {
12524 label: "naked_functions_target_feature",
12525 description: r##"# `naked_functions_target_feature`
12526
12527Allows using `#[target_feature(enable = "...")]` on `#[naked]` on functions.
12528
12529The tracking issue for this feature is: [#138568]
12530
12531[#138568]: https://github.com/rust-lang/rust/issues/138568
12532
12533------------------------
12534"##,
12535 default_severity: Severity::Allow,
12536 warn_since: None,
12537 deny_since: None,
12538 },
12539 Lint {
12540 label: "named_fn_trait_parameters",
12541 description: r##"# `named_fn_trait_parameters`
12542
12543Allows providing names to parameters of `impl Fn` etc
12544
12545The tracking issue for this feature is: [#158499]
12546
12547[#158499]: https://github.com/rust-lang/rust/issues/158499
12548
12549------------------------
12550"##,
12551 default_severity: Severity::Allow,
12552 warn_since: None,
12553 deny_since: None,
12554 },
12555 Lint {
12556 label: "native_link_modifiers_as_needed",
12557 description: r##"# `native_link_modifiers_as_needed`
12558
12559The tracking issue for this feature is: [#99424]
12560
12561[#99424]: https://github.com/rust-lang/rust/issues/99424
12562
12563------------------------
12564
12565The `native_link_modifiers_as_needed` feature allows you to use the `as-needed` modifier.
12566
12567`as-needed` is only compatible with the `dynamic` and `framework` linking kinds. Using any other kind will result in a compiler error.
12568
12569`+as-needed` means that the library will be actually linked only if it satisfies some undefined symbols at the point at which it is specified on the command line, making it similar to static libraries in this regard.
12570
12571This modifier translates to `--as-needed` for ld-like linkers, and to `-dead_strip_dylibs` / `-needed_library` / `-needed_framework` for ld64.
12572The modifier does nothing for linkers that don't support it (e.g. `link.exe`).
12573
12574The default for this modifier is unclear, some targets currently specify it as `+as-needed`, some do not. We may want to try making `+as-needed` a default for all targets.
12575"##,
12576 default_severity: Severity::Allow,
12577 warn_since: None,
12578 deny_since: None,
12579 },
12580 Lint {
12581 label: "needs_panic_runtime",
12582 description: r##"# `needs_panic_runtime`
12583
12584Allows declaring with `#![needs_panic_runtime]` that a panic runtime is needed.
12585
12586The tracking issue for this feature is: [#32837]
12587
12588[#32837]: https://github.com/rust-lang/rust/issues/32837
12589
12590------------------------
12591"##,
12592 default_severity: Severity::Allow,
12593 warn_since: None,
12594 deny_since: None,
12595 },
12596 Lint {
12597 label: "negative_bounds",
12598 description: r##"# `negative_bounds`
12599
12600Allow negative trait bounds. This is an internal-only feature for testing the trait solver!
12601
12602This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
12603
12604------------------------
12605"##,
12606 default_severity: Severity::Allow,
12607 warn_since: None,
12608 deny_since: None,
12609 },
12610 Lint {
12611 label: "negative_impls",
12612 description: r##"# `negative_impls`
12613
12614The tracking issue for this feature is [#68318].
12615
12616[#68318]: https://github.com/rust-lang/rust/issues/68318
12617
12618----
12619
12620With the feature gate `negative_impls`, you can write negative impls as well as positive ones:
12621
12622```rust
12623#![feature(negative_impls)]
12624trait DerefMut { }
12625impl<T: ?Sized> !DerefMut for &T { }
12626```
12627
12628Negative impls indicate a semver guarantee that the given trait will not be implemented for the given types. Negative impls play an additional purpose for auto traits, described below.
12629
12630Negative impls have the following characteristics:
12631
12632* They do not have any items.
12633* They must obey the orphan rules as if they were a positive impl.
12634* They cannot "overlap" with any positive impls.
12635
12636## Semver interaction
12637
12638It is a breaking change to remove a negative impl. Negative impls are a commitment not to implement the given trait for the named types.
12639
12640## Orphan and overlap rules
12641
12642Negative impls must obey the same orphan rules as a positive impl. This implies you cannot add a negative impl for types defined in upstream crates and so forth.
12643
12644Similarly, negative impls cannot overlap with positive impls, again using the same "overlap" check that we ordinarily use to determine if two impls overlap. (Note that positive impls typically cannot overlap with one another either, except as permitted by specialization.)
12645
12646## Interaction with auto traits
12647
12648Declaring a negative impl `impl !SomeAutoTrait for SomeType` for an
12649auto-trait serves two purposes:
12650
12651* as with any trait, it declares that `SomeType` will never implement `SomeAutoTrait`;
12652* it disables the automatic `SomeType: SomeAutoTrait` impl that would otherwise have been generated.
12653
12654Note that, at present, there is no way to indicate that a given type
12655does not implement an auto trait *but that it may do so in the
12656future*. For ordinary types, this is done by simply not declaring any
12657impl at all, but that is not an option for auto traits. A workaround
12658is that one could embed a marker type as one of the fields, where the
12659marker type is `!AutoTrait`.
12660
12661## Immediate uses
12662
12663Negative impls are used to declare that `&T: !DerefMut` and `&mut T: !Clone`, as required to fix the soundness of `Pin` described in [#66544](https://github.com/rust-lang/rust/issues/66544).
12664
12665This serves two purposes:
12666
12667* For proving the correctness of unsafe code, we can use that impl as evidence that no `DerefMut` or `Clone` impl exists.
12668* It prevents downstream crates from creating such impls.
12669"##,
12670 default_severity: Severity::Allow,
12671 warn_since: None,
12672 deny_since: None,
12673 },
12674 Lint {
12675 label: "never_patterns",
12676 description: r##"# `never_patterns`
12677
12678Allows the `!` pattern.
12679
12680The tracking issue for this feature is: [#118155]
12681
12682[#118155]: https://github.com/rust-lang/rust/issues/118155
12683
12684------------------------
12685"##,
12686 default_severity: Severity::Allow,
12687 warn_since: None,
12688 deny_since: None,
12689 },
12690 Lint {
12691 label: "new_range",
12692 description: r##"# `new_range`
12693
12694The tracking issue for this feature is: [#123741]
12695
12696[#123741]: https://github.com/rust-lang/rust/issues/123741
12697
12698---
12699
12700Switch the syntaxes `a..`, `a..b`, and `a..=b` to resolve the new range types.
12701"##,
12702 default_severity: Severity::Allow,
12703 warn_since: None,
12704 deny_since: None,
12705 },
12706 Lint {
12707 label: "new_range_remainder",
12708 description: r##"# `new_range_remainder`
12709
12710
12711
12712The tracking issue for this feature is: [#154458]
12713
12714[#154458]: https://github.com/rust-lang/rust/issues/154458
12715
12716------------------------
12717"##,
12718 default_severity: Severity::Allow,
12719 warn_since: None,
12720 deny_since: None,
12721 },
12722 Lint {
12723 label: "next_index",
12724 description: r##"# `next_index`
12725
12726
12727
12728The tracking issue for this feature is: [#130711]
12729
12730[#130711]: https://github.com/rust-lang/rust/issues/130711
12731
12732------------------------
12733"##,
12734 default_severity: Severity::Allow,
12735 warn_since: None,
12736 deny_since: None,
12737 },
12738 Lint {
12739 label: "no_core",
12740 description: r##"# `no_core`
12741
12742Allows `#![no_core]`.
12743
12744The tracking issue for this feature is: [#29639]
12745
12746[#29639]: https://github.com/rust-lang/rust/issues/29639
12747
12748------------------------
12749"##,
12750 default_severity: Severity::Allow,
12751 warn_since: None,
12752 deny_since: None,
12753 },
12754 Lint {
12755 label: "non_exhaustive_omitted_patterns_lint",
12756 description: r##"# `non_exhaustive_omitted_patterns_lint`
12757
12758Allows using the `non_exhaustive_omitted_patterns` lint.
12759
12760The tracking issue for this feature is: [#89554]
12761
12762[#89554]: https://github.com/rust-lang/rust/issues/89554
12763
12764------------------------
12765"##,
12766 default_severity: Severity::Allow,
12767 warn_since: None,
12768 deny_since: None,
12769 },
12770 Lint {
12771 label: "non_lifetime_binders",
12772 description: r##"# `non_lifetime_binders`
12773
12774Allows `for<T>` binders in where-clauses
12775
12776The tracking issue for this feature is: [#108185]
12777
12778[#108185]: https://github.com/rust-lang/rust/issues/108185
12779
12780------------------------
12781"##,
12782 default_severity: Severity::Allow,
12783 warn_since: None,
12784 deny_since: None,
12785 },
12786 Lint {
12787 label: "nonpoison_condvar",
12788 description: r##"# `nonpoison_condvar`
12789
12790
12791
12792The tracking issue for this feature is: [#134645]
12793
12794[#134645]: https://github.com/rust-lang/rust/issues/134645
12795
12796------------------------
12797"##,
12798 default_severity: Severity::Allow,
12799 warn_since: None,
12800 deny_since: None,
12801 },
12802 Lint {
12803 label: "nonpoison_mutex",
12804 description: r##"# `nonpoison_mutex`
12805
12806
12807
12808The tracking issue for this feature is: [#134645]
12809
12810[#134645]: https://github.com/rust-lang/rust/issues/134645
12811
12812------------------------
12813"##,
12814 default_severity: Severity::Allow,
12815 warn_since: None,
12816 deny_since: None,
12817 },
12818 Lint {
12819 label: "nonpoison_rwlock",
12820 description: r##"# `nonpoison_rwlock`
12821
12822
12823
12824The tracking issue for this feature is: [#134645]
12825
12826[#134645]: https://github.com/rust-lang/rust/issues/134645
12827
12828------------------------
12829"##,
12830 default_severity: Severity::Allow,
12831 warn_since: None,
12832 deny_since: None,
12833 },
12834 Lint {
12835 label: "nonzero_bitwise",
12836 description: r##"# `nonzero_bitwise`
12837
12838
12839
12840The tracking issue for this feature is: [#128281]
12841
12842[#128281]: https://github.com/rust-lang/rust/issues/128281
12843
12844------------------------
12845"##,
12846 default_severity: Severity::Allow,
12847 warn_since: None,
12848 deny_since: None,
12849 },
12850 Lint {
12851 label: "nonzero_from_mut",
12852 description: r##"# `nonzero_from_mut`
12853
12854
12855
12856The tracking issue for this feature is: [#106290]
12857
12858[#106290]: https://github.com/rust-lang/rust/issues/106290
12859
12860------------------------
12861"##,
12862 default_severity: Severity::Allow,
12863 warn_since: None,
12864 deny_since: None,
12865 },
12866 Lint {
12867 label: "nonzero_internals",
12868 description: r##"# `nonzero_internals`
12869
12870
12871
12872This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
12873
12874------------------------
12875"##,
12876 default_severity: Severity::Allow,
12877 warn_since: None,
12878 deny_since: None,
12879 },
12880 Lint {
12881 label: "nonzero_ops",
12882 description: r##"# `nonzero_ops`
12883
12884
12885
12886The tracking issue for this feature is: [#84186]
12887
12888[#84186]: https://github.com/rust-lang/rust/issues/84186
12889
12890------------------------
12891"##,
12892 default_severity: Severity::Allow,
12893 warn_since: None,
12894 deny_since: None,
12895 },
12896 Lint {
12897 label: "nonzero_strict_ops",
12898 description: r##"# `nonzero_strict_ops`
12899
12900
12901
12902The tracking issue for this feature is: [#164850]
12903
12904[#164850]: https://github.com/rust-lang/rust/issues/164850
12905
12906------------------------
12907"##,
12908 default_severity: Severity::Allow,
12909 warn_since: None,
12910 deny_since: None,
12911 },
12912 Lint {
12913 label: "normalize_lexically",
12914 description: r##"# `normalize_lexically`
12915
12916
12917
12918The tracking issue for this feature is: [#134694]
12919
12920[#134694]: https://github.com/rust-lang/rust/issues/134694
12921
12922------------------------
12923"##,
12924 default_severity: Severity::Allow,
12925 warn_since: None,
12926 deny_since: None,
12927 },
12928 Lint {
12929 label: "num_internals",
12930 description: r##"# `num_internals`
12931
12932
12933
12934This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
12935
12936------------------------
12937"##,
12938 default_severity: Severity::Allow,
12939 warn_since: None,
12940 deny_since: None,
12941 },
12942 Lint {
12943 label: "numfmt",
12944 description: r##"# `numfmt`
12945
12946
12947
12948This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
12949
12950------------------------
12951"##,
12952 default_severity: Severity::Allow,
12953 warn_since: None,
12954 deny_since: None,
12955 },
12956 Lint {
12957 label: "nvptx_target_feature",
12958 description: r##"# `nvptx_target_feature`
12959
12960Target features on nvptx.
12961
12962The tracking issue for this feature is: [#150254]
12963
12964[#150254]: https://github.com/rust-lang/rust/issues/150254
12965
12966------------------------
12967"##,
12968 default_severity: Severity::Allow,
12969 warn_since: None,
12970 deny_since: None,
12971 },
12972 Lint {
12973 label: "objc_class_variant",
12974 description: r##"# `objc_class_variant`
12975
12976
12977
12978This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
12979
12980------------------------
12981"##,
12982 default_severity: Severity::Allow,
12983 warn_since: None,
12984 deny_since: None,
12985 },
12986 Lint {
12987 label: "objc_selector_variant",
12988 description: r##"# `objc_selector_variant`
12989
12990
12991
12992This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
12993
12994------------------------
12995"##,
12996 default_severity: Severity::Allow,
12997 warn_since: None,
12998 deny_since: None,
12999 },
13000 Lint {
13001 label: "offset_of_enum",
13002 description: r##"# `offset_of_enum`
13003
13004The tracking issue for this feature is: [#120141]
13005
13006[#120141]: https://github.com/rust-lang/rust/issues/120141
13007
13008------------------------
13009
13010When the `offset_of_enum` feature is enabled, the [`offset_of!`] macro may be used to obtain the
13011offsets of fields of `enum`s; to express this, `enum` variants may be traversed as if they were
13012fields. Variants themselves do not have an offset, so they cannot appear as the last path component.
13013
13014```rust
13015#![feature(offset_of_enum)]
13016use std::mem;
13017
13018#[repr(u8)]
13019enum Enum {
13020 A(u8, u16),
13021 B { one: u8, two: u16 },
13022}
13023
13024assert_eq!(mem::offset_of!(Enum, A.0), 1);
13025assert_eq!(mem::offset_of!(Enum, B.two), 2);
13026
13027assert_eq!(mem::offset_of!(Option<&u8>, Some.0), 0);
13028```
13029
13030[`offset_of!`]: ../../std/mem/macro.offset_of.html
13031"##,
13032 default_severity: Severity::Allow,
13033 warn_since: None,
13034 deny_since: None,
13035 },
13036 Lint {
13037 label: "offset_of_slice",
13038 description: r##"# `offset_of_slice`
13039
13040The tracking issue for this feature is: [#126151]
13041
13042[#126151]: https://github.com/rust-lang/rust/issues/126151
13043
13044------------------------
13045
13046When the `offset_of_slice` feature is enabled, the [`offset_of!`] macro may be used to determine
13047the offset of fields whose type is `[T]`, that is, a slice of dynamic size.
13048
13049In general, fields whose type is dynamically sized do not have statically known offsets because
13050they do not have statically known alignments. However, `[T]` has the same alignment as `T`, so
13051it specifically may be allowed.
13052
13053```rust
13054#![feature(offset_of_slice)]
13055
13056#[repr(C)]
13057pub struct Struct {
13058 head: u32,
13059 tail: [u8],
13060}
13061
13062fn main() {
13063 assert_eq!(std::mem::offset_of!(Struct, tail), 4);
13064}
13065```
13066
13067[`offset_of!`]: ../../std/mem/macro.offset_of.html
13068"##,
13069 default_severity: Severity::Allow,
13070 warn_since: None,
13071 deny_since: None,
13072 },
13073 Lint {
13074 label: "once_cell_get_mut",
13075 description: r##"# `once_cell_get_mut`
13076
13077
13078
13079The tracking issue for this feature is: [#121641]
13080
13081[#121641]: https://github.com/rust-lang/rust/issues/121641
13082
13083------------------------
13084"##,
13085 default_severity: Severity::Allow,
13086 warn_since: None,
13087 deny_since: None,
13088 },
13089 Lint {
13090 label: "once_cell_new_init",
13091 description: r##"# `once_cell_new_init`
13092
13093
13094
13095The tracking issue for this feature is: [#159859]
13096
13097[#159859]: https://github.com/rust-lang/rust/issues/159859
13098
13099------------------------
13100"##,
13101 default_severity: Severity::Allow,
13102 warn_since: None,
13103 deny_since: None,
13104 },
13105 Lint {
13106 label: "once_cell_try",
13107 description: r##"# `once_cell_try`
13108
13109
13110
13111The tracking issue for this feature is: [#109737]
13112
13113[#109737]: https://github.com/rust-lang/rust/issues/109737
13114
13115------------------------
13116"##,
13117 default_severity: Severity::Allow,
13118 warn_since: None,
13119 deny_since: None,
13120 },
13121 Lint {
13122 label: "once_cell_try_insert",
13123 description: r##"# `once_cell_try_insert`
13124
13125
13126
13127The tracking issue for this feature is: [#116693]
13128
13129[#116693]: https://github.com/rust-lang/rust/issues/116693
13130
13131------------------------
13132"##,
13133 default_severity: Severity::Allow,
13134 warn_since: None,
13135 deny_since: None,
13136 },
13137 Lint {
13138 label: "once_lazy_lock_get_unchecked",
13139 description: r##"# `once_lazy_lock_get_unchecked`
13140
13141
13142
13143The tracking issue for this feature is: [#162716]
13144
13145[#162716]: https://github.com/rust-lang/rust/issues/162716
13146
13147------------------------
13148"##,
13149 default_severity: Severity::Allow,
13150 warn_since: None,
13151 deny_since: None,
13152 },
13153 Lint {
13154 label: "once_lock_new_init",
13155 description: r##"# `once_lock_new_init`
13156
13157
13158
13159The tracking issue for this feature is: [#159860]
13160
13161[#159860]: https://github.com/rust-lang/rust/issues/159860
13162
13163------------------------
13164"##,
13165 default_severity: Severity::Allow,
13166 warn_since: None,
13167 deny_since: None,
13168 },
13169 Lint {
13170 label: "one_sided_range",
13171 description: r##"# `one_sided_range`
13172
13173
13174
13175The tracking issue for this feature is: [#69780]
13176
13177[#69780]: https://github.com/rust-lang/rust/issues/69780
13178
13179------------------------
13180"##,
13181 default_severity: Severity::Allow,
13182 warn_since: None,
13183 deny_since: None,
13184 },
13185 Lint {
13186 label: "oneshot_channel",
13187 description: r##"# `oneshot_channel`
13188
13189
13190
13191The tracking issue for this feature is: [#143674]
13192
13193[#143674]: https://github.com/rust-lang/rust/issues/143674
13194
13195------------------------
13196"##,
13197 default_severity: Severity::Allow,
13198 warn_since: None,
13199 deny_since: None,
13200 },
13201 Lint {
13202 label: "option_array_transpose",
13203 description: r##"# `option_array_transpose`
13204
13205
13206
13207The tracking issue for this feature is: [#130828]
13208
13209[#130828]: https://github.com/rust-lang/rust/issues/130828
13210
13211------------------------
13212"##,
13213 default_severity: Severity::Allow,
13214 warn_since: None,
13215 deny_since: None,
13216 },
13217 Lint {
13218 label: "option_get_or_try_insert_with",
13219 description: r##"# `option_get_or_try_insert_with`
13220
13221
13222
13223The tracking issue for this feature is: [#143648]
13224
13225[#143648]: https://github.com/rust-lang/rust/issues/143648
13226
13227------------------------
13228"##,
13229 default_severity: Severity::Allow,
13230 warn_since: None,
13231 deny_since: None,
13232 },
13233 Lint {
13234 label: "option_into_flat_iter",
13235 description: r##"# `option_into_flat_iter`
13236
13237
13238
13239The tracking issue for this feature is: [#148441]
13240
13241[#148441]: https://github.com/rust-lang/rust/issues/148441
13242
13243------------------------
13244"##,
13245 default_severity: Severity::Allow,
13246 warn_since: None,
13247 deny_since: None,
13248 },
13249 Lint {
13250 label: "option_reduce",
13251 description: r##"# `option_reduce`
13252
13253
13254
13255The tracking issue for this feature is: [#144273]
13256
13257[#144273]: https://github.com/rust-lang/rust/issues/144273
13258
13259------------------------
13260"##,
13261 default_severity: Severity::Allow,
13262 warn_since: None,
13263 deny_since: None,
13264 },
13265 Lint {
13266 label: "option_reference_flattening",
13267 description: r##"# `option_reference_flattening`
13268
13269
13270
13271The tracking issue for this feature is: [#149221]
13272
13273[#149221]: https://github.com/rust-lang/rust/issues/149221
13274
13275------------------------
13276"##,
13277 default_severity: Severity::Allow,
13278 warn_since: None,
13279 deny_since: None,
13280 },
13281 Lint {
13282 label: "option_zip",
13283 description: r##"# `option_zip`
13284
13285
13286
13287The tracking issue for this feature is: [#70086]
13288
13289[#70086]: https://github.com/rust-lang/rust/issues/70086
13290
13291------------------------
13292"##,
13293 default_severity: Severity::Allow,
13294 warn_since: None,
13295 deny_since: None,
13296 },
13297 Lint {
13298 label: "os_str_slice",
13299 description: r##"# `os_str_slice`
13300
13301
13302
13303The tracking issue for this feature is: [#118485]
13304
13305[#118485]: https://github.com/rust-lang/rust/issues/118485
13306
13307------------------------
13308"##,
13309 default_severity: Severity::Allow,
13310 warn_since: None,
13311 deny_since: None,
13312 },
13313 Lint {
13314 label: "os_str_split_at",
13315 description: r##"# `os_str_split_at`
13316
13317
13318
13319This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13320
13321------------------------
13322"##,
13323 default_severity: Severity::Allow,
13324 warn_since: None,
13325 deny_since: None,
13326 },
13327 Lint {
13328 label: "os_string_truncate",
13329 description: r##"# `os_string_truncate`
13330
13331
13332
13333The tracking issue for this feature is: [#133262]
13334
13335[#133262]: https://github.com/rust-lang/rust/issues/133262
13336
13337------------------------
13338"##,
13339 default_severity: Severity::Allow,
13340 warn_since: None,
13341 deny_since: None,
13342 },
13343 Lint {
13344 label: "panic_abort",
13345 description: r##"# `panic_abort`
13346
13347
13348
13349The tracking issue for this feature is: [#32837]
13350
13351[#32837]: https://github.com/rust-lang/rust/issues/32837
13352
13353------------------------
13354"##,
13355 default_severity: Severity::Allow,
13356 warn_since: None,
13357 deny_since: None,
13358 },
13359 Lint {
13360 label: "panic_always_abort",
13361 description: r##"# `panic_always_abort`
13362
13363
13364
13365The tracking issue for this feature is: [#84438]
13366
13367[#84438]: https://github.com/rust-lang/rust/issues/84438
13368
13369------------------------
13370"##,
13371 default_severity: Severity::Allow,
13372 warn_since: None,
13373 deny_since: None,
13374 },
13375 Lint {
13376 label: "panic_backtrace_config",
13377 description: r##"# `panic_backtrace_config`
13378
13379
13380
13381The tracking issue for this feature is: [#93346]
13382
13383[#93346]: https://github.com/rust-lang/rust/issues/93346
13384
13385------------------------
13386"##,
13387 default_severity: Severity::Allow,
13388 warn_since: None,
13389 deny_since: None,
13390 },
13391 Lint {
13392 label: "panic_can_unwind",
13393 description: r##"# `panic_can_unwind`
13394
13395
13396
13397The tracking issue for this feature is: [#92988]
13398
13399[#92988]: https://github.com/rust-lang/rust/issues/92988
13400
13401------------------------
13402"##,
13403 default_severity: Severity::Allow,
13404 warn_since: None,
13405 deny_since: None,
13406 },
13407 Lint {
13408 label: "panic_internals",
13409 description: r##"# `panic_internals`
13410
13411
13412
13413This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13414
13415------------------------
13416"##,
13417 default_severity: Severity::Allow,
13418 warn_since: None,
13419 deny_since: None,
13420 },
13421 Lint {
13422 label: "panic_runtime",
13423 description: r##"# `panic_runtime`
13424
13425Allows using the `#![panic_runtime]` attribute.
13426
13427The tracking issue for this feature is: [#32837]
13428
13429[#32837]: https://github.com/rust-lang/rust/issues/32837
13430
13431------------------------
13432"##,
13433 default_severity: Severity::Allow,
13434 warn_since: None,
13435 deny_since: None,
13436 },
13437 Lint {
13438 label: "panic_unwind",
13439 description: r##"# `panic_unwind`
13440
13441
13442
13443The tracking issue for this feature is: [#32837]
13444
13445[#32837]: https://github.com/rust-lang/rust/issues/32837
13446
13447------------------------
13448"##,
13449 default_severity: Severity::Allow,
13450 warn_since: None,
13451 deny_since: None,
13452 },
13453 Lint {
13454 label: "panic_update_hook",
13455 description: r##"# `panic_update_hook`
13456
13457
13458
13459The tracking issue for this feature is: [#92649]
13460
13461[#92649]: https://github.com/rust-lang/rust/issues/92649
13462
13463------------------------
13464"##,
13465 default_severity: Severity::Allow,
13466 warn_since: None,
13467 deny_since: None,
13468 },
13469 Lint {
13470 label: "partial_ord_chaining_methods",
13471 description: r##"# `partial_ord_chaining_methods`
13472
13473
13474
13475This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13476
13477------------------------
13478"##,
13479 default_severity: Severity::Allow,
13480 warn_since: None,
13481 deny_since: None,
13482 },
13483 Lint {
13484 label: "patchable_function_entry",
13485 description: r##"# `patchable_function_entry`
13486
13487Allows specifying nop padding on functions for dynamic patching.
13488
13489The tracking issue for this feature is: [#123115]
13490
13491[#123115]: https://github.com/rust-lang/rust/issues/123115
13492
13493------------------------
13494"##,
13495 default_severity: Severity::Allow,
13496 warn_since: None,
13497 deny_since: None,
13498 },
13499 Lint {
13500 label: "path_absolute_method",
13501 description: r##"# `path_absolute_method`
13502
13503
13504
13505The tracking issue for this feature is: [#153328]
13506
13507[#153328]: https://github.com/rust-lang/rust/issues/153328
13508
13509------------------------
13510"##,
13511 default_severity: Severity::Allow,
13512 warn_since: None,
13513 deny_since: None,
13514 },
13515 Lint {
13516 label: "path_trailing_sep",
13517 description: r##"# `path_trailing_sep`
13518
13519
13520
13521The tracking issue for this feature is: [#142503]
13522
13523[#142503]: https://github.com/rust-lang/rust/issues/142503
13524
13525------------------------
13526"##,
13527 default_severity: Severity::Allow,
13528 warn_since: None,
13529 deny_since: None,
13530 },
13531 Lint {
13532 label: "pattern",
13533 description: r##"# `pattern`
13534
13535
13536
13537The tracking issue for this feature is: [#27721]
13538
13539[#27721]: https://github.com/rust-lang/rust/issues/27721
13540
13541------------------------
13542"##,
13543 default_severity: Severity::Allow,
13544 warn_since: None,
13545 deny_since: None,
13546 },
13547 Lint {
13548 label: "pattern_complexity_limit",
13549 description: r##"# `pattern_complexity_limit`
13550
13551Set the maximum pattern complexity allowed (not limited by default).
13552
13553This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13554
13555------------------------
13556"##,
13557 default_severity: Severity::Allow,
13558 warn_since: None,
13559 deny_since: None,
13560 },
13561 Lint {
13562 label: "pattern_type_macro",
13563 description: r##"# `pattern_type_macro`
13564
13565
13566
13567The tracking issue for this feature is: [#123646]
13568
13569[#123646]: https://github.com/rust-lang/rust/issues/123646
13570
13571------------------------
13572"##,
13573 default_severity: Severity::Allow,
13574 warn_since: None,
13575 deny_since: None,
13576 },
13577 Lint {
13578 label: "pattern_type_range_trait",
13579 description: r##"# `pattern_type_range_trait`
13580
13581
13582
13583The tracking issue for this feature is: [#123646]
13584
13585[#123646]: https://github.com/rust-lang/rust/issues/123646
13586
13587------------------------
13588"##,
13589 default_severity: Severity::Allow,
13590 warn_since: None,
13591 deny_since: None,
13592 },
13593 Lint {
13594 label: "pattern_types",
13595 description: r##"# `pattern_types`
13596
13597Allows using pattern types.
13598
13599The tracking issue for this feature is: [#123646]
13600
13601[#123646]: https://github.com/rust-lang/rust/issues/123646
13602
13603------------------------
13604"##,
13605 default_severity: Severity::Allow,
13606 warn_since: None,
13607 deny_since: None,
13608 },
13609 Lint {
13610 label: "peer_credentials_unix_socket",
13611 description: r##"# `peer_credentials_unix_socket`
13612
13613
13614
13615The tracking issue for this feature is: [#42839]
13616
13617[#42839]: https://github.com/rust-lang/rust/issues/42839
13618
13619------------------------
13620"##,
13621 default_severity: Severity::Allow,
13622 warn_since: None,
13623 deny_since: None,
13624 },
13625 Lint {
13626 label: "phantom_variance_markers",
13627 description: r##"# `phantom_variance_markers`
13628
13629
13630
13631The tracking issue for this feature is: [#135806]
13632
13633[#135806]: https://github.com/rust-lang/rust/issues/135806
13634
13635------------------------
13636"##,
13637 default_severity: Severity::Allow,
13638 warn_since: None,
13639 deny_since: None,
13640 },
13641 Lint {
13642 label: "pin_coerce_unsized_trait",
13643 description: r##"# `pin_coerce_unsized_trait`
13644
13645
13646
13647The tracking issue for this feature is: [#150112]
13648
13649[#150112]: https://github.com/rust-lang/rust/issues/150112
13650
13651------------------------
13652"##,
13653 default_severity: Severity::Allow,
13654 warn_since: None,
13655 deny_since: None,
13656 },
13657 Lint {
13658 label: "pin_derefmut_internals",
13659 description: r##"# `pin_derefmut_internals`
13660
13661
13662
13663This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13664
13665------------------------
13666"##,
13667 default_severity: Severity::Allow,
13668 warn_since: None,
13669 deny_since: None,
13670 },
13671 Lint {
13672 label: "pin_ergonomics",
13673 description: r##"# `pin_ergonomics`
13674
13675Experimental features that make `Pin` more ergonomic.
13676
13677The tracking issue for this feature is: [#130494]
13678
13679[#130494]: https://github.com/rust-lang/rust/issues/130494
13680
13681------------------------
13682"##,
13683 default_severity: Severity::Allow,
13684 warn_since: None,
13685 deny_since: None,
13686 },
13687 Lint {
13688 label: "pin_macro_internals",
13689 description: r##"# `pin_macro_internals`
13690
13691
13692
13693This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13694
13695------------------------
13696"##,
13697 default_severity: Severity::Allow,
13698 warn_since: None,
13699 deny_since: None,
13700 },
13701 Lint {
13702 label: "pointer_is_aligned_to",
13703 description: r##"# `pointer_is_aligned_to`
13704
13705
13706
13707The tracking issue for this feature is: [#96284]
13708
13709[#96284]: https://github.com/rust-lang/rust/issues/96284
13710
13711------------------------
13712"##,
13713 default_severity: Severity::Allow,
13714 warn_since: None,
13715 deny_since: None,
13716 },
13717 Lint {
13718 label: "portable_simd",
13719 description: r##"# `portable_simd`
13720
13721
13722
13723The tracking issue for this feature is: [#86656]
13724
13725[#86656]: https://github.com/rust-lang/rust/issues/86656
13726
13727------------------------
13728"##,
13729 default_severity: Severity::Allow,
13730 warn_since: None,
13731 deny_since: None,
13732 },
13733 Lint {
13734 label: "postfix_match",
13735 description: r##"# `postfix-match`
13736
13737`postfix-match` adds the feature for matching upon values postfix
13738the expressions that generate the values.
13739
13740The tracking issue for this feature is: [#121618](https://github.com/rust-lang/rust/issues/121618).
13741
13742------------------------
13743
13744```rust,edition2021
13745#![feature(postfix_match)]
13746
13747enum Foo {
13748 Bar,
13749 Baz
13750}
13751
13752fn get_foo() -> Foo {
13753 Foo::Bar
13754}
13755
13756get_foo().match {
13757 Foo::Bar => {},
13758 Foo::Baz => panic!(),
13759}
13760```
13761"##,
13762 default_severity: Severity::Allow,
13763 warn_since: None,
13764 deny_since: None,
13765 },
13766 Lint {
13767 label: "powerpc_ppcf128",
13768 description: r##"# `powerpc_ppcf128`
13769
13770
13771
13772The tracking issue for this feature is: [#163323]
13773
13774[#163323]: https://github.com/rust-lang/rust/issues/163323
13775
13776------------------------
13777"##,
13778 default_severity: Severity::Allow,
13779 warn_since: None,
13780 deny_since: None,
13781 },
13782 Lint {
13783 label: "powerpc_target_feature",
13784 description: r##"# `powerpc_target_feature`
13785
13786Target features on powerpc.
13787
13788The tracking issue for this feature is: [#150255]
13789
13790[#150255]: https://github.com/rust-lang/rust/issues/150255
13791
13792------------------------
13793"##,
13794 default_severity: Severity::Allow,
13795 warn_since: None,
13796 deny_since: None,
13797 },
13798 Lint {
13799 label: "prelude_future",
13800 description: r##"# `prelude_future`
13801
13802
13803
13804This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13805
13806------------------------
13807"##,
13808 default_severity: Severity::Allow,
13809 warn_since: None,
13810 deny_since: None,
13811 },
13812 Lint {
13813 label: "prelude_import",
13814 description: r##"# `prelude_import`
13815
13816Allows using `#[prelude_import]` on glob `use` items.
13817
13818This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13819
13820------------------------
13821"##,
13822 default_severity: Severity::Allow,
13823 warn_since: None,
13824 deny_since: None,
13825 },
13826 Lint {
13827 label: "prelude_next",
13828 description: r##"# `prelude_next`
13829
13830
13831
13832This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13833
13834------------------------
13835"##,
13836 default_severity: Severity::Allow,
13837 warn_since: None,
13838 deny_since: None,
13839 },
13840 Lint {
13841 label: "prfchw_target_feature",
13842 description: r##"# `prfchw_target_feature`
13843
13844The prfchw target feature on x86.
13845
13846The tracking issue for this feature is: [#150256]
13847
13848[#150256]: https://github.com/rust-lang/rust/issues/150256
13849
13850------------------------
13851"##,
13852 default_severity: Severity::Allow,
13853 warn_since: None,
13854 deny_since: None,
13855 },
13856 Lint {
13857 label: "print_internals",
13858 description: r##"# `print_internals`
13859
13860This feature is internal to the Rust compiler and is not intended for general use.
13861
13862------------------------
13863"##,
13864 default_severity: Severity::Allow,
13865 warn_since: None,
13866 deny_since: None,
13867 },
13868 Lint {
13869 label: "proc_macro_def_site",
13870 description: r##"# `proc_macro_def_site`
13871
13872
13873
13874The tracking issue for this feature is: [#54724]
13875
13876[#54724]: https://github.com/rust-lang/rust/issues/54724
13877
13878------------------------
13879"##,
13880 default_severity: Severity::Allow,
13881 warn_since: None,
13882 deny_since: None,
13883 },
13884 Lint {
13885 label: "proc_macro_diagnostic",
13886 description: r##"# `proc_macro_diagnostic`
13887
13888
13889
13890The tracking issue for this feature is: [#54140]
13891
13892[#54140]: https://github.com/rust-lang/rust/issues/54140
13893
13894------------------------
13895"##,
13896 default_severity: Severity::Allow,
13897 warn_since: None,
13898 deny_since: None,
13899 },
13900 Lint {
13901 label: "proc_macro_expand",
13902 description: r##"# `proc_macro_expand`
13903
13904
13905
13906The tracking issue for this feature is: [#90765]
13907
13908[#90765]: https://github.com/rust-lang/rust/issues/90765
13909
13910------------------------
13911"##,
13912 default_severity: Severity::Allow,
13913 warn_since: None,
13914 deny_since: None,
13915 },
13916 Lint {
13917 label: "proc_macro_hygiene",
13918 description: r##"# `proc_macro_hygiene`
13919
13920Allows macro attributes on expressions and statements.
13921
13922The tracking issue for this feature is: [#54727]
13923
13924[#54727]: https://github.com/rust-lang/rust/issues/54727
13925
13926------------------------
13927"##,
13928 default_severity: Severity::Allow,
13929 warn_since: None,
13930 deny_since: None,
13931 },
13932 Lint {
13933 label: "proc_macro_internals",
13934 description: r##"# `proc_macro_internals`
13935
13936
13937
13938This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
13939
13940------------------------
13941"##,
13942 default_severity: Severity::Allow,
13943 warn_since: None,
13944 deny_since: None,
13945 },
13946 Lint {
13947 label: "proc_macro_quote",
13948 description: r##"# `proc_macro_quote`
13949
13950
13951
13952The tracking issue for this feature is: [#54722]
13953
13954[#54722]: https://github.com/rust-lang/rust/issues/54722
13955
13956------------------------
13957"##,
13958 default_severity: Severity::Allow,
13959 warn_since: None,
13960 deny_since: None,
13961 },
13962 Lint {
13963 label: "proc_macro_span",
13964 description: r##"# `proc_macro_span`
13965
13966
13967
13968The tracking issue for this feature is: [#54725]
13969
13970[#54725]: https://github.com/rust-lang/rust/issues/54725
13971
13972------------------------
13973"##,
13974 default_severity: Severity::Allow,
13975 warn_since: None,
13976 deny_since: None,
13977 },
13978 Lint {
13979 label: "proc_macro_totokens",
13980 description: r##"# `proc_macro_totokens`
13981
13982
13983
13984The tracking issue for this feature is: [#130977]
13985
13986[#130977]: https://github.com/rust-lang/rust/issues/130977
13987
13988------------------------
13989"##,
13990 default_severity: Severity::Allow,
13991 warn_since: None,
13992 deny_since: None,
13993 },
13994 Lint {
13995 label: "proc_macro_tracked_env",
13996 description: r##"# `proc_macro_tracked_env`
13997
13998
13999
14000The tracking issue for this feature is: [#99515]
14001
14002[#99515]: https://github.com/rust-lang/rust/issues/99515
14003
14004------------------------
14005"##,
14006 default_severity: Severity::Allow,
14007 warn_since: None,
14008 deny_since: None,
14009 },
14010 Lint {
14011 label: "proc_macro_tracked_path",
14012 description: r##"# `proc_macro_tracked_path`
14013
14014
14015
14016The tracking issue for this feature is: [#99515]
14017
14018[#99515]: https://github.com/rust-lang/rust/issues/99515
14019
14020------------------------
14021"##,
14022 default_severity: Severity::Allow,
14023 warn_since: None,
14024 deny_since: None,
14025 },
14026 Lint {
14027 label: "proc_macro_value",
14028 description: r##"# `proc_macro_value`
14029
14030
14031
14032The tracking issue for this feature is: [#136652]
14033
14034[#136652]: https://github.com/rust-lang/rust/issues/136652
14035
14036------------------------
14037"##,
14038 default_severity: Severity::Allow,
14039 warn_since: None,
14040 deny_since: None,
14041 },
14042 Lint {
14043 label: "process_chroot",
14044 description: r##"# `process_chroot`
14045
14046
14047
14048The tracking issue for this feature is: [#141298]
14049
14050[#141298]: https://github.com/rust-lang/rust/issues/141298
14051
14052------------------------
14053"##,
14054 default_severity: Severity::Allow,
14055 warn_since: None,
14056 deny_since: None,
14057 },
14058 Lint {
14059 label: "process_exitcode_internals",
14060 description: r##"# `process_exitcode_internals`
14061
14062
14063
14064This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
14065
14066------------------------
14067"##,
14068 default_severity: Severity::Allow,
14069 warn_since: None,
14070 deny_since: None,
14071 },
14072 Lint {
14073 label: "process_internals",
14074 description: r##"# `process_internals`
14075
14076
14077
14078This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
14079
14080------------------------
14081"##,
14082 default_severity: Severity::Allow,
14083 warn_since: None,
14084 deny_since: None,
14085 },
14086 Lint {
14087 label: "process_setsid",
14088 description: r##"# `process_setsid`
14089
14090
14091
14092The tracking issue for this feature is: [#105376]
14093
14094[#105376]: https://github.com/rust-lang/rust/issues/105376
14095
14096------------------------
14097"##,
14098 default_severity: Severity::Allow,
14099 warn_since: None,
14100 deny_since: None,
14101 },
14102 Lint {
14103 label: "profiler_runtime",
14104 description: r##"# `profiler_runtime`
14105
14106Used to identify crates that contain the profiler runtime.
14107
14108This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
14109
14110------------------------
14111"##,
14112 default_severity: Severity::Allow,
14113 warn_since: None,
14114 deny_since: None,
14115 },
14116 Lint {
14117 label: "profiler_runtime_lib",
14118 description: r##"# `profiler_runtime_lib`
14119
14120This feature is internal to the Rust compiler and is not intended for general use.
14121
14122------------------------
14123"##,
14124 default_severity: Severity::Allow,
14125 warn_since: None,
14126 deny_since: None,
14127 },
14128 Lint {
14129 label: "profiling_marker_api",
14130 description: r##"# `profiling_marker_api`
14131
14132
14133
14134The tracking issue for this feature is: [#148197]
14135
14136[#148197]: https://github.com/rust-lang/rust/issues/148197
14137
14138------------------------
14139"##,
14140 default_severity: Severity::Allow,
14141 warn_since: None,
14142 deny_since: None,
14143 },
14144 Lint {
14145 label: "ptr_alignment_type",
14146 description: r##"# `ptr_alignment_type`
14147
14148
14149
14150The tracking issue for this feature is: [#102070]
14151
14152[#102070]: https://github.com/rust-lang/rust/issues/102070
14153
14154------------------------
14155"##,
14156 default_severity: Severity::Allow,
14157 warn_since: None,
14158 deny_since: None,
14159 },
14160 Lint {
14161 label: "ptr_as_uninit",
14162 description: r##"# `ptr_as_uninit`
14163
14164
14165
14166The tracking issue for this feature is: [#75402]
14167
14168[#75402]: https://github.com/rust-lang/rust/issues/75402
14169
14170------------------------
14171"##,
14172 default_severity: Severity::Allow,
14173 warn_since: None,
14174 deny_since: None,
14175 },
14176 Lint {
14177 label: "ptr_cast_array",
14178 description: r##"# `ptr_cast_array`
14179
14180
14181
14182The tracking issue for this feature is: [#144514]
14183
14184[#144514]: https://github.com/rust-lang/rust/issues/144514
14185
14186------------------------
14187"##,
14188 default_severity: Severity::Allow,
14189 warn_since: None,
14190 deny_since: None,
14191 },
14192 Lint {
14193 label: "ptr_mask",
14194 description: r##"# `ptr_mask`
14195
14196
14197
14198The tracking issue for this feature is: [#98290]
14199
14200[#98290]: https://github.com/rust-lang/rust/issues/98290
14201
14202------------------------
14203"##,
14204 default_severity: Severity::Allow,
14205 warn_since: None,
14206 deny_since: None,
14207 },
14208 Lint {
14209 label: "ptr_metadata",
14210 description: r##"# `ptr_metadata`
14211
14212
14213
14214The tracking issue for this feature is: [#81513]
14215
14216[#81513]: https://github.com/rust-lang/rust/issues/81513
14217
14218------------------------
14219"##,
14220 default_severity: Severity::Allow,
14221 warn_since: None,
14222 deny_since: None,
14223 },
14224 Lint {
14225 label: "pub_crate_should_not_need_unstable_attr",
14226 description: r##"# `pub_crate_should_not_need_unstable_attr`
14227
14228
14229
14230This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
14231
14232------------------------
14233"##,
14234 default_severity: Severity::Allow,
14235 warn_since: None,
14236 deny_since: None,
14237 },
14238 Lint {
14239 label: "random",
14240 description: r##"# `random`
14241
14242
14243
14244The tracking issue for this feature is: [#130703]
14245
14246[#130703]: https://github.com/rust-lang/rust/issues/130703
14247
14248------------------------
14249"##,
14250 default_severity: Severity::Allow,
14251 warn_since: None,
14252 deny_since: None,
14253 },
14254 Lint {
14255 label: "range_bounds_is_empty",
14256 description: r##"# `range_bounds_is_empty`
14257
14258
14259
14260The tracking issue for this feature is: [#137300]
14261
14262[#137300]: https://github.com/rust-lang/rust/issues/137300
14263
14264------------------------
14265"##,
14266 default_severity: Severity::Allow,
14267 warn_since: None,
14268 deny_since: None,
14269 },
14270 Lint {
14271 label: "range_into_bounds",
14272 description: r##"# `range_into_bounds`
14273
14274
14275
14276The tracking issue for this feature is: [#136903]
14277
14278[#136903]: https://github.com/rust-lang/rust/issues/136903
14279
14280------------------------
14281"##,
14282 default_severity: Severity::Allow,
14283 warn_since: None,
14284 deny_since: None,
14285 },
14286 Lint {
14287 label: "raw_dylib_elf",
14288 description: r##"# `raw_dylib_elf`
14289
14290Allows the use of raw-dylibs on ELF platforms
14291
14292The tracking issue for this feature is: [#135694]
14293
14294[#135694]: https://github.com/rust-lang/rust/issues/135694
14295
14296------------------------
14297"##,
14298 default_severity: Severity::Allow,
14299 warn_since: None,
14300 deny_since: None,
14301 },
14302 Lint {
14303 label: "raw_os_error_ty",
14304 description: r##"# `raw_os_error_ty`
14305
14306
14307
14308The tracking issue for this feature is: [#107792]
14309
14310[#107792]: https://github.com/rust-lang/rust/issues/107792
14311
14312------------------------
14313"##,
14314 default_severity: Severity::Allow,
14315 warn_since: None,
14316 deny_since: None,
14317 },
14318 Lint {
14319 label: "raw_slice_split",
14320 description: r##"# `raw_slice_split`
14321
14322
14323
14324The tracking issue for this feature is: [#95595]
14325
14326[#95595]: https://github.com/rust-lang/rust/issues/95595
14327
14328------------------------
14329"##,
14330 default_severity: Severity::Allow,
14331 warn_since: None,
14332 deny_since: None,
14333 },
14334 Lint {
14335 label: "raw_vec_internals",
14336 description: r##"# `raw_vec_internals`
14337
14338
14339
14340This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
14341
14342------------------------
14343"##,
14344 default_severity: Severity::Allow,
14345 warn_since: None,
14346 deny_since: None,
14347 },
14348 Lint {
14349 label: "read_array",
14350 description: r##"# `read_array`
14351
14352
14353
14354The tracking issue for this feature is: [#148848]
14355
14356[#148848]: https://github.com/rust-lang/rust/issues/148848
14357
14358------------------------
14359"##,
14360 default_severity: Severity::Allow,
14361 warn_since: None,
14362 deny_since: None,
14363 },
14364 Lint {
14365 label: "read_buf",
14366 description: r##"# `read_buf`
14367
14368
14369
14370The tracking issue for this feature is: [#78485]
14371
14372[#78485]: https://github.com/rust-lang/rust/issues/78485
14373
14374------------------------
14375"##,
14376 default_severity: Severity::Allow,
14377 warn_since: None,
14378 deny_since: None,
14379 },
14380 Lint {
14381 label: "read_buf_at",
14382 description: r##"# `read_buf_at`
14383
14384
14385
14386The tracking issue for this feature is: [#140771]
14387
14388[#140771]: https://github.com/rust-lang/rust/issues/140771
14389
14390------------------------
14391"##,
14392 default_severity: Severity::Allow,
14393 warn_since: None,
14394 deny_since: None,
14395 },
14396 Lint {
14397 label: "read_le",
14398 description: r##"# `read_le`
14399
14400
14401
14402The tracking issue for this feature is: [#156984]
14403
14404[#156984]: https://github.com/rust-lang/rust/issues/156984
14405
14406------------------------
14407"##,
14408 default_severity: Severity::Allow,
14409 warn_since: None,
14410 deny_since: None,
14411 },
14412 Lint {
14413 label: "read_le_be_internals",
14414 description: r##"# `read_le_be_internals`
14415
14416
14417
14418This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
14419
14420------------------------
14421"##,
14422 default_severity: Severity::Allow,
14423 warn_since: None,
14424 deny_since: None,
14425 },
14426 Lint {
14427 label: "reborrow",
14428 description: r##"# `reborrow`
14429
14430Allows the `Reborrow` and `CoerceShared` traits.
14431
14432The tracking issue for this feature is: [#145612]
14433
14434[#145612]: https://github.com/rust-lang/rust/issues/145612
14435
14436------------------------
14437"##,
14438 default_severity: Severity::Allow,
14439 warn_since: None,
14440 deny_since: None,
14441 },
14442 Lint {
14443 label: "reentrant_lock",
14444 description: r##"# `reentrant_lock`
14445
14446
14447
14448The tracking issue for this feature is: [#121440]
14449
14450[#121440]: https://github.com/rust-lang/rust/issues/121440
14451
14452------------------------
14453"##,
14454 default_severity: Severity::Allow,
14455 warn_since: None,
14456 deny_since: None,
14457 },
14458 Lint {
14459 label: "reentrant_lock_data_ptr",
14460 description: r##"# `reentrant_lock_data_ptr`
14461
14462
14463
14464The tracking issue for this feature is: [#140368]
14465
14466[#140368]: https://github.com/rust-lang/rust/issues/140368
14467
14468------------------------
14469"##,
14470 default_severity: Severity::Allow,
14471 warn_since: None,
14472 deny_since: None,
14473 },
14474 Lint {
14475 label: "ref_pat_eat_one_layer_2024",
14476 description: r##"# `ref_pat_eat_one_layer_2024`
14477
14478The tracking issue for this feature is: [#123076]
14479
14480[#123076]: https://github.com/rust-lang/rust/issues/123076
14481
14482---
14483
14484This feature is incomplete and not yet intended for general use.
14485
14486This implements experimental, Edition-dependent match ergonomics under consideration for inclusion
14487in Rust, allowing `&` patterns in more places. For example:
14488
14489```rust,edition2024
14490#![feature(ref_pat_eat_one_layer_2024)]
14491#![allow(incomplete_features)]
14492#
14493# // Tests type equality in a way that avoids coercing `&&T` or `&mut T` to `&T`.
14494# trait Eq<T> {}
14495# impl<T> Eq<T> for T {}
14496# fn has_type<T>(_: impl Eq<T>) {}
14497
14498// `&` can match against a `ref` binding mode instead of a reference type:
14499let (x, &y) = &(0, 1);
14500has_type::<&u8>(x);
14501has_type::<u8>(y);
14502
14503// `&` can match against `&mut` references:
14504let &z = &mut 2;
14505has_type::<u8>(z);
14506```
14507
14508For specifics, see the corresponding typing rules for [Editions 2021 and earlier] and for
14509[Editions 2024 and later]. For more information on binding modes, see [The Rust Reference].
14510
14511For alternative experimental match ergonomics, see the feature
14512[`ref_pat_eat_one_layer_2024_structural`](./ref-pat-eat-one-layer-2024-structural.md).
14513
14514[Editions 2021 and earlier]: https://nadrieril.github.io/typing-rust-patterns/?compare=false&opts1=AQEBAQIBAQABAAAAAQEBAAEBAAABAAA%3D&mode=rules&do_cmp=false
14515[Editions 2024 and later]: https://nadrieril.github.io/typing-rust-patterns/?compare=false&opts1=AQEBAAABAQABAgIAAQEBAAEBAAABAAA%3D&mode=rules&do_cmp=false
14516[The Rust Reference]: https://doc.rust-lang.org/reference/patterns.html#binding-modes
14517"##,
14518 default_severity: Severity::Allow,
14519 warn_since: None,
14520 deny_since: None,
14521 },
14522 Lint {
14523 label: "ref_pat_eat_one_layer_2024_structural",
14524 description: r##"# `ref_pat_eat_one_layer_2024_structural`
14525
14526The tracking issue for this feature is: [#123076]
14527
14528[#123076]: https://github.com/rust-lang/rust/issues/123076
14529
14530---
14531
14532This feature is incomplete and not yet intended for general use.
14533
14534This implements experimental, Edition-dependent match ergonomics under consideration for inclusion
14535in Rust, allowing `&` patterns in more places. For example:
14536```rust,edition2024
14537#![feature(ref_pat_eat_one_layer_2024_structural)]
14538#![allow(incomplete_features)]
14539#
14540# // Tests type equality in a way that avoids coercing `&&T` or `&mut T` to `&T`.
14541# trait Eq<T> {}
14542# impl<T> Eq<T> for T {}
14543# fn has_type<T>(_: impl Eq<T>) {}
14544
14545// `&` can match against a `ref` binding mode instead of a reference type:
14546let (x, &y) = &(0, 1);
14547has_type::<&u8>(x);
14548has_type::<u8>(y);
14549
14550// `&` can match against `&mut` references:
14551let &z = &mut 2;
14552has_type::<u8>(z);
14553```
14554
14555For specifics, see the corresponding typing rules for [Editions 2021 and earlier] and for
14556[Editions 2024 and later]. For more information on binding modes, see [The Rust Reference].
14557
14558For alternative experimental match ergonomics, see the feature
14559[`ref_pat_eat_one_layer_2024`](./ref-pat-eat-one-layer-2024.md).
14560
14561[Editions 2021 and earlier]: https://nadrieril.github.io/typing-rust-patterns/?compare=false&opts1=AQEBAQIBAQEBAAAAAAAAAAAAAAAAAAA%3D&mode=rules&do_cmp=false
14562[Editions 2024 and later]: https://nadrieril.github.io/typing-rust-patterns/?compare=false&opts1=AQEBAgEBAQEBAgIAAAAAAAAAAAAAAAA%3D&mode=rules&do_cmp=false
14563[The Rust Reference]: https://doc.rust-lang.org/reference/patterns.html#binding-modes
14564"##,
14565 default_severity: Severity::Allow,
14566 warn_since: None,
14567 deny_since: None,
14568 },
14569 Lint {
14570 label: "refcell_try_map",
14571 description: r##"# `refcell_try_map`
14572
14573
14574
14575The tracking issue for this feature is: [#143801]
14576
14577[#143801]: https://github.com/rust-lang/rust/issues/143801
14578
14579------------------------
14580"##,
14581 default_severity: Severity::Allow,
14582 warn_since: None,
14583 deny_since: None,
14584 },
14585 Lint {
14586 label: "register_tool",
14587 description: r##"# `register_tool`
14588
14589The tracking issue for this feature is: [#66079]
14590
14591[#66079]: https://github.com/rust-lang/rust/issues/66079
14592
14593------------------------
14594
14595The `register_tool` language feature informs the compiler that attributes in your code are meant to be used with tools other than the compiler itself. This can be useful if your code has semantic meaning without the external tool, but enables additional features when the tool is present.
14596
14597`register_tool` also allows configuring lint levels for external tools.
14598
14599Tool attributes are only meant for ignorable attributes. If your code *changes* meaning when the attribute is present, it should not use a tool attribute (because it cannot be compiled with anything other than the external tool, and in a sense is a fork of the language).
14600
14601------------------------
14602
14603`#![register_tool(tool)]` is an attribute, and is only valid at the crate root.
14604Attributes using the registered tool are checked for valid syntax, and lint attributes are checked to be in a valid format. However, the compiler cannot validate the semantics of the attribute, nor can it tell whether the configured lint is present in the external tool.
14605
14606Semantically, `clippy::*`, `rustdoc::*`, and `rustfmt::*` lints and attributes all behave as if `#![register_tool(clippy, rustdoc, rustfmt)]` were injected into the crate root, except that the `rustdoc` namespace can only be used for lints, not for attributes.
14607When compiling with `-Z unstable-features`, `rustc::*` lints can also be used. Like `rustdoc`, the `rustc` namespace can only be used with lints, not attributes.
14608
14609The compiler will emit an error if it encounters a lint/attribute whose namespace isn't a registered tool.
14610
14611Tool namespaces cannot be nested; `register_tool(main_tool::subtool)` is an error.
14612
14613## Examples
14614
14615Tool attributes:
14616
14617```rust
14618#![feature(register_tool)]
14619#![register_tool(c2rust)]
14620
14621// Mark which C header file this module was generated from.
14622#[c2rust::header_src = "operations.h"]
14623pub mod operations_h {
14624 use std::ffi::c_int;
14625
14626 // Mark which source line this struct was generated from.
14627 #[c2rust::src_loc = "11:0"]
14628 pub struct Point {
14629 pub x: c_int,
14630 pub y: c_int,
14631 }
14632}
14633```
14634
14635Tool lints:
14636
14637```
14638#![feature(register_tool)]
14639#![register_tool(bevy)]
14640#![deny(bevy::duplicate_bevy_dependencies)]
14641```
14642"##,
14643 default_severity: Severity::Allow,
14644 warn_since: None,
14645 deny_since: None,
14646 },
14647 Lint {
14648 label: "rename_noreplace",
14649 description: r##"# `rename_noreplace`
14650
14651
14652
14653The tracking issue for this feature is: [#161427]
14654
14655[#161427]: https://github.com/rust-lang/rust/issues/161427
14656
14657------------------------
14658"##,
14659 default_severity: Severity::Allow,
14660 warn_since: None,
14661 deny_since: None,
14662 },
14663 Lint {
14664 label: "repr_simd",
14665 description: r##"# `repr_simd`
14666
14667Allows `repr(simd)` and importing the various simd intrinsics.
14668
14669The tracking issue for this feature is: [#27731]
14670
14671[#27731]: https://github.com/rust-lang/rust/issues/27731
14672
14673------------------------
14674"##,
14675 default_severity: Severity::Allow,
14676 warn_since: None,
14677 deny_since: None,
14678 },
14679 Lint {
14680 label: "restricted_std",
14681 description: r##"# `restricted_std`
14682
14683
14684
14685This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
14686
14687------------------------
14688"##,
14689 default_severity: Severity::Allow,
14690 warn_since: None,
14691 deny_since: None,
14692 },
14693 Lint {
14694 label: "retain_unstable",
14695 description: r##"# `retain_unstable`
14696
14697
14698
14699The tracking issue for this feature is: [#164152]
14700
14701[#164152]: https://github.com/rust-lang/rust/issues/164152
14702
14703------------------------
14704"##,
14705 default_severity: Severity::Allow,
14706 warn_since: None,
14707 deny_since: None,
14708 },
14709 Lint {
14710 label: "return_address",
14711 description: r##"# `return_address`
14712
14713
14714
14715The tracking issue for this feature is: [#154966]
14716
14717[#154966]: https://github.com/rust-lang/rust/issues/154966
14718
14719------------------------
14720"##,
14721 default_severity: Severity::Allow,
14722 warn_since: None,
14723 deny_since: None,
14724 },
14725 Lint {
14726 label: "return_type_notation",
14727 description: r##"# `return_type_notation`
14728
14729Allows bounding the return type of AFIT/RPITIT.
14730
14731The tracking issue for this feature is: [#109417]
14732
14733[#109417]: https://github.com/rust-lang/rust/issues/109417
14734
14735------------------------
14736"##,
14737 default_severity: Severity::Allow,
14738 warn_since: None,
14739 deny_since: None,
14740 },
14741 Lint {
14742 label: "rev_into_inner",
14743 description: r##"# `rev_into_inner`
14744
14745
14746
14747The tracking issue for this feature is: [#144277]
14748
14749[#144277]: https://github.com/rust-lang/rust/issues/144277
14750
14751------------------------
14752"##,
14753 default_severity: Severity::Allow,
14754 warn_since: None,
14755 deny_since: None,
14756 },
14757 Lint {
14758 label: "riscv_target_feature",
14759 description: r##"# `riscv_target_feature`
14760
14761Target features on riscv.
14762
14763The tracking issue for this feature is: [#150257]
14764
14765[#150257]: https://github.com/rust-lang/rust/issues/150257
14766
14767------------------------
14768"##,
14769 default_severity: Severity::Allow,
14770 warn_since: None,
14771 deny_since: None,
14772 },
14773 Lint {
14774 label: "rt",
14775 description: r##"# `rt`
14776
14777This feature is internal to the Rust compiler and is not intended for general use.
14778
14779------------------------
14780"##,
14781 default_severity: Severity::Allow,
14782 warn_since: None,
14783 deny_since: None,
14784 },
14785 Lint {
14786 label: "rtm_target_feature",
14787 description: r##"# `rtm_target_feature`
14788
14789The rtm target feature on x86.
14790
14791The tracking issue for this feature is: [#150258]
14792
14793[#150258]: https://github.com/rust-lang/rust/issues/150258
14794
14795------------------------
14796"##,
14797 default_severity: Severity::Allow,
14798 warn_since: None,
14799 deny_since: None,
14800 },
14801 Lint {
14802 label: "rust_cold_cc",
14803 description: r##"# `rust_cold_cc`
14804
14805Allows `extern "rust-cold"`.
14806
14807The tracking issue for this feature is: [#97544]
14808
14809[#97544]: https://github.com/rust-lang/rust/issues/97544
14810
14811------------------------
14812"##,
14813 default_severity: Severity::Allow,
14814 warn_since: None,
14815 deny_since: None,
14816 },
14817 Lint {
14818 label: "rust_preserve_none_cc",
14819 description: r##"# `rust_preserve_none_cc`
14820
14821Allows `extern "rust-preserve-none"`.
14822
14823The tracking issue for this feature is: [#151401]
14824
14825[#151401]: https://github.com/rust-lang/rust/issues/151401
14826
14827------------------------
14828"##,
14829 default_severity: Severity::Allow,
14830 warn_since: None,
14831 deny_since: None,
14832 },
14833 Lint {
14834 label: "rust_tail_cc",
14835 description: r##"# `rust_tail_cc`
14836
14837Allows `extern "tail"`.
14838
14839The tracking issue for this feature is: [#157427]
14840
14841[#157427]: https://github.com/rust-lang/rust/issues/157427
14842
14843------------------------
14844"##,
14845 default_severity: Severity::Allow,
14846 warn_since: None,
14847 deny_since: None,
14848 },
14849 Lint {
14850 label: "rustc_attrs",
14851 description: r##"# `rustc_attrs`
14852
14853This feature has no tracking issue, and is therefore internal to
14854the compiler, not being intended for general use.
14855
14856Note: `rustc_attrs` enables many rustc-internal attributes and this page
14857only discuss a few of them.
14858
14859------------------------
14860
14861The `rustc_attrs` feature allows debugging rustc type layouts by using
14862`#[rustc_dump_layout(...)]` to debug layout at compile time (it even works
14863with `cargo check`) as an alternative to `rustc -Z print-type-sizes`
14864that is way more verbose.
14865
14866Options provided by `#[rustc_dump_layout(...)]` are `backend_repr`, `align`,
14867`debug`, `homogeneous_aggregate` and `size`.
14868Note that it only works on sized types without generics.
14869
14870## Examples
14871
14872```rust,compile_fail
14873#![feature(rustc_attrs)]
14874
14875#[rustc_dump_layout(backend_repr, size)]
14876pub enum X {
14877 Y(u8, u8, u8),
14878 Z(isize),
14879}
14880```
14881
14882When that is compiled, the compiler will error with something like
14883
14884```text
14885error: backend_repr: Aggregate { sized: true }
14886 --> src/lib.rs:4:1
14887 |
148884 | / pub enum T {
148895 | | Y(u8, u8, u8),
148906 | | Z(isize),
148917 | | }
14892 | |_^
14893
14894error: size: Size { raw: 16 }
14895 --> src/lib.rs:4:1
14896 |
148974 | / pub enum T {
148985 | | Y(u8, u8, u8),
148996 | | Z(isize),
149007 | | }
14901 | |_^
14902
14903error: aborting due to 2 previous errors
14904```
14905"##,
14906 default_severity: Severity::Allow,
14907 warn_since: None,
14908 deny_since: None,
14909 },
14910 Lint {
14911 label: "rustc_private",
14912 description: r##"# `rustc_private`
14913
14914The tracking issue for this feature is: [#27812]
14915
14916[#27812]: https://github.com/rust-lang/rust/issues/27812
14917
14918------------------------
14919
14920This feature allows access to unstable internal compiler crates such as `rustc_driver`.
14921
14922The presence of this feature changes the way the linkage format for dylibs is calculated in a way
14923that is necessary for linking against dylibs that statically link `std` (such as `rustc_driver`).
14924This makes this feature "viral" in linkage; its use in a given crate makes its use required in
14925dependent crates which link to it (including integration tests, which are built as separate crates).
14926
14927## Common linker failures related to missing LLVM libraries
14928
14929### When using `rustc-private` with Official Toolchains
14930
14931When using the `rustc_private` feature with official toolchains distributed via rustup, you'll need to install:
14932
149331. The `rustc-dev` component (provides compiler libraries)
149342. The `llvm-tools` component (provides LLVM libraries needed for linking)
14935
14936You can install these components using `rustup`:
14937
14938```text
14939rustup component add rustc-dev llvm-tools
14940```
14941
14942Without the `llvm-tools` component, you may encounter linking errors like:
14943
14944```text
14945error: linking with `cc` failed: exit status: 1
14946 |
14947 = note: rust-lld: error: unable to find library -lLLVM-{version}
14948```
14949
14950### When using `rustc-private` with Custom Toolchains
14951
14952For custom-built toolchains or environments not using rustup, different configuration may be required:
14953
14954- Ensure LLVM libraries are available in your library search paths
14955- You might need to configure library paths explicitly depending on your LLVM installation
14956"##,
14957 default_severity: Severity::Allow,
14958 warn_since: None,
14959 deny_since: None,
14960 },
14961 Lint {
14962 label: "rustdoc_internals",
14963 description: r##"# `rustdoc_internals`
14964
14965Allows using internal rustdoc features like `doc(keyword)`.
14966
14967This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
14968
14969------------------------
14970"##,
14971 default_severity: Severity::Allow,
14972 warn_since: None,
14973 deny_since: None,
14974 },
14975 Lint {
14976 label: "rustdoc_missing_doc_code_examples",
14977 description: r##"# `rustdoc_missing_doc_code_examples`
14978
14979Allows using the `rustdoc::missing_doc_code_examples` lint
14980
14981The tracking issue for this feature is: [#101730]
14982
14983[#101730]: https://github.com/rust-lang/rust/issues/101730
14984
14985------------------------
14986"##,
14987 default_severity: Severity::Allow,
14988 warn_since: None,
14989 deny_since: None,
14990 },
14991 Lint {
14992 label: "rwlock_data_ptr",
14993 description: r##"# `rwlock_data_ptr`
14994
14995
14996
14997The tracking issue for this feature is: [#140368]
14998
14999[#140368]: https://github.com/rust-lang/rust/issues/140368
15000
15001------------------------
15002"##,
15003 default_severity: Severity::Allow,
15004 warn_since: None,
15005 deny_since: None,
15006 },
15007 Lint {
15008 label: "s390x_target_feature",
15009 description: r##"# `s390x_target_feature`
15010
15011Target features on s390x.
15012
15013The tracking issue for this feature is: [#150259]
15014
15015[#150259]: https://github.com/rust-lang/rust/issues/150259
15016
15017------------------------
15018"##,
15019 default_severity: Severity::Allow,
15020 warn_since: None,
15021 deny_since: None,
15022 },
15023 Lint {
15024 label: "sanitize",
15025 description: r##"# `sanitize`
15026
15027The tracking issue for this feature is: [#39699]
15028
15029[#39699]: https://github.com/rust-lang/rust/issues/39699
15030
15031------------------------
15032
15033The `sanitize` attribute can be used to selectively disable or enable sanitizer
15034instrumentation in an annotated function. This might be useful to: avoid
15035instrumentation overhead in a performance critical function, or avoid
15036instrumenting code that contains constructs unsupported by given sanitizer.
15037
15038The precise effect of this annotation depends on particular sanitizer in use.
15039For example, with `sanitize(thread = "off")`, the thread sanitizer will no
15040longer instrument non-atomic store / load operations, but it will instrument
15041atomic operations to avoid reporting false positives and provide meaning full
15042stack traces.
15043
15044This attribute was previously named `no_sanitize`.
15045
15046## Examples
15047
15048``` rust
15049#![feature(sanitize)]
15050
15051#[sanitize(address = "off")]
15052fn foo() {
15053 // ...
15054}
15055```
15056
15057It is also possible to disable sanitizers for entire modules and enable them
15058for single items or functions.
15059
15060```rust
15061#![feature(sanitize)]
15062
15063#[sanitize(address = "off")]
15064mod foo {
15065 fn unsanitized() {
15066 // ...
15067 }
15068
15069 #[sanitize(address = "on")]
15070 fn sanitized() {
15071 // ...
15072 }
15073}
15074```
15075
15076It's also applicable to impl blocks.
15077
15078```rust
15079#![feature(sanitize)]
15080
15081trait MyTrait {
15082 fn foo(&self);
15083 fn bar(&self);
15084}
15085
15086#[sanitize(address = "off")]
15087impl MyTrait for () {
15088 fn foo(&self) {
15089 // ...
15090 }
15091
15092 #[sanitize(address = "on")]
15093 fn bar(&self) {
15094 // ...
15095 }
15096}
15097```
15098"##,
15099 default_severity: Severity::Allow,
15100 warn_since: None,
15101 deny_since: None,
15102 },
15103 Lint {
15104 label: "seek_io_take_position",
15105 description: r##"# `seek_io_take_position`
15106
15107
15108
15109The tracking issue for this feature is: [#97227]
15110
15111[#97227]: https://github.com/rust-lang/rust/issues/97227
15112
15113------------------------
15114"##,
15115 default_severity: Severity::Allow,
15116 warn_since: None,
15117 deny_since: None,
15118 },
15119 Lint {
15120 label: "seek_read_exact_seek_write_all",
15121 description: r##"# `seek_read_exact_seek_write_all`
15122
15123
15124
15125The tracking issue for this feature is: [#162868]
15126
15127[#162868]: https://github.com/rust-lang/rust/issues/162868
15128
15129------------------------
15130"##,
15131 default_severity: Severity::Allow,
15132 warn_since: None,
15133 deny_since: None,
15134 },
15135 Lint {
15136 label: "seek_stream_len",
15137 description: r##"# `seek_stream_len`
15138
15139
15140
15141The tracking issue for this feature is: [#59359]
15142
15143[#59359]: https://github.com/rust-lang/rust/issues/59359
15144
15145------------------------
15146"##,
15147 default_severity: Severity::Allow,
15148 warn_since: None,
15149 deny_since: None,
15150 },
15151 Lint {
15152 label: "set_permissions_nofollow",
15153 description: r##"# `set_permissions_nofollow`
15154
15155
15156
15157The tracking issue for this feature is: [#141607]
15158
15159[#141607]: https://github.com/rust-lang/rust/issues/141607
15160
15161------------------------
15162"##,
15163 default_severity: Severity::Allow,
15164 warn_since: None,
15165 deny_since: None,
15166 },
15167 Lint {
15168 label: "set_ptr_value",
15169 description: r##"# `set_ptr_value`
15170
15171
15172
15173The tracking issue for this feature is: [#75091]
15174
15175[#75091]: https://github.com/rust-lang/rust/issues/75091
15176
15177------------------------
15178"##,
15179 default_severity: Severity::Allow,
15180 warn_since: None,
15181 deny_since: None,
15182 },
15183 Lint {
15184 label: "setgroups",
15185 description: r##"# `setgroups`
15186
15187
15188
15189The tracking issue for this feature is: [#90747]
15190
15191[#90747]: https://github.com/rust-lang/rust/issues/90747
15192
15193------------------------
15194"##,
15195 default_severity: Severity::Allow,
15196 warn_since: None,
15197 deny_since: None,
15198 },
15199 Lint {
15200 label: "sgx_platform",
15201 description: r##"# `sgx_platform`
15202
15203
15204
15205The tracking issue for this feature is: [#56975]
15206
15207[#56975]: https://github.com/rust-lang/rust/issues/56975
15208
15209------------------------
15210"##,
15211 default_severity: Severity::Allow,
15212 warn_since: None,
15213 deny_since: None,
15214 },
15215 Lint {
15216 label: "share_trait",
15217 description: r##"# `share_trait`
15218
15219
15220
15221The tracking issue for this feature is: [#156756]
15222
15223[#156756]: https://github.com/rust-lang/rust/issues/156756
15224
15225------------------------
15226"##,
15227 default_severity: Severity::Allow,
15228 warn_since: None,
15229 deny_since: None,
15230 },
15231 Lint {
15232 label: "signed_bigint_helpers",
15233 description: r##"# `signed_bigint_helpers`
15234
15235
15236
15237The tracking issue for this feature is: [#151989]
15238
15239[#151989]: https://github.com/rust-lang/rust/issues/151989
15240
15241------------------------
15242"##,
15243 default_severity: Severity::Allow,
15244 warn_since: None,
15245 deny_since: None,
15246 },
15247 Lint {
15248 label: "simd_ffi",
15249 description: r##"# `simd_ffi`
15250
15251Allows the use of SIMD types in functions declared in `extern` blocks.
15252
15253The tracking issue for this feature is: [#63068]
15254
15255[#63068]: https://github.com/rust-lang/rust/issues/63068
15256
15257------------------------
15258"##,
15259 default_severity: Severity::Allow,
15260 warn_since: None,
15261 deny_since: None,
15262 },
15263 Lint {
15264 label: "sized_hierarchy",
15265 description: r##"# `sized_hierarchy`
15266
15267Introduces a hierarchy of `Sized` traits (RFC 3729).
15268
15269The tracking issue for this feature is: [#144404]
15270
15271[#144404]: https://github.com/rust-lang/rust/issues/144404
15272
15273------------------------
15274"##,
15275 default_severity: Severity::Allow,
15276 warn_since: None,
15277 deny_since: None,
15278 },
15279 Lint {
15280 label: "sized_type_properties",
15281 description: r##"# `sized_type_properties`
15282
15283
15284
15285This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15286
15287------------------------
15288"##,
15289 default_severity: Severity::Allow,
15290 warn_since: None,
15291 deny_since: None,
15292 },
15293 Lint {
15294 label: "slice_concat_ext",
15295 description: r##"# `slice_concat_ext`
15296
15297
15298
15299This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15300
15301------------------------
15302"##,
15303 default_severity: Severity::Allow,
15304 warn_since: None,
15305 deny_since: None,
15306 },
15307 Lint {
15308 label: "slice_concat_trait",
15309 description: r##"# `slice_concat_trait`
15310
15311
15312
15313This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15314
15315------------------------
15316"##,
15317 default_severity: Severity::Allow,
15318 warn_since: None,
15319 deny_since: None,
15320 },
15321 Lint {
15322 label: "slice_from_ptr_range",
15323 description: r##"# `slice_from_ptr_range`
15324
15325
15326
15327The tracking issue for this feature is: [#89792]
15328
15329[#89792]: https://github.com/rust-lang/rust/issues/89792
15330
15331------------------------
15332"##,
15333 default_severity: Severity::Allow,
15334 warn_since: None,
15335 deny_since: None,
15336 },
15337 Lint {
15338 label: "slice_index_methods",
15339 description: r##"# `slice_index_methods`
15340
15341
15342
15343This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15344
15345------------------------
15346"##,
15347 default_severity: Severity::Allow,
15348 warn_since: None,
15349 deny_since: None,
15350 },
15351 Lint {
15352 label: "slice_internals",
15353 description: r##"# `slice_internals`
15354
15355
15356
15357This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15358
15359------------------------
15360"##,
15361 default_severity: Severity::Allow,
15362 warn_since: None,
15363 deny_since: None,
15364 },
15365 Lint {
15366 label: "slice_iter_mut_as_mut_slice",
15367 description: r##"# `slice_iter_mut_as_mut_slice`
15368
15369
15370
15371The tracking issue for this feature is: [#93079]
15372
15373[#93079]: https://github.com/rust-lang/rust/issues/93079
15374
15375------------------------
15376"##,
15377 default_severity: Severity::Allow,
15378 warn_since: None,
15379 deny_since: None,
15380 },
15381 Lint {
15382 label: "slice_partial_sort_unstable",
15383 description: r##"# `slice_partial_sort_unstable`
15384
15385
15386
15387The tracking issue for this feature is: [#149046]
15388
15389[#149046]: https://github.com/rust-lang/rust/issues/149046
15390
15391------------------------
15392"##,
15393 default_severity: Severity::Allow,
15394 warn_since: None,
15395 deny_since: None,
15396 },
15397 Lint {
15398 label: "slice_partition_dedup",
15399 description: r##"# `slice_partition_dedup`
15400
15401
15402
15403The tracking issue for this feature is: [#54279]
15404
15405[#54279]: https://github.com/rust-lang/rust/issues/54279
15406
15407------------------------
15408"##,
15409 default_severity: Severity::Allow,
15410 warn_since: None,
15411 deny_since: None,
15412 },
15413 Lint {
15414 label: "slice_pattern",
15415 description: r##"# `slice_pattern`
15416
15417
15418
15419This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15420
15421------------------------
15422"##,
15423 default_severity: Severity::Allow,
15424 warn_since: None,
15425 deny_since: None,
15426 },
15427 Lint {
15428 label: "slice_ptr_get",
15429 description: r##"# `slice_ptr_get`
15430
15431
15432
15433The tracking issue for this feature is: [#74265]
15434
15435[#74265]: https://github.com/rust-lang/rust/issues/74265
15436
15437------------------------
15438"##,
15439 default_severity: Severity::Allow,
15440 warn_since: None,
15441 deny_since: None,
15442 },
15443 Lint {
15444 label: "slice_range",
15445 description: r##"# `slice_range`
15446
15447
15448
15449The tracking issue for this feature is: [#76393]
15450
15451[#76393]: https://github.com/rust-lang/rust/issues/76393
15452
15453------------------------
15454"##,
15455 default_severity: Severity::Allow,
15456 warn_since: None,
15457 deny_since: None,
15458 },
15459 Lint {
15460 label: "slice_shift",
15461 description: r##"# `slice_shift`
15462
15463
15464
15465The tracking issue for this feature is: [#151772]
15466
15467[#151772]: https://github.com/rust-lang/rust/issues/151772
15468
15469------------------------
15470"##,
15471 default_severity: Severity::Allow,
15472 warn_since: None,
15473 deny_since: None,
15474 },
15475 Lint {
15476 label: "slice_swap_unchecked",
15477 description: r##"# `slice_swap_unchecked`
15478
15479
15480
15481The tracking issue for this feature is: [#88539]
15482
15483[#88539]: https://github.com/rust-lang/rust/issues/88539
15484
15485------------------------
15486"##,
15487 default_severity: Severity::Allow,
15488 warn_since: None,
15489 deny_since: None,
15490 },
15491 Lint {
15492 label: "sliceindex_wrappers",
15493 description: r##"# `sliceindex_wrappers`
15494
15495
15496
15497The tracking issue for this feature is: [#146179]
15498
15499[#146179]: https://github.com/rust-lang/rust/issues/146179
15500
15501------------------------
15502"##,
15503 default_severity: Severity::Allow,
15504 warn_since: None,
15505 deny_since: None,
15506 },
15507 Lint {
15508 label: "smart_pointer_try_map",
15509 description: r##"# `smart_pointer_try_map`
15510
15511
15512
15513The tracking issue for this feature is: [#144419]
15514
15515[#144419]: https://github.com/rust-lang/rust/issues/144419
15516
15517------------------------
15518"##,
15519 default_severity: Severity::Allow,
15520 warn_since: None,
15521 deny_since: None,
15522 },
15523 Lint {
15524 label: "solid_ext",
15525 description: r##"# `solid_ext`
15526
15527
15528
15529This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15530
15531------------------------
15532"##,
15533 default_severity: Severity::Allow,
15534 warn_since: None,
15535 deny_since: None,
15536 },
15537 Lint {
15538 label: "sort_floats",
15539 description: r##"# `sort_floats`
15540
15541
15542
15543The tracking issue for this feature is: [#93396]
15544
15545[#93396]: https://github.com/rust-lang/rust/issues/93396
15546
15547------------------------
15548"##,
15549 default_severity: Severity::Allow,
15550 warn_since: None,
15551 deny_since: None,
15552 },
15553 Lint {
15554 label: "sparc_target_feature",
15555 description: r##"# `sparc_target_feature`
15556
15557Target features on sparc.
15558
15559The tracking issue for this feature is: [#132783]
15560
15561[#132783]: https://github.com/rust-lang/rust/issues/132783
15562
15563------------------------
15564"##,
15565 default_severity: Severity::Allow,
15566 warn_since: None,
15567 deny_since: None,
15568 },
15569 Lint {
15570 label: "specialization",
15571 description: r##"# `specialization`
15572
15573Allows specialization of implementations (RFC 1210).
15574
15575The tracking issue for this feature is: [#31844]
15576
15577[#31844]: https://github.com/rust-lang/rust/issues/31844
15578
15579------------------------
15580"##,
15581 default_severity: Severity::Allow,
15582 warn_since: None,
15583 deny_since: None,
15584 },
15585 Lint {
15586 label: "splat",
15587 description: r##"# `splat`
15588
15589Experimental "splatting" of function call arguments at the call site. e.g. `foo(a, b, c)` calls `#[rustc_splat] fn foo((a: A, b: B, c: C))`.
15590
15591The tracking issue for this feature is: [#153629]
15592
15593[#153629]: https://github.com/rust-lang/rust/issues/153629
15594
15595------------------------
15596"##,
15597 default_severity: Severity::Allow,
15598 warn_since: None,
15599 deny_since: None,
15600 },
15601 Lint {
15602 label: "split_array",
15603 description: r##"# `split_array`
15604
15605
15606
15607The tracking issue for this feature is: [#90091]
15608
15609[#90091]: https://github.com/rust-lang/rust/issues/90091
15610
15611------------------------
15612"##,
15613 default_severity: Severity::Allow,
15614 warn_since: None,
15615 deny_since: None,
15616 },
15617 Lint {
15618 label: "split_as_slice",
15619 description: r##"# `split_as_slice`
15620
15621
15622
15623The tracking issue for this feature is: [#96137]
15624
15625[#96137]: https://github.com/rust-lang/rust/issues/96137
15626
15627------------------------
15628"##,
15629 default_severity: Severity::Allow,
15630 warn_since: None,
15631 deny_since: None,
15632 },
15633 Lint {
15634 label: "staged_api",
15635 description: r##"# `staged_api`
15636
15637Allows using the `#[stable]` and `#[unstable]` attributes.
15638
15639This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15640
15641------------------------
15642"##,
15643 default_severity: Severity::Allow,
15644 warn_since: None,
15645 deny_since: None,
15646 },
15647 Lint {
15648 label: "static_align",
15649 description: r##"# `static_align`
15650
15651Allows using `#[rustc_align_static(...)]` on static items.
15652
15653The tracking issue for this feature is: [#146177]
15654
15655[#146177]: https://github.com/rust-lang/rust/issues/146177
15656
15657------------------------
15658"##,
15659 default_severity: Severity::Allow,
15660 warn_since: None,
15661 deny_since: None,
15662 },
15663 Lint {
15664 label: "std_internals",
15665 description: r##"# `std_internals`
15666
15667
15668
15669This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15670
15671------------------------
15672"##,
15673 default_severity: Severity::Allow,
15674 warn_since: None,
15675 deny_since: None,
15676 },
15677 Lint {
15678 label: "stdarch_aarch64_feature_detection",
15679 description: r##"# `stdarch_aarch64_feature_detection`
15680
15681
15682
15683The tracking issue for this feature is: [#127764]
15684
15685[#127764]: https://github.com/rust-lang/rust/issues/127764
15686
15687------------------------
15688"##,
15689 default_severity: Severity::Allow,
15690 warn_since: None,
15691 deny_since: None,
15692 },
15693 Lint {
15694 label: "stdarch_arm_feature_detection",
15695 description: r##"# `stdarch_arm_feature_detection`
15696
15697
15698
15699The tracking issue for this feature is: [#111190]
15700
15701[#111190]: https://github.com/rust-lang/rust/issues/111190
15702
15703------------------------
15704"##,
15705 default_severity: Severity::Allow,
15706 warn_since: None,
15707 deny_since: None,
15708 },
15709 Lint {
15710 label: "stdarch_internal",
15711 description: r##"# `stdarch_internal`
15712
15713
15714
15715This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
15716
15717------------------------
15718"##,
15719 default_severity: Severity::Allow,
15720 warn_since: None,
15721 deny_since: None,
15722 },
15723 Lint {
15724 label: "stdarch_loongarch_feature_detection",
15725 description: r##"# `stdarch_loongarch_feature_detection`
15726
15727
15728
15729The tracking issue for this feature is: [#117425]
15730
15731[#117425]: https://github.com/rust-lang/rust/issues/117425
15732
15733------------------------
15734"##,
15735 default_severity: Severity::Allow,
15736 warn_since: None,
15737 deny_since: None,
15738 },
15739 Lint {
15740 label: "stdarch_mips_feature_detection",
15741 description: r##"# `stdarch_mips_feature_detection`
15742
15743
15744
15745The tracking issue for this feature is: [#111188]
15746
15747[#111188]: https://github.com/rust-lang/rust/issues/111188
15748
15749------------------------
15750"##,
15751 default_severity: Severity::Allow,
15752 warn_since: None,
15753 deny_since: None,
15754 },
15755 Lint {
15756 label: "stdarch_powerpc_feature_detection",
15757 description: r##"# `stdarch_powerpc_feature_detection`
15758
15759
15760
15761The tracking issue for this feature is: [#111191]
15762
15763[#111191]: https://github.com/rust-lang/rust/issues/111191
15764
15765------------------------
15766"##,
15767 default_severity: Severity::Allow,
15768 warn_since: None,
15769 deny_since: None,
15770 },
15771 Lint {
15772 label: "stdarch_riscv_feature_detection",
15773 description: r##"# `stdarch_riscv_feature_detection`
15774
15775
15776
15777The tracking issue for this feature is: [#111192]
15778
15779[#111192]: https://github.com/rust-lang/rust/issues/111192
15780
15781------------------------
15782"##,
15783 default_severity: Severity::Allow,
15784 warn_since: None,
15785 deny_since: None,
15786 },
15787 Lint {
15788 label: "stdio_fd_consts",
15789 description: r##"# `stdio_fd_consts`
15790
15791
15792
15793The tracking issue for this feature is: [#150836]
15794
15795[#150836]: https://github.com/rust-lang/rust/issues/150836
15796
15797------------------------
15798"##,
15799 default_severity: Severity::Allow,
15800 warn_since: None,
15801 deny_since: None,
15802 },
15803 Lint {
15804 label: "stdio_makes_pipe",
15805 description: r##"# `stdio_makes_pipe`
15806
15807
15808
15809The tracking issue for this feature is: [#98288]
15810
15811[#98288]: https://github.com/rust-lang/rust/issues/98288
15812
15813------------------------
15814"##,
15815 default_severity: Severity::Allow,
15816 warn_since: None,
15817 deny_since: None,
15818 },
15819 Lint {
15820 label: "stdio_swap",
15821 description: r##"# `stdio_swap`
15822
15823
15824
15825The tracking issue for this feature is: [#150667]
15826
15827[#150667]: https://github.com/rust-lang/rust/issues/150667
15828
15829------------------------
15830"##,
15831 default_severity: Severity::Allow,
15832 warn_since: None,
15833 deny_since: None,
15834 },
15835 Lint {
15836 label: "step_trait",
15837 description: r##"# `step_trait`
15838
15839
15840
15841The tracking issue for this feature is: [#42168]
15842
15843[#42168]: https://github.com/rust-lang/rust/issues/42168
15844
15845------------------------
15846"##,
15847 default_severity: Severity::Allow,
15848 warn_since: None,
15849 deny_since: None,
15850 },
15851 Lint {
15852 label: "stmt_expr_attributes",
15853 description: r##"# `stmt_expr_attributes`
15854
15855Allows attributes on expressions and non-item statements.
15856
15857The tracking issue for this feature is: [#15701]
15858
15859[#15701]: https://github.com/rust-lang/rust/issues/15701
15860
15861------------------------
15862"##,
15863 default_severity: Severity::Allow,
15864 warn_since: None,
15865 deny_since: None,
15866 },
15867 Lint {
15868 label: "str_as_str",
15869 description: r##"# `str_as_str`
15870
15871
15872
15873The tracking issue for this feature is: [#130366]
15874
15875[#130366]: https://github.com/rust-lang/rust/issues/130366
15876
15877------------------------
15878"##,
15879 default_severity: Severity::Allow,
15880 warn_since: None,
15881 deny_since: None,
15882 },
15883 Lint {
15884 label: "str_copy_from_str",
15885 description: r##"# `str_copy_from_str`
15886
15887
15888
15889The tracking issue for this feature is: [#159841]
15890
15891[#159841]: https://github.com/rust-lang/rust/issues/159841
15892
15893------------------------
15894"##,
15895 default_severity: Severity::Allow,
15896 warn_since: None,
15897 deny_since: None,
15898 },
15899 Lint {
15900 label: "str_from_raw_parts",
15901 description: r##"# `str_from_raw_parts`
15902
15903
15904
15905The tracking issue for this feature is: [#119206]
15906
15907[#119206]: https://github.com/rust-lang/rust/issues/119206
15908
15909------------------------
15910"##,
15911 default_severity: Severity::Allow,
15912 warn_since: None,
15913 deny_since: None,
15914 },
15915 Lint {
15916 label: "str_internals",
15917 description: r##"# `str_internals`
15918
15919This feature is internal to the Rust compiler and is not intended for general use.
15920
15921------------------------
15922"##,
15923 default_severity: Severity::Allow,
15924 warn_since: None,
15925 deny_since: None,
15926 },
15927 Lint {
15928 label: "str_lines_remainder",
15929 description: r##"# `str_lines_remainder`
15930
15931
15932
15933The tracking issue for this feature is: [#77998]
15934
15935[#77998]: https://github.com/rust-lang/rust/issues/77998
15936
15937------------------------
15938"##,
15939 default_severity: Severity::Allow,
15940 warn_since: None,
15941 deny_since: None,
15942 },
15943 Lint {
15944 label: "str_split_at_unchecked",
15945 description: r##"# `str_split_at_unchecked`
15946
15947
15948
15949The tracking issue for this feature is: [#165545]
15950
15951[#165545]: https://github.com/rust-lang/rust/issues/165545
15952
15953------------------------
15954"##,
15955 default_severity: Severity::Allow,
15956 warn_since: None,
15957 deny_since: None,
15958 },
15959 Lint {
15960 label: "str_split_inclusive_remainder",
15961 description: r##"# `str_split_inclusive_remainder`
15962
15963
15964
15965The tracking issue for this feature is: [#77998]
15966
15967[#77998]: https://github.com/rust-lang/rust/issues/77998
15968
15969------------------------
15970"##,
15971 default_severity: Severity::Allow,
15972 warn_since: None,
15973 deny_since: None,
15974 },
15975 Lint {
15976 label: "str_split_remainder",
15977 description: r##"# `str_split_remainder`
15978
15979
15980
15981The tracking issue for this feature is: [#77998]
15982
15983[#77998]: https://github.com/rust-lang/rust/issues/77998
15984
15985------------------------
15986"##,
15987 default_severity: Severity::Allow,
15988 warn_since: None,
15989 deny_since: None,
15990 },
15991 Lint {
15992 label: "str_split_whitespace_remainder",
15993 description: r##"# `str_split_whitespace_remainder`
15994
15995
15996
15997The tracking issue for this feature is: [#77998]
15998
15999[#77998]: https://github.com/rust-lang/rust/issues/77998
16000
16001------------------------
16002"##,
16003 default_severity: Severity::Allow,
16004 warn_since: None,
16005 deny_since: None,
16006 },
16007 Lint {
16008 label: "strict_provenance_lints",
16009 description: r##"# `strict_provenance_lints`
16010
16011The tracking issue for this feature is: [#130351]
16012
16013[#130351]: https://github.com/rust-lang/rust/issues/130351
16014-----
16015
16016The `strict_provenance_lints` feature allows to enable the `implicit_provenance_casts` lint.
16017
16018## Example
16019
16020```rust
16021#![feature(strict_provenance_lints)]
16022#![warn(implicit_provenance_casts)]
16023
16024fn main() {
16025 let dangling = 16_usize as *const u8;
16026 //~^ WARNING: cast from `usize` to `*const u8` implicitly relies on exposed provenance
16027 let _addr = dangling as usize;
16028 //~^ WARNING: cast from `*const u8` to `usize` implicitly exposes pointer provenance
16029}
16030```
16031"##,
16032 default_severity: Severity::Allow,
16033 warn_since: None,
16034 deny_since: None,
16035 },
16036 Lint {
16037 label: "string_remove_matches",
16038 description: r##"# `string_remove_matches`
16039
16040
16041
16042The tracking issue for this feature is: [#72826]
16043
16044[#72826]: https://github.com/rust-lang/rust/issues/72826
16045
16046------------------------
16047"##,
16048 default_severity: Severity::Allow,
16049 warn_since: None,
16050 deny_since: None,
16051 },
16052 Lint {
16053 label: "string_replace_in_place",
16054 description: r##"# `string_replace_in_place`
16055
16056
16057
16058The tracking issue for this feature is: [#147949]
16059
16060[#147949]: https://github.com/rust-lang/rust/issues/147949
16061
16062------------------------
16063"##,
16064 default_severity: Severity::Allow,
16065 warn_since: None,
16066 deny_since: None,
16067 },
16068 Lint {
16069 label: "structural_match",
16070 description: r##"# `structural_match`
16071
16072Allows using `#[structural_match]` which indicates that a type is structurally matchable. FIXME: Subsumed by trait `StructuralPartialEq`, cannot move to removed until a library feature with the same name exists.
16073
16074The tracking issue for this feature is: [#31434]
16075
16076[#31434]: https://github.com/rust-lang/rust/issues/31434
16077
16078------------------------
16079"##,
16080 default_severity: Severity::Allow,
16081 warn_since: None,
16082 deny_since: None,
16083 },
16084 Lint {
16085 label: "super_let",
16086 description: r##"# `super_let`
16087
16088Allows `super let` statements.
16089
16090The tracking issue for this feature is: [#139076]
16091
16092[#139076]: https://github.com/rust-lang/rust/issues/139076
16093
16094------------------------
16095"##,
16096 default_severity: Severity::Allow,
16097 warn_since: None,
16098 deny_since: None,
16099 },
16100 Lint {
16101 label: "supertrait_item_shadowing",
16102 description: r##"# `supertrait_item_shadowing`
16103
16104Allows subtrait items to shadow supertrait items.
16105
16106The tracking issue for this feature is: [#89151]
16107
16108[#89151]: https://github.com/rust-lang/rust/issues/89151
16109
16110------------------------
16111"##,
16112 default_severity: Severity::Allow,
16113 warn_since: None,
16114 deny_since: None,
16115 },
16116 Lint {
16117 label: "sync_nonpoison",
16118 description: r##"# `sync_nonpoison`
16119
16120
16121
16122The tracking issue for this feature is: [#134645]
16123
16124[#134645]: https://github.com/rust-lang/rust/issues/134645
16125
16126------------------------
16127"##,
16128 default_severity: Severity::Allow,
16129 warn_since: None,
16130 deny_since: None,
16131 },
16132 Lint {
16133 label: "sync_poison_mod",
16134 description: r##"# `sync_poison_mod`
16135
16136
16137
16138The tracking issue for this feature is: [#134646]
16139
16140[#134646]: https://github.com/rust-lang/rust/issues/134646
16141
16142------------------------
16143"##,
16144 default_severity: Severity::Allow,
16145 warn_since: None,
16146 deny_since: None,
16147 },
16148 Lint {
16149 label: "sync_unsafe_cell",
16150 description: r##"# `sync_unsafe_cell`
16151
16152
16153
16154The tracking issue for this feature is: [#95439]
16155
16156[#95439]: https://github.com/rust-lang/rust/issues/95439
16157
16158------------------------
16159"##,
16160 default_severity: Severity::Allow,
16161 warn_since: None,
16162 deny_since: None,
16163 },
16164 Lint {
16165 label: "tcp_deferaccept",
16166 description: r##"# `tcp_deferaccept`
16167
16168
16169
16170The tracking issue for this feature is: [#119639]
16171
16172[#119639]: https://github.com/rust-lang/rust/issues/119639
16173
16174------------------------
16175"##,
16176 default_severity: Severity::Allow,
16177 warn_since: None,
16178 deny_since: None,
16179 },
16180 Lint {
16181 label: "tcp_keepalive",
16182 description: r##"# `tcp_keepalive`
16183
16184
16185
16186The tracking issue for this feature is: [#155889]
16187
16188[#155889]: https://github.com/rust-lang/rust/issues/155889
16189
16190------------------------
16191"##,
16192 default_severity: Severity::Allow,
16193 warn_since: None,
16194 deny_since: None,
16195 },
16196 Lint {
16197 label: "tcp_linger",
16198 description: r##"# `tcp_linger`
16199
16200
16201
16202The tracking issue for this feature is: [#88494]
16203
16204[#88494]: https://github.com/rust-lang/rust/issues/88494
16205
16206------------------------
16207"##,
16208 default_severity: Severity::Allow,
16209 warn_since: None,
16210 deny_since: None,
16211 },
16212 Lint {
16213 label: "tcplistener_into_incoming",
16214 description: r##"# `tcplistener_into_incoming`
16215
16216
16217
16218The tracking issue for this feature is: [#88373]
16219
16220[#88373]: https://github.com/rust-lang/rust/issues/88373
16221
16222------------------------
16223"##,
16224 default_severity: Severity::Allow,
16225 warn_since: None,
16226 deny_since: None,
16227 },
16228 Lint {
16229 label: "temporary_niche_types",
16230 description: r##"# `temporary_niche_types`
16231
16232
16233
16234This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
16235
16236------------------------
16237"##,
16238 default_severity: Severity::Allow,
16239 warn_since: None,
16240 deny_since: None,
16241 },
16242 Lint {
16243 label: "test",
16244 description: r##"# `test`
16245
16246The tracking issue for this feature is: None.
16247
16248------------------------
16249
16250The internals of the `test` crate are unstable, behind the `test` flag. The
16251most widely used part of the `test` crate are benchmark tests, which can test
16252the performance of your code. Let's make our `src/lib.rs` look like this
16253(comments elided):
16254
16255```rust,no_run
16256#![feature(test)]
16257
16258extern crate test;
16259
16260pub fn add_two(a: i32) -> i32 {
16261 a + 2
16262}
16263
16264#[cfg(test)]
16265mod tests {
16266 use super::*;
16267 use test::Bencher;
16268
16269 #[test]
16270 fn it_works() {
16271 assert_eq!(4, add_two(2));
16272 }
16273
16274 #[bench]
16275 fn bench_add_two(b: &mut Bencher) {
16276 b.iter(|| add_two(2));
16277 }
16278}
16279```
16280
16281Note the `test` feature gate, which enables this unstable feature.
16282
16283We've imported the `test` crate, which contains our benchmarking support.
16284We have a new function as well, with the `bench` attribute. Unlike regular
16285tests, which take no arguments, benchmark tests take a `&mut Bencher`. This
16286`Bencher` provides an `iter` method, which takes a closure. This closure
16287contains the code we'd like to benchmark.
16288
16289We can run benchmark tests with `cargo bench`:
16290
16291```bash
16292$ cargo bench
16293 Compiling adder v0.0.1 (file:///home/steve/tmp/adder)
16294 Running target/release/adder-91b3e234d4ed382a
16295
16296running 2 tests
16297test tests::it_works ... ignored
16298test tests::bench_add_two ... bench: 1 ns/iter (+/- 0)
16299
16300test result: ok. 0 passed; 0 failed; 1 ignored; 1 measured
16301```
16302
16303Our non-benchmark test was ignored. You may have noticed that `cargo bench`
16304takes a bit longer than `cargo test`. This is because Rust runs our benchmark
16305a number of times, and then takes the average. Because we're doing so little
16306work in this example, we have a `1 ns/iter (+/- 0)`, but this would show
16307the variance if there was one.
16308
16309Advice on writing benchmarks:
16310
16311
16312* Move setup code outside the `iter` loop; only put the part you want to measure inside
16313* Make the code do "the same thing" on each iteration; do not accumulate or change state
16314* Make the outer function idempotent too; the benchmark runner is likely to run
16315 it many times
16316* Make the inner `iter` loop short and fast so benchmark runs are fast and the
16317 calibrator can adjust the run-length at fine resolution
16318* Make the code in the `iter` loop do something simple, to assist in pinpointing
16319 performance improvements (or regressions)
16320
16321## Gotcha: optimizations
16322
16323There's another tricky part to writing benchmarks: benchmarks compiled with
16324optimizations activated can be dramatically changed by the optimizer so that
16325the benchmark is no longer benchmarking what one expects. For example, the
16326compiler might recognize that some calculation has no external effects and
16327remove it entirely.
16328
16329```rust,no_run
16330#![feature(test)]
16331
16332extern crate test;
16333use test::Bencher;
16334
16335#[bench]
16336fn bench_xor_1000_ints(b: &mut Bencher) {
16337 b.iter(|| {
16338 (0..1000).fold(0, |old, new| old ^ new);
16339 });
16340}
16341```
16342
16343gives the following results
16344
16345```text
16346running 1 test
16347test bench_xor_1000_ints ... bench: 0 ns/iter (+/- 0)
16348
16349test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
16350```
16351
16352The benchmarking runner offers two ways to avoid this. Either, the closure that
16353the `iter` method receives can return an arbitrary value which forces the
16354optimizer to consider the result used and ensures it cannot remove the
16355computation entirely. This could be done for the example above by adjusting the
16356`b.iter` call to
16357
16358```rust
16359# struct X;
16360# impl X { fn iter<T, F>(&self, _: F) where F: FnMut() -> T {} } let b = X;
16361b.iter(|| {
16362 // Note lack of `;` (could also use an explicit `return`).
16363 (0..1000).fold(0, |old, new| old ^ new)
16364});
16365```
16366
16367Or, the other option is to call the generic `test::black_box` function, which
16368is an opaque "black box" to the optimizer and so forces it to consider any
16369argument as used.
16370
16371```rust
16372#![feature(test)]
16373
16374extern crate test;
16375
16376# fn main() {
16377# struct X;
16378# impl X { fn iter<T, F>(&self, _: F) where F: FnMut() -> T {} } let b = X;
16379b.iter(|| {
16380 let n = test::black_box(1000);
16381
16382 (0..n).fold(0, |a, b| a ^ b)
16383})
16384# }
16385```
16386
16387Neither of these read or modify the value, and are very cheap for small values.
16388Larger values can be passed indirectly to reduce overhead (e.g.
16389`black_box(&huge_struct)`).
16390
16391Performing either of the above changes gives the following benchmarking results
16392
16393```text
16394running 1 test
16395test bench_xor_1000_ints ... bench: 131 ns/iter (+/- 3)
16396
16397test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
16398```
16399
16400However, the optimizer can still modify a testcase in an undesirable manner
16401even when using either of the above.
16402"##,
16403 default_severity: Severity::Allow,
16404 warn_since: None,
16405 deny_since: None,
16406 },
16407 Lint {
16408 label: "test_binder_constraints",
16409 description: r##"# `test_binder_constraints`
16410
16411Perma-unstable, only used in the test suite for binders (`for<'a>`).
16412
16413This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
16414
16415------------------------
16416"##,
16417 default_severity: Severity::Allow,
16418 warn_since: None,
16419 deny_since: None,
16420 },
16421 Lint {
16422 label: "test_incomplete_feature",
16423 description: r##"# `test_incomplete_feature`
16424
16425Perma-unstable, only used to test the `incomplete_features` lint.
16426
16427This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
16428
16429------------------------
16430"##,
16431 default_severity: Severity::Allow,
16432 warn_since: None,
16433 deny_since: None,
16434 },
16435 Lint {
16436 label: "test_unstable_lint",
16437 description: r##"# `test_unstable_lint`
16438
16439Added for testing unstable lints; perma-unstable.
16440
16441This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
16442
16443------------------------
16444"##,
16445 default_severity: Severity::Allow,
16446 warn_since: None,
16447 deny_since: None,
16448 },
16449 Lint {
16450 label: "thin_box",
16451 description: r##"# `thin_box`
16452
16453
16454
16455The tracking issue for this feature is: [#92791]
16456
16457[#92791]: https://github.com/rust-lang/rust/issues/92791
16458
16459------------------------
16460"##,
16461 default_severity: Severity::Allow,
16462 warn_since: None,
16463 deny_since: None,
16464 },
16465 Lint {
16466 label: "thread_id_value",
16467 description: r##"# `thread_id_value`
16468
16469
16470
16471The tracking issue for this feature is: [#67939]
16472
16473[#67939]: https://github.com/rust-lang/rust/issues/67939
16474
16475------------------------
16476"##,
16477 default_severity: Severity::Allow,
16478 warn_since: None,
16479 deny_since: None,
16480 },
16481 Lint {
16482 label: "thread_local",
16483 description: r##"# `thread_local`
16484
16485Allows using `#[thread_local]` on `static` items.
16486
16487The tracking issue for this feature is: [#29594]
16488
16489[#29594]: https://github.com/rust-lang/rust/issues/29594
16490
16491------------------------
16492"##,
16493 default_severity: Severity::Allow,
16494 warn_since: None,
16495 deny_since: None,
16496 },
16497 Lint {
16498 label: "thread_local_internals",
16499 description: r##"# `thread_local_internals`
16500
16501This feature is internal to the Rust compiler and is not intended for general use.
16502
16503------------------------
16504"##,
16505 default_severity: Severity::Allow,
16506 warn_since: None,
16507 deny_since: None,
16508 },
16509 Lint {
16510 label: "thread_os_id",
16511 description: r##"# `thread_os_id`
16512
16513
16514
16515The tracking issue for this feature is: [#160215]
16516
16517[#160215]: https://github.com/rust-lang/rust/issues/160215
16518
16519------------------------
16520"##,
16521 default_severity: Severity::Allow,
16522 warn_since: None,
16523 deny_since: None,
16524 },
16525 Lint {
16526 label: "thread_raw",
16527 description: r##"# `thread_raw`
16528
16529
16530
16531The tracking issue for this feature is: [#97523]
16532
16533[#97523]: https://github.com/rust-lang/rust/issues/97523
16534
16535------------------------
16536"##,
16537 default_severity: Severity::Allow,
16538 warn_since: None,
16539 deny_since: None,
16540 },
16541 Lint {
16542 label: "thread_sleep_until",
16543 description: r##"# `thread_sleep_until`
16544
16545
16546
16547The tracking issue for this feature is: [#113752]
16548
16549[#113752]: https://github.com/rust-lang/rust/issues/113752
16550
16551------------------------
16552"##,
16553 default_severity: Severity::Allow,
16554 warn_since: None,
16555 deny_since: None,
16556 },
16557 Lint {
16558 label: "thread_spawn_hook",
16559 description: r##"# `thread_spawn_hook`
16560
16561
16562
16563The tracking issue for this feature is: [#132951]
16564
16565[#132951]: https://github.com/rust-lang/rust/issues/132951
16566
16567------------------------
16568"##,
16569 default_severity: Severity::Allow,
16570 warn_since: None,
16571 deny_since: None,
16572 },
16573 Lint {
16574 label: "time_saturating_systemtime",
16575 description: r##"# `time_saturating_systemtime`
16576
16577
16578
16579The tracking issue for this feature is: [#151199]
16580
16581[#151199]: https://github.com/rust-lang/rust/issues/151199
16582
16583------------------------
16584"##,
16585 default_severity: Severity::Allow,
16586 warn_since: None,
16587 deny_since: None,
16588 },
16589 Lint {
16590 label: "time_systemtime_limits",
16591 description: r##"# `time_systemtime_limits`
16592
16593
16594
16595The tracking issue for this feature is: [#149067]
16596
16597[#149067]: https://github.com/rust-lang/rust/issues/149067
16598
16599------------------------
16600"##,
16601 default_severity: Severity::Allow,
16602 warn_since: None,
16603 deny_since: None,
16604 },
16605 Lint {
16606 label: "titlecase",
16607 description: r##"# `titlecase`
16608
16609
16610
16611The tracking issue for this feature is: [#153892]
16612
16613[#153892]: https://github.com/rust-lang/rust/issues/153892
16614
16615------------------------
16616"##,
16617 default_severity: Severity::Allow,
16618 warn_since: None,
16619 deny_since: None,
16620 },
16621 Lint {
16622 label: "trace_macros",
16623 description: r##"# `trace_macros`
16624
16625The tracking issue for this feature is [#29598].
16626
16627[#29598]: https://github.com/rust-lang/rust/issues/29598
16628
16629------------------------
16630
16631With `trace_macros` you can trace the expansion of macros in your code.
16632
16633## Examples
16634
16635```rust
16636#![feature(trace_macros)]
16637
16638fn main() {
16639 trace_macros!(true);
16640 println!("Hello, Rust!");
16641 trace_macros!(false);
16642}
16643```
16644
16645The `cargo build` output:
16646
16647```txt
16648note: trace_macro
16649 --> src/main.rs:5:5
16650 |
166515 | println!("Hello, Rust!");
16652 | ^^^^^^^^^^^^^^^^^^^^^^^^^
16653 |
16654 = note: expanding `println! { "Hello, Rust!" }`
16655 = note: to `print ! ( concat ! ( "Hello, Rust!" , "\n" ) )`
16656 = note: expanding `print! { concat ! ( "Hello, Rust!" , "\n" ) }`
16657 = note: to `$crate :: io :: _print ( format_args ! ( concat ! ( "Hello, Rust!" , "\n" ) )
16658 )`
16659
16660 Finished dev [unoptimized + debuginfo] target(s) in 0.60 secs
16661```
16662"##,
16663 default_severity: Severity::Allow,
16664 warn_since: None,
16665 deny_since: None,
16666 },
16667 Lint {
16668 label: "trait_alias",
16669 description: r##"# `trait_alias`
16670
16671The tracking issue for this feature is: [#41517]
16672
16673[#41517]: https://github.com/rust-lang/rust/issues/41517
16674
16675------------------------
16676
16677The `trait_alias` feature adds support for trait aliases. These allow aliases
16678to be created for one or more traits (currently just a single regular trait plus
16679any number of auto-traits), and used wherever traits would normally be used as
16680either bounds or trait objects.
16681
16682```rust
16683#![feature(trait_alias)]
16684
16685trait Foo = std::fmt::Debug + Send;
16686trait Bar = Foo + Sync;
16687
16688// Use trait alias as bound on type parameter.
16689fn foo<T: Foo>(v: &T) {
16690 println!("{:?}", v);
16691}
16692
16693pub fn main() {
16694 foo(&1);
16695
16696 // Use trait alias for trait objects.
16697 let a: &dyn Bar = &123;
16698 println!("{:?}", a);
16699 let b = Box::new(456) as Box<dyn Foo>;
16700 println!("{:?}", b);
16701}
16702```
16703"##,
16704 default_severity: Severity::Allow,
16705 warn_since: None,
16706 deny_since: None,
16707 },
16708 Lint {
16709 label: "transmutability",
16710 description: r##"# `transmutability`
16711
16712
16713
16714The tracking issue for this feature is: [#99571]
16715
16716[#99571]: https://github.com/rust-lang/rust/issues/99571
16717
16718------------------------
16719"##,
16720 default_severity: Severity::Allow,
16721 warn_since: None,
16722 deny_since: None,
16723 },
16724 Lint {
16725 label: "transmute_generic_consts",
16726 description: r##"# `transmute_generic_consts`
16727
16728Allows for transmuting between arrays with sizes that contain generic consts.
16729
16730The tracking issue for this feature is: [#109929]
16731
16732[#109929]: https://github.com/rust-lang/rust/issues/109929
16733
16734------------------------
16735"##,
16736 default_severity: Severity::Allow,
16737 warn_since: None,
16738 deny_since: None,
16739 },
16740 Lint {
16741 label: "transmute_neo",
16742 description: r##"# `transmute_neo`
16743
16744
16745
16746The tracking issue for this feature is: [#155079]
16747
16748[#155079]: https://github.com/rust-lang/rust/issues/155079
16749
16750------------------------
16751"##,
16752 default_severity: Severity::Allow,
16753 warn_since: None,
16754 deny_since: None,
16755 },
16756 Lint {
16757 label: "transmute_prefix",
16758 description: r##"# `transmute_prefix`
16759
16760
16761
16762The tracking issue for this feature is: [#155079]
16763
16764[#155079]: https://github.com/rust-lang/rust/issues/155079
16765
16766------------------------
16767"##,
16768 default_severity: Severity::Allow,
16769 warn_since: None,
16770 deny_since: None,
16771 },
16772 Lint {
16773 label: "transparent_unions",
16774 description: r##"# `transparent_unions`
16775
16776The tracking issue for this feature is [#60405]
16777
16778[#60405]: https://github.com/rust-lang/rust/issues/60405
16779
16780----
16781
16782The `transparent_unions` feature allows you mark `union`s as
16783`#[repr(transparent)]`. A `union` may be `#[repr(transparent)]` in exactly the
16784same conditions in which a `struct` may be `#[repr(transparent)]` (generally,
16785this means the `union` must have exactly one non-zero-sized field). Some
16786concrete illustrations follow.
16787
16788```rust
16789#![feature(transparent_unions)]
16790
16791// This union has the same representation as `f32`.
16792#[repr(transparent)]
16793union SingleFieldUnion {
16794 field: f32,
16795}
16796
16797// This union has the same representation as `usize`.
16798#[repr(transparent)]
16799union MultiFieldUnion {
16800 field: usize,
16801 nothing: (),
16802}
16803```
16804
16805For consistency with transparent `struct`s, `union`s must have exactly one
16806non-zero-sized field. If all fields are zero-sized, the `union` must not be
16807`#[repr(transparent)]`:
16808
16809```rust
16810#![feature(transparent_unions)]
16811
16812// This (non-transparent) union is already valid in stable Rust:
16813pub union GoodUnion {
16814 pub nothing: (),
16815}
16816
16817// Error: transparent union needs exactly one non-zero-sized field, but has 0
16818// #[repr(transparent)]
16819// pub union BadUnion {
16820// pub nothing: (),
16821// }
16822```
16823
16824The one exception is if the `union` is generic over `T` and has a field of type
16825`T`, it may be `#[repr(transparent)]` even if `T` is a zero-sized type:
16826
16827```rust
16828#![feature(transparent_unions)]
16829
16830// This union has the same representation as `T`.
16831#[repr(transparent)]
16832pub union GenericUnion<T: Copy> { // Unions with non-`Copy` fields are unstable.
16833 pub field: T,
16834 pub nothing: (),
16835}
16836
16837// This is okay even though `()` is a zero-sized type.
16838pub const THIS_IS_OKAY: GenericUnion<()> = GenericUnion { field: () };
16839```
16840
16841Like transparent `struct`s, a transparent `union` of type `U` has the same
16842layout, size, and ABI as its single non-ZST field. If it is generic over a type
16843`T`, and all its fields are ZSTs except for exactly one field of type `T`, then
16844it has the same layout and ABI as `T` (even if `T` is a ZST when monomorphized).
16845
16846Like transparent `struct`s, transparent `union`s are FFI-safe if and only if
16847their underlying representation type is also FFI-safe.
16848
16849A `union` may not be eligible for the same nonnull-style optimizations that a
16850`struct` or `enum` (with the same fields) are eligible for. Adding
16851`#[repr(transparent)]` to `union` does not change this. To give a more concrete
16852example, it is unspecified whether `size_of::<T>()` is equal to
16853`size_of::<Option<T>>()`, where `T` is a `union` (regardless of whether or not
16854it is transparent). The Rust compiler is free to perform this optimization if
16855possible, but is not required to, and different compiler versions may differ in
16856their application of these optimizations.
16857"##,
16858 default_severity: Severity::Allow,
16859 warn_since: None,
16860 deny_since: None,
16861 },
16862 Lint {
16863 label: "trivial_bounds",
16864 description: r##"# `trivial_bounds`
16865
16866Allows inconsistent bounds in where clauses.
16867
16868The tracking issue for this feature is: [#48214]
16869
16870[#48214]: https://github.com/rust-lang/rust/issues/48214
16871
16872------------------------
16873"##,
16874 default_severity: Severity::Allow,
16875 warn_since: None,
16876 deny_since: None,
16877 },
16878 Lint {
16879 label: "trivial_clone",
16880 description: r##"# `trivial_clone`
16881
16882
16883
16884This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
16885
16886------------------------
16887"##,
16888 default_severity: Severity::Allow,
16889 warn_since: None,
16890 deny_since: None,
16891 },
16892 Lint {
16893 label: "trusted_fused",
16894 description: r##"# `trusted_fused`
16895
16896
16897
16898This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
16899
16900------------------------
16901"##,
16902 default_severity: Severity::Allow,
16903 warn_since: None,
16904 deny_since: None,
16905 },
16906 Lint {
16907 label: "trusted_len",
16908 description: r##"# `trusted_len`
16909
16910
16911
16912The tracking issue for this feature is: [#37572]
16913
16914[#37572]: https://github.com/rust-lang/rust/issues/37572
16915
16916------------------------
16917"##,
16918 default_severity: Severity::Allow,
16919 warn_since: None,
16920 deny_since: None,
16921 },
16922 Lint {
16923 label: "trusted_random_access",
16924 description: r##"# `trusted_random_access`
16925
16926
16927
16928This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
16929
16930------------------------
16931"##,
16932 default_severity: Severity::Allow,
16933 warn_since: None,
16934 deny_since: None,
16935 },
16936 Lint {
16937 label: "trusted_step",
16938 description: r##"# `trusted_step`
16939
16940
16941
16942The tracking issue for this feature is: [#85731]
16943
16944[#85731]: https://github.com/rust-lang/rust/issues/85731
16945
16946------------------------
16947"##,
16948 default_severity: Severity::Allow,
16949 warn_since: None,
16950 deny_since: None,
16951 },
16952 Lint {
16953 label: "try_as_dyn",
16954 description: r##"# `try_as_dyn`
16955
16956The tracking issue for this feature is: [#144361]
16957
16958[#144361]: https://github.com/rust-lang/rust/issues/144361
16959
16960------------------------
16961
16962The `try_as_dyn` feature allows going from a generic `T` with no bounds
16963to a `dyn Trait`, if `T: Trait` and various conditions are upheld. It is
16964very related to specialization, as it allows you to specialize within
16965function bodies, but in a more general manner than `Any::downcast`.
16966
16967```rust
16968#![feature(try_as_dyn)]
16969
16970fn downcast_debug_format<T: 'static>(t: &T) -> String {
16971 match std::any::try_as_dyn::<_, dyn std::fmt::Debug>(t) {
16972 Some(d) => format!("{d:?}"),
16973 None => "default".to_string()
16974 }
16975}
16976```
16977
16978
16979## Rules and reasons for them
16980
16981> [!IMPORTANT]
16982> The main problem of **`try_as_dyn` and specialization is the compiler's inability, while trait-checking, to distinguish/_discriminate_ between any two given lifetimes**[^1].
16983
16984[^1]: the compiler cannot _branch_ on whether "`'a : 'b` holds": for soundness, it can either choose not to know the answer, or _assume_ that it holds and produce an obligation for the borrow-checker which shall "assert this" (making compilation fail in a fatal manner if not). Most usages of Rust lie in the latter category (typical `where` clauses anywhere), whilst specialization/`try_as_dyn()` wants to support fallibility of the operation (_i.e._, being queried on a type not fulfilling the predicate without causing a compilation error). This rules out the latter, resulting in the need for the former, _i.e._, for the `try_as_dyn()` attempt to unconditionally "fail" with `None`.
16985
16986### `'static` is not mentioned anywhere in the `impl` block header.
16987
16988The most obvious one: if you have `impl IsStatic for &'static str`, then determining whether `&'? str : IsStatic` does hold amounts to discriminating `'? : 'static`.
16989
16990### Each outlives `where` bound (`Type: 'a` and `'a: 'b`) does not mention lifetime-infected parameters.
16991
16992Parameters are considered lifetime-infected if they are defined in an `impl` block's generic parameter list.
16993Const generics are exempt, as they can't affect lifetimes.
16994`for<'a>` lifetimes (and in the future types) are not lifetime-infected.
16995
16996We can create lifetime discrimination this way. For instance, given `impl<'a, 'b> Outlives<'a> for &'b str where 'b : 'a {}`, `Outlives<'static>` amounts to `IsStatic` from previous bullet.
16997
16998### Each lifetime-infected parameter is mentioned at most once in the `Self` type and the implemented trait's generic parameters, combined.
16999
17000Repetition of a parameter entails equality of those two use-sites; in lifetime-terms, this would be a double `'a : 'b` / `'b : 'a` clause, for instance.
17001Follow-up from the previous example: `impl<'a> Uses<'a> for &'a str {}`, and check whether `&'? str : Uses<'static>`.
17002
17003### Each individual trait where bound (`Type: Trait`) mentions each lifetime-infected parameter at most once.
17004
17005Mentioning a lifetime-infected parameter in multiple `where` bounds is allowed.
17006
17007Looking at the previous rules, which focuses on `Self : …`, this is just observing that shifting the requirements to other parameters within `where` clauses \[ought to\] boil down to the same set of issues.
17008
17009This is _unnecessarily restrictive_: we should be able to loosen it up somehow. Repetition only in `where` clauses seems fine.
17010
17011
17012### The `impl` block is a handwritten impl
17013
17014as opposed to a type implementing a trait automatically by the compiler (such as auto-traits, `dyn Bounds… : Bounds…`, and closures)
17015
17016
17017The reason for this is that some such auto-generated impls _come with hidden bounds or whatnot_, which run afoul of the previous rules, whilst also being _extremely challenging for the current compiler logic to know of such bounds_.
17018IIUC, this restriction could be lifted in the future should the compiler logic be better at spotting these hidden bounds, when present.
17019
17020One contrived such example being the case of `dyn 'u + for<'a> Outlives<'a>`, where the compiler-generated `impl` for it of `Outlives` is: `impl<'b, 'u> Outlives<'b> for dyn 'u + for<'a> Outlives<'a> where 'b : 'u {}` which violates the "`'a: 'b` not to mention lt-infected params" rule, whilst also being hard to detect in current compiler logic.
17021
17022### Associated type projections (`<Type as Trait>::Assoc`) are not mentioned anywhere in the `impl` block header.
17023
17024Associated-type equality bounds can very much amount to lifetime-infected parameter equality constraints,
17025which are problematic as per the "at most one mention of each lifetime-infected parameter in header" rule.
17026To illustrate, with the following definitions, `&'? str: Trait<'static>` discriminates `'?` against `'static`:
17027```rust
17028trait Trait<'x> {}
17029impl<'a, 'b> Trait<'b> for &'a str
17030where
17031 // &'a str = &'b str,
17032 Option<&'a str>: IntoIterator<Item = &'b str>,
17033{}
17034```
17035
17036```rust
17037trait Trait<'x> {}
17038impl<'a> Trait<'a> for &'a str {}
17039```
17040
17041### Each trait `where` bound with an associated type equality (`Type: Trait<Assoc = Type2>`) does not mention lifetime-infected parameters.
17042
17043Checking whether `Option<&'? str>: IntoIterator<Item = &'static str>` holds discriminates `'?` against `'static`.
17044"##,
17045 default_severity: Severity::Allow,
17046 warn_since: None,
17047 deny_since: None,
17048 },
17049 Lint {
17050 label: "try_blocks",
17051 description: r##"# `try_blocks`
17052
17053The tracking issue for this feature is: [#154391]
17054
17055[#154391]: https://github.com/rust-lang/rust/issues/154391
17056
17057------------------------
17058
17059The `try_blocks` feature adds support for `try` blocks. A `try`
17060block creates a new scope one can use the `?` operator in.
17061
17062```rust,edition2018
17063#![feature(try_blocks)]
17064
17065use std::num::ParseIntError;
17066
17067let result = try {
17068 "1".parse::<i32>()?
17069 + "2".parse::<i32>()?
17070 + "3".parse::<i32>()?
17071};
17072assert_eq!(result, Ok(6));
17073
17074let result = try {
17075 "1".parse::<i32>()?
17076 + "foo".parse::<i32>()?
17077 + "3".parse::<i32>()?
17078};
17079assert!(result.is_err());
17080```
17081"##,
17082 default_severity: Severity::Allow,
17083 warn_since: None,
17084 deny_since: None,
17085 },
17086 Lint {
17087 label: "try_blocks_heterogeneous",
17088 description: r##"# `try_blocks_heterogeneous`
17089
17090Allows using `try bikeshed TargetType {...}` expressions.
17091
17092The tracking issue for this feature is: [#149488]
17093
17094[#149488]: https://github.com/rust-lang/rust/issues/149488
17095
17096------------------------
17097"##,
17098 default_severity: Severity::Allow,
17099 warn_since: None,
17100 deny_since: None,
17101 },
17102 Lint {
17103 label: "try_entry",
17104 description: r##"# `try_entry`
17105
17106
17107
17108The tracking issue for this feature is: [#157354]
17109
17110[#157354]: https://github.com/rust-lang/rust/issues/157354
17111
17112------------------------
17113"##,
17114 default_severity: Severity::Allow,
17115 warn_since: None,
17116 deny_since: None,
17117 },
17118 Lint {
17119 label: "try_find",
17120 description: r##"# `try_find`
17121
17122
17123
17124The tracking issue for this feature is: [#63178]
17125
17126[#63178]: https://github.com/rust-lang/rust/issues/63178
17127
17128------------------------
17129"##,
17130 default_severity: Severity::Allow,
17131 warn_since: None,
17132 deny_since: None,
17133 },
17134 Lint {
17135 label: "try_from_int_error_kind",
17136 description: r##"# `try_from_int_error_kind`
17137
17138
17139
17140The tracking issue for this feature is: [#153978]
17141
17142[#153978]: https://github.com/rust-lang/rust/issues/153978
17143
17144------------------------
17145"##,
17146 default_severity: Severity::Allow,
17147 warn_since: None,
17148 deny_since: None,
17149 },
17150 Lint {
17151 label: "try_reserve_kind",
17152 description: r##"# `try_reserve_kind`
17153
17154
17155
17156The tracking issue for this feature is: [#48043]
17157
17158[#48043]: https://github.com/rust-lang/rust/issues/48043
17159
17160------------------------
17161"##,
17162 default_severity: Severity::Allow,
17163 warn_since: None,
17164 deny_since: None,
17165 },
17166 Lint {
17167 label: "try_send_error_into_inner",
17168 description: r##"# `try_send_error_into_inner`
17169
17170
17171
17172The tracking issue for this feature is: [#165102]
17173
17174[#165102]: https://github.com/rust-lang/rust/issues/165102
17175
17176------------------------
17177"##,
17178 default_severity: Severity::Allow,
17179 warn_since: None,
17180 deny_since: None,
17181 },
17182 Lint {
17183 label: "try_trait_v2",
17184 description: r##"# `try_trait_v2`
17185
17186
17187
17188The tracking issue for this feature is: [#84277]
17189
17190[#84277]: https://github.com/rust-lang/rust/issues/84277
17191
17192------------------------
17193"##,
17194 default_severity: Severity::Allow,
17195 warn_since: None,
17196 deny_since: None,
17197 },
17198 Lint {
17199 label: "try_trait_v2_residual",
17200 description: r##"# `try_trait_v2_residual`
17201
17202
17203
17204The tracking issue for this feature is: [#91285]
17205
17206[#91285]: https://github.com/rust-lang/rust/issues/91285
17207
17208------------------------
17209"##,
17210 default_severity: Severity::Allow,
17211 warn_since: None,
17212 deny_since: None,
17213 },
17214 Lint {
17215 label: "try_trait_v2_yeet",
17216 description: r##"# `try_trait_v2_yeet`
17217
17218
17219
17220The tracking issue for this feature is: [#96374]
17221
17222[#96374]: https://github.com/rust-lang/rust/issues/96374
17223
17224------------------------
17225"##,
17226 default_severity: Severity::Allow,
17227 warn_since: None,
17228 deny_since: None,
17229 },
17230 Lint {
17231 label: "try_with_capacity",
17232 description: r##"# `try_with_capacity`
17233
17234
17235
17236The tracking issue for this feature is: [#91913]
17237
17238[#91913]: https://github.com/rust-lang/rust/issues/91913
17239
17240------------------------
17241"##,
17242 default_severity: Severity::Allow,
17243 warn_since: None,
17244 deny_since: None,
17245 },
17246 Lint {
17247 label: "tuple_trait",
17248 description: r##"# `tuple_trait`
17249
17250The tracking issue for this feature is [#157987].
17251
17252[#157987]: https://github.com/rust-lang/rust/issues/157987
17253"##,
17254 default_severity: Severity::Allow,
17255 warn_since: None,
17256 deny_since: None,
17257 },
17258 Lint {
17259 label: "type_alias_impl_trait",
17260 description: r##"# `type_alias_impl_trait`
17261
17262The tracking issue for this feature is: [#63063]
17263
17264------------------------
17265
17266> This feature is not to be confused with [`trait_alias`] or [`impl_trait_in_assoc_type`].
17267
17268### What is `impl Trait`?
17269
17270`impl Trait` in return position is useful for declaring types that are constrained by traits, but whose concrete type should be hidden:
17271
17272```rust
17273use std::fmt::Debug;
17274
17275fn new() -> impl Debug {
17276 42
17277}
17278
17279fn main() {
17280 let thing = new();
17281 // What actually is a `thing`?
17282 // No idea but we know it implements `Debug`, so we can debug print it
17283 println!("{thing:?}");
17284}
17285```
17286
17287See the [reference] for more information about `impl Trait` in return position.
17288
17289### `type_alias_impl_trait`
17290
17291However, we might want to use an `impl Trait` in multiple locations but actually use the same concrete type everywhere while keeping it hidden.
17292This can be useful in libraries where you want to hide implementation details.
17293
17294The `#[define_opaque]` attribute must be used to explicitly list opaque items constrained by the item it's on.
17295
17296```rust
17297#![feature(type_alias_impl_trait)]
17298# #![allow(unused_variables, dead_code)]
17299trait Trait {}
17300
17301struct MyType;
17302
17303impl Trait for MyType {}
17304
17305type Alias = impl Trait;
17306
17307#[define_opaque(Alias)] // To constrain the type alias to `MyType`
17308fn new() -> Alias {
17309 MyType
17310}
17311
17312#[define_opaque(Alias)] // So we can name the concrete type inside this item
17313fn main() {
17314 let thing: MyType = new();
17315}
17316
17317// It can be a part of a struct too
17318struct HaveAlias {
17319 stuff: String,
17320 thing: Alias,
17321}
17322```
17323
17324In this example, the concrete type referred to by `Alias` is guaranteed to be the same wherever `Alias` occurs.
17325
17326> Originally this feature included type aliases as an associated type of a trait. In [#110237] this was split off to [`impl_trait_in_assoc_type`].
17327
17328### `type_alias_impl_trait` in argument position.
17329
17330Note that using `Alias` as an argument type is *not* the same as argument-position `impl Trait`, as `Alias` refers to a unique type, whereas the concrete type for argument-position `impl Trait` is chosen by the caller.
17331
17332```rust
17333# #![feature(type_alias_impl_trait)]
17334# #![allow(unused_variables)]
17335# pub mod x {
17336# pub trait Trait {}
17337#
17338# struct MyType;
17339#
17340# impl Trait for MyType {}
17341#
17342# pub type Alias = impl Trait;
17343#
17344# #[define_opaque(Alias)]
17345# pub fn new() -> Alias {
17346# MyType
17347# }
17348# }
17349# use x::*;
17350// this...
17351pub fn take_alias(x: Alias) {
17352 // ...
17353}
17354
17355// ...is *not* the same as
17356pub fn take_impl(x: impl Trait) {
17357 // ...
17358}
17359# fn main(){}
17360```
17361
17362```rust,compile_fail,E0308
17363# #![feature(type_alias_impl_trait)]
17364# #![allow(unused_variables)]
17365# pub mod x {
17366# pub trait Trait {}
17367#
17368# struct MyType;
17369#
17370# impl Trait for MyType {}
17371#
17372# pub type Alias = impl Trait;
17373#
17374# #[define_opaque(Alias)]
17375# pub fn new() -> Alias {
17376# MyType
17377# }
17378# }
17379# use x::*;
17380# pub fn take_alias(x: Alias) {
17381# // ...
17382# }
17383#
17384# pub fn take_impl(x: impl Trait) {
17385# // ...
17386# }
17387#
17388// a user's crate using the trait and type alias
17389struct UserType;
17390impl Trait for UserType {}
17391
17392# fn main(){
17393let x = UserType;
17394take_alias(x);
17395// ERROR expected opaque type, found `UserType`
17396// this function *actually* takes a `MyType` as is constrained in `new`
17397
17398let x = UserType;
17399take_impl(x);
17400// OK
17401
17402let x = new();
17403take_alias(x);
17404// OK
17405
17406let x = new();
17407take_impl(x);
17408// OK
17409# }
17410```
17411
17412Note that the user cannot use `#[define_opaque(Alias)]` to reify the opaque type because only the crate where the type alias is declared may do so. But if this happened in the same crate and the opaque type was reified, they'd get a familiar error: "expected `MyType`, got `UserType`".
17413
17414[#63063]: https://github.com/rust-lang/rust/issues/63063
17415[#110237]: https://github.com/rust-lang/rust/pull/110237
17416[reference]: https://doc.rust-lang.org/stable/reference/types/impl-trait.html#abstract-return-types
17417[`trait_alias`]: ./trait-alias.md
17418[`impl_trait_in_assoc_type`]: ./impl-trait-in-assoc-type.md
17419"##,
17420 default_severity: Severity::Allow,
17421 warn_since: None,
17422 deny_since: None,
17423 },
17424 Lint {
17425 label: "type_ascription",
17426 description: r##"# `type_ascription`
17427
17428
17429
17430The tracking issue for this feature is: [#101728]
17431
17432[#101728]: https://github.com/rust-lang/rust/issues/101728
17433
17434------------------------
17435"##,
17436 default_severity: Severity::Allow,
17437 warn_since: None,
17438 deny_since: None,
17439 },
17440 Lint {
17441 label: "type_changing_struct_update",
17442 description: r##"# `type_changing_struct_update`
17443
17444The tracking issue for this feature is: [#86555]
17445
17446[#86555]: https://github.com/rust-lang/rust/issues/86555
17447
17448------------------------
17449
17450This implements [RFC2528]. When turned on, you can create instances of the same struct
17451that have different generic type or lifetime parameters.
17452
17453[RFC2528]: https://rust-lang.github.io/rfcs/2528-type-changing-struct-update-syntax.html
17454
17455```rust
17456#![allow(unused_variables, dead_code)]
17457#![feature(type_changing_struct_update)]
17458
17459fn main () {
17460 struct Foo<T, U> {
17461 field1: T,
17462 field2: U,
17463 }
17464
17465 let base: Foo<String, i32> = Foo {
17466 field1: String::from("hello"),
17467 field2: 1234,
17468 };
17469 let updated: Foo<f64, i32> = Foo {
17470 field1: 3.14,
17471 ..base
17472 };
17473}
17474```
17475"##,
17476 default_severity: Severity::Allow,
17477 warn_since: None,
17478 deny_since: None,
17479 },
17480 Lint {
17481 label: "type_info",
17482 description: r##"# `type_info`
17483
17484
17485
17486The tracking issue for this feature is: [#146922]
17487
17488[#146922]: https://github.com/rust-lang/rust/issues/146922
17489
17490------------------------
17491"##,
17492 default_severity: Severity::Allow,
17493 warn_since: None,
17494 deny_since: None,
17495 },
17496 Lint {
17497 label: "u8_split_ascii_whitespace",
17498 description: r##"# `u8_split_ascii_whitespace`
17499
17500
17501
17502The tracking issue for this feature is: [#147878]
17503
17504[#147878]: https://github.com/rust-lang/rust/issues/147878
17505
17506------------------------
17507"##,
17508 default_severity: Severity::Allow,
17509 warn_since: None,
17510 deny_since: None,
17511 },
17512 Lint {
17513 label: "ub_checks",
17514 description: r##"# `ub_checks`
17515
17516
17517
17518This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
17519
17520------------------------
17521"##,
17522 default_severity: Severity::Allow,
17523 warn_since: None,
17524 deny_since: None,
17525 },
17526 Lint {
17527 label: "uefi_std",
17528 description: r##"# `uefi_std`
17529
17530
17531
17532The tracking issue for this feature is: [#100499]
17533
17534[#100499]: https://github.com/rust-lang/rust/issues/100499
17535
17536------------------------
17537"##,
17538 default_severity: Severity::Allow,
17539 warn_since: None,
17540 deny_since: None,
17541 },
17542 Lint {
17543 label: "uint_carryless_mul",
17544 description: r##"# `uint_carryless_mul`
17545
17546
17547
17548The tracking issue for this feature is: [#152080]
17549
17550[#152080]: https://github.com/rust-lang/rust/issues/152080
17551
17552------------------------
17553"##,
17554 default_severity: Severity::Allow,
17555 warn_since: None,
17556 deny_since: None,
17557 },
17558 Lint {
17559 label: "uint_gather_scatter_bits",
17560 description: r##"# `uint_gather_scatter_bits`
17561
17562
17563
17564The tracking issue for this feature is: [#149069]
17565
17566[#149069]: https://github.com/rust-lang/rust/issues/149069
17567
17568------------------------
17569"##,
17570 default_severity: Severity::Allow,
17571 warn_since: None,
17572 deny_since: None,
17573 },
17574 Lint {
17575 label: "unboxed_closures",
17576 description: r##"# `unboxed_closures`
17577
17578The tracking issue for this feature is [#29625]
17579
17580See Also: [`fn_traits`](../library-features/fn-traits.md)
17581
17582[#29625]: https://github.com/rust-lang/rust/issues/29625
17583
17584----
17585
17586The `unboxed_closures` feature allows you to write functions using the `"rust-call"` ABI,
17587required for implementing the [`Fn*`] family of traits. `"rust-call"` functions must have
17588exactly one (non self) argument, a tuple representing the argument list.
17589
17590[`Fn*`]: ../../std/ops/trait.Fn.html
17591
17592```rust
17593#![feature(unboxed_closures)]
17594
17595extern "rust-call" fn add_args(args: (u32, u32)) -> u32 {
17596 args.0 + args.1
17597}
17598
17599fn main() {}
17600```
17601"##,
17602 default_severity: Severity::Allow,
17603 warn_since: None,
17604 deny_since: None,
17605 },
17606 Lint {
17607 label: "unicode_internals",
17608 description: r##"# `unicode_internals`
17609
17610
17611
17612This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
17613
17614------------------------
17615"##,
17616 default_severity: Severity::Allow,
17617 warn_since: None,
17618 deny_since: None,
17619 },
17620 Lint {
17621 label: "unique_rc_arc",
17622 description: r##"# `unique_rc_arc`
17623
17624
17625
17626The tracking issue for this feature is: [#112566]
17627
17628[#112566]: https://github.com/rust-lang/rust/issues/112566
17629
17630------------------------
17631"##,
17632 default_severity: Severity::Allow,
17633 warn_since: None,
17634 deny_since: None,
17635 },
17636 Lint {
17637 label: "unix_file_vectored_at",
17638 description: r##"# `unix_file_vectored_at`
17639
17640
17641
17642The tracking issue for this feature is: [#89517]
17643
17644[#89517]: https://github.com/rust-lang/rust/issues/89517
17645
17646------------------------
17647"##,
17648 default_severity: Severity::Allow,
17649 warn_since: None,
17650 deny_since: None,
17651 },
17652 Lint {
17653 label: "unix_kill_process_group",
17654 description: r##"# `unix_kill_process_group`
17655
17656
17657
17658The tracking issue for this feature is: [#156537]
17659
17660[#156537]: https://github.com/rust-lang/rust/issues/156537
17661
17662------------------------
17663"##,
17664 default_severity: Severity::Allow,
17665 warn_since: None,
17666 deny_since: None,
17667 },
17668 Lint {
17669 label: "unix_mkfifo",
17670 description: r##"# `unix_mkfifo`
17671
17672
17673
17674The tracking issue for this feature is: [#139324]
17675
17676[#139324]: https://github.com/rust-lang/rust/issues/139324
17677
17678------------------------
17679"##,
17680 default_severity: Severity::Allow,
17681 warn_since: None,
17682 deny_since: None,
17683 },
17684 Lint {
17685 label: "unix_send_signal",
17686 description: r##"# `unix_send_signal`
17687
17688
17689
17690The tracking issue for this feature is: [#141975]
17691
17692[#141975]: https://github.com/rust-lang/rust/issues/141975
17693
17694------------------------
17695"##,
17696 default_severity: Severity::Allow,
17697 warn_since: None,
17698 deny_since: None,
17699 },
17700 Lint {
17701 label: "unix_set_mark",
17702 description: r##"# `unix_set_mark`
17703
17704
17705
17706The tracking issue for this feature is: [#96467]
17707
17708[#96467]: https://github.com/rust-lang/rust/issues/96467
17709
17710------------------------
17711"##,
17712 default_severity: Severity::Allow,
17713 warn_since: None,
17714 deny_since: None,
17715 },
17716 Lint {
17717 label: "unix_socket_ancillary_data",
17718 description: r##"# `unix_socket_ancillary_data`
17719
17720
17721
17722The tracking issue for this feature is: [#76915]
17723
17724[#76915]: https://github.com/rust-lang/rust/issues/76915
17725
17726------------------------
17727"##,
17728 default_severity: Severity::Allow,
17729 warn_since: None,
17730 deny_since: None,
17731 },
17732 Lint {
17733 label: "unix_socket_exclbind",
17734 description: r##"# `unix_socket_exclbind`
17735
17736
17737
17738The tracking issue for this feature is: [#123481]
17739
17740[#123481]: https://github.com/rust-lang/rust/issues/123481
17741
17742------------------------
17743"##,
17744 default_severity: Severity::Allow,
17745 warn_since: None,
17746 deny_since: None,
17747 },
17748 Lint {
17749 label: "unix_socket_peek",
17750 description: r##"# `unix_socket_peek`
17751
17752
17753
17754The tracking issue for this feature is: [#76923]
17755
17756[#76923]: https://github.com/rust-lang/rust/issues/76923
17757
17758------------------------
17759"##,
17760 default_severity: Severity::Allow,
17761 warn_since: None,
17762 deny_since: None,
17763 },
17764 Lint {
17765 label: "unnamed_enum_variants",
17766 description: r##"# `unnamed_enum_variants`
17767
17768Allows using `_ = <range-or-int>` enum variants.
17769
17770The tracking issue for this feature is: [#156628]
17771
17772[#156628]: https://github.com/rust-lang/rust/issues/156628
17773
17774------------------------
17775"##,
17776 default_severity: Severity::Allow,
17777 warn_since: None,
17778 deny_since: None,
17779 },
17780 Lint {
17781 label: "unqualified_local_imports",
17782 description: r##"# `unqualified_local_imports`
17783
17784Helps with formatting for `group_imports = "StdExternalCrate"`.
17785
17786The tracking issue for this feature is: [#138299]
17787
17788[#138299]: https://github.com/rust-lang/rust/issues/138299
17789
17790------------------------
17791"##,
17792 default_severity: Severity::Allow,
17793 warn_since: None,
17794 deny_since: None,
17795 },
17796 Lint {
17797 label: "unsafe_binders",
17798 description: r##"# `unsafe_binders`
17799
17800Allows using `unsafe<'a> &'a T` unsafe binder types.
17801
17802The tracking issue for this feature is: [#130516]
17803
17804[#130516]: https://github.com/rust-lang/rust/issues/130516
17805
17806------------------------
17807"##,
17808 default_severity: Severity::Allow,
17809 warn_since: None,
17810 deny_since: None,
17811 },
17812 Lint {
17813 label: "unsafe_fields",
17814 description: r##"# `unsafe_fields`
17815
17816Allows declaring fields `unsafe`.
17817
17818The tracking issue for this feature is: [#132922]
17819
17820[#132922]: https://github.com/rust-lang/rust/issues/132922
17821
17822------------------------
17823"##,
17824 default_severity: Severity::Allow,
17825 warn_since: None,
17826 deny_since: None,
17827 },
17828 Lint {
17829 label: "unsafe_pinned",
17830 description: r##"# `unsafe_pinned`
17831
17832
17833
17834The tracking issue for this feature is: [#125735]
17835
17836[#125735]: https://github.com/rust-lang/rust/issues/125735
17837
17838------------------------
17839"##,
17840 default_severity: Severity::Allow,
17841 warn_since: None,
17842 deny_since: None,
17843 },
17844 Lint {
17845 label: "unsafe_unpin",
17846 description: r##"# `unsafe_unpin`
17847
17848
17849
17850The tracking issue for this feature is: [#125735]
17851
17852[#125735]: https://github.com/rust-lang/rust/issues/125735
17853
17854------------------------
17855"##,
17856 default_severity: Severity::Allow,
17857 warn_since: None,
17858 deny_since: None,
17859 },
17860 Lint {
17861 label: "unsize",
17862 description: r##"# `unsize`
17863
17864
17865
17866The tracking issue for this feature is: [#18598]
17867
17868[#18598]: https://github.com/rust-lang/rust/issues/18598
17869
17870------------------------
17871"##,
17872 default_severity: Severity::Allow,
17873 warn_since: None,
17874 deny_since: None,
17875 },
17876 Lint {
17877 label: "unsized_const_params",
17878 description: r##"# `unsized_const_params`
17879
17880Allows const generic parameters to be defined with types that are not `Sized`, e.g. `fn foo<const N: [u8]>() {`.
17881
17882The tracking issue for this feature is: [#128028]
17883
17884[#128028]: https://github.com/rust-lang/rust/issues/128028
17885
17886------------------------
17887"##,
17888 default_severity: Severity::Allow,
17889 warn_since: None,
17890 deny_since: None,
17891 },
17892 Lint {
17893 label: "unsized_fn_params",
17894 description: r##"# `unsized_fn_params`
17895
17896Allows unsized fn parameters.
17897
17898The tracking issue for this feature is: [#48055]
17899
17900[#48055]: https://github.com/rust-lang/rust/issues/48055
17901
17902------------------------
17903"##,
17904 default_severity: Severity::Allow,
17905 warn_since: None,
17906 deny_since: None,
17907 },
17908 Lint {
17909 label: "update_panic_count",
17910 description: r##"# `update_panic_count`
17911
17912This feature is internal to the Rust compiler and is not intended for general use.
17913
17914------------------------
17915"##,
17916 default_severity: Severity::Allow,
17917 warn_since: None,
17918 deny_since: None,
17919 },
17920 Lint {
17921 label: "used_with_arg",
17922 description: r##"# `used_with_arg`
17923
17924Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute.
17925
17926The tracking issue for this feature is: [#93798]
17927
17928[#93798]: https://github.com/rust-lang/rust/issues/93798
17929
17930------------------------
17931"##,
17932 default_severity: Severity::Allow,
17933 warn_since: None,
17934 deny_since: None,
17935 },
17936 Lint {
17937 label: "utf16_extra",
17938 description: r##"# `utf16_extra`
17939
17940
17941
17942The tracking issue for this feature is: [#94919]
17943
17944[#94919]: https://github.com/rust-lang/rust/issues/94919
17945
17946------------------------
17947"##,
17948 default_severity: Severity::Allow,
17949 warn_since: None,
17950 deny_since: None,
17951 },
17952 Lint {
17953 label: "variant_count",
17954 description: r##"# `variant_count`
17955
17956
17957
17958The tracking issue for this feature is: [#73662]
17959
17960[#73662]: https://github.com/rust-lang/rust/issues/73662
17961
17962------------------------
17963"##,
17964 default_severity: Severity::Allow,
17965 warn_since: None,
17966 deny_since: None,
17967 },
17968 Lint {
17969 label: "vec_as_non_null",
17970 description: r##"# `vec_as_non_null`
17971
17972
17973
17974The tracking issue for this feature is: [#157843]
17975
17976[#157843]: https://github.com/rust-lang/rust/issues/157843
17977
17978------------------------
17979"##,
17980 default_severity: Severity::Allow,
17981 warn_since: None,
17982 deny_since: None,
17983 },
17984 Lint {
17985 label: "vec_deque_extract_if",
17986 description: r##"# `vec_deque_extract_if`
17987
17988
17989
17990The tracking issue for this feature is: [#147750]
17991
17992[#147750]: https://github.com/rust-lang/rust/issues/147750
17993
17994------------------------
17995"##,
17996 default_severity: Severity::Allow,
17997 warn_since: None,
17998 deny_since: None,
17999 },
18000 Lint {
18001 label: "vec_deque_iter_as_slices",
18002 description: r##"# `vec_deque_iter_as_slices`
18003
18004
18005
18006The tracking issue for this feature is: [#133253]
18007
18008[#133253]: https://github.com/rust-lang/rust/issues/133253
18009
18010------------------------
18011"##,
18012 default_severity: Severity::Allow,
18013 warn_since: None,
18014 deny_since: None,
18015 },
18016 Lint {
18017 label: "vec_deque_retain_range",
18018 description: r##"# `vec_deque_retain_range`
18019
18020
18021
18022The tracking issue for this feature is: [#156215]
18023
18024[#156215]: https://github.com/rust-lang/rust/issues/156215
18025
18026------------------------
18027"##,
18028 default_severity: Severity::Allow,
18029 warn_since: None,
18030 deny_since: None,
18031 },
18032 Lint {
18033 label: "vec_fallible_shrink",
18034 description: r##"# `vec_fallible_shrink`
18035
18036
18037
18038The tracking issue for this feature is: [#152350]
18039
18040[#152350]: https://github.com/rust-lang/rust/issues/152350
18041
18042------------------------
18043"##,
18044 default_severity: Severity::Allow,
18045 warn_since: None,
18046 deny_since: None,
18047 },
18048 Lint {
18049 label: "vec_into_chunks",
18050 description: r##"# `vec_into_chunks`
18051
18052
18053
18054The tracking issue for this feature is: [#142137]
18055
18056[#142137]: https://github.com/rust-lang/rust/issues/142137
18057
18058------------------------
18059"##,
18060 default_severity: Severity::Allow,
18061 warn_since: None,
18062 deny_since: None,
18063 },
18064 Lint {
18065 label: "vec_peek_mut",
18066 description: r##"# `vec_peek_mut`
18067
18068
18069
18070The tracking issue for this feature is: [#122742]
18071
18072[#122742]: https://github.com/rust-lang/rust/issues/122742
18073
18074------------------------
18075"##,
18076 default_severity: Severity::Allow,
18077 warn_since: None,
18078 deny_since: None,
18079 },
18080 Lint {
18081 label: "vec_push_within_capacity",
18082 description: r##"# `vec_push_within_capacity`
18083
18084
18085
18086The tracking issue for this feature is: [#100486]
18087
18088[#100486]: https://github.com/rust-lang/rust/issues/100486
18089
18090------------------------
18091"##,
18092 default_severity: Severity::Allow,
18093 warn_since: None,
18094 deny_since: None,
18095 },
18096 Lint {
18097 label: "vec_recycle",
18098 description: r##"# `vec_recycle`
18099
18100
18101
18102The tracking issue for this feature is: [#148227]
18103
18104[#148227]: https://github.com/rust-lang/rust/issues/148227
18105
18106------------------------
18107"##,
18108 default_severity: Severity::Allow,
18109 warn_since: None,
18110 deny_since: None,
18111 },
18112 Lint {
18113 label: "vec_split_at_spare",
18114 description: r##"# `vec_split_at_spare`
18115
18116
18117
18118The tracking issue for this feature is: [#81944]
18119
18120[#81944]: https://github.com/rust-lang/rust/issues/81944
18121
18122------------------------
18123"##,
18124 default_severity: Severity::Allow,
18125 warn_since: None,
18126 deny_since: None,
18127 },
18128 Lint {
18129 label: "view_type_macro",
18130 description: r##"# `view_type_macro`
18131
18132
18133
18134The tracking issue for this feature is: [#155938]
18135
18136[#155938]: https://github.com/rust-lang/rust/issues/155938
18137
18138------------------------
18139"##,
18140 default_severity: Severity::Allow,
18141 warn_since: None,
18142 deny_since: None,
18143 },
18144 Lint {
18145 label: "view_types",
18146 description: r##"# `view_types`
18147
18148Allows view types.
18149
18150The tracking issue for this feature is: [#155938]
18151
18152[#155938]: https://github.com/rust-lang/rust/issues/155938
18153
18154------------------------
18155"##,
18156 default_severity: Severity::Allow,
18157 warn_since: None,
18158 deny_since: None,
18159 },
18160 Lint {
18161 label: "waker_fn",
18162 description: r##"# `waker_fn`
18163
18164
18165
18166The tracking issue for this feature is: [#149580]
18167
18168[#149580]: https://github.com/rust-lang/rust/issues/149580
18169
18170------------------------
18171"##,
18172 default_severity: Severity::Allow,
18173 warn_since: None,
18174 deny_since: None,
18175 },
18176 Lint {
18177 label: "waker_from_fn_ptr",
18178 description: r##"# `waker_from_fn_ptr`
18179
18180
18181
18182The tracking issue for this feature is: [#148457]
18183
18184[#148457]: https://github.com/rust-lang/rust/issues/148457
18185
18186------------------------
18187"##,
18188 default_severity: Severity::Allow,
18189 warn_since: None,
18190 deny_since: None,
18191 },
18192 Lint {
18193 label: "wasi_ext",
18194 description: r##"# `wasi_ext`
18195
18196
18197
18198The tracking issue for this feature is: [#71213]
18199
18200[#71213]: https://github.com/rust-lang/rust/issues/71213
18201
18202------------------------
18203"##,
18204 default_severity: Severity::Allow,
18205 warn_since: None,
18206 deny_since: None,
18207 },
18208 Lint {
18209 label: "wasip2",
18210 description: r##"# `wasip2`
18211
18212
18213
18214This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
18215
18216------------------------
18217"##,
18218 default_severity: Severity::Allow,
18219 warn_since: None,
18220 deny_since: None,
18221 },
18222 Lint {
18223 label: "wasm_target_feature",
18224 description: r##"# `wasm_target_feature`
18225
18226Target features on wasm.
18227
18228The tracking issue for this feature is: [#150260]
18229
18230[#150260]: https://github.com/rust-lang/rust/issues/150260
18231
18232------------------------
18233"##,
18234 default_severity: Severity::Allow,
18235 warn_since: None,
18236 deny_since: None,
18237 },
18238 Lint {
18239 label: "where_clause_attrs",
18240 description: r##"# `where_clause_attrs`
18241
18242Allows use of attributes in `where` clauses.
18243
18244The tracking issue for this feature is: [#115590]
18245
18246[#115590]: https://github.com/rust-lang/rust/issues/115590
18247
18248------------------------
18249"##,
18250 default_severity: Severity::Allow,
18251 warn_since: None,
18252 deny_since: None,
18253 },
18254 Lint {
18255 label: "widening_mul",
18256 description: r##"# `widening_mul`
18257
18258
18259
18260The tracking issue for this feature is: [#152016]
18261
18262[#152016]: https://github.com/rust-lang/rust/issues/152016
18263
18264------------------------
18265"##,
18266 default_severity: Severity::Allow,
18267 warn_since: None,
18268 deny_since: None,
18269 },
18270 Lint {
18271 label: "windows_by_handle",
18272 description: r##"# `windows_by_handle`
18273
18274
18275
18276The tracking issue for this feature is: [#63010]
18277
18278[#63010]: https://github.com/rust-lang/rust/issues/63010
18279
18280------------------------
18281"##,
18282 default_severity: Severity::Allow,
18283 warn_since: None,
18284 deny_since: None,
18285 },
18286 Lint {
18287 label: "windows_c",
18288 description: r##"# `windows_c`
18289
18290This feature is internal to the Rust compiler and is not intended for general use.
18291
18292------------------------
18293"##,
18294 default_severity: Severity::Allow,
18295 warn_since: None,
18296 deny_since: None,
18297 },
18298 Lint {
18299 label: "windows_change_time",
18300 description: r##"# `windows_change_time`
18301
18302
18303
18304The tracking issue for this feature is: [#121478]
18305
18306[#121478]: https://github.com/rust-lang/rust/issues/121478
18307
18308------------------------
18309"##,
18310 default_severity: Severity::Allow,
18311 warn_since: None,
18312 deny_since: None,
18313 },
18314 Lint {
18315 label: "windows_freeze_file_times",
18316 description: r##"# `windows_freeze_file_times`
18317
18318
18319
18320The tracking issue for this feature is: [#149715]
18321
18322[#149715]: https://github.com/rust-lang/rust/issues/149715
18323
18324------------------------
18325"##,
18326 default_severity: Severity::Allow,
18327 warn_since: None,
18328 deny_since: None,
18329 },
18330 Lint {
18331 label: "windows_handle",
18332 description: r##"# `windows_handle`
18333
18334This feature is internal to the Rust compiler and is not intended for general use.
18335
18336------------------------
18337"##,
18338 default_severity: Severity::Allow,
18339 warn_since: None,
18340 deny_since: None,
18341 },
18342 Lint {
18343 label: "windows_net",
18344 description: r##"# `windows_net`
18345
18346This feature is internal to the Rust compiler and is not intended for general use.
18347
18348------------------------
18349"##,
18350 default_severity: Severity::Allow,
18351 warn_since: None,
18352 deny_since: None,
18353 },
18354 Lint {
18355 label: "windows_permissions_ext",
18356 description: r##"# `windows_permissions_ext`
18357
18358
18359
18360The tracking issue for this feature is: [#152956]
18361
18362[#152956]: https://github.com/rust-lang/rust/issues/152956
18363
18364------------------------
18365"##,
18366 default_severity: Severity::Allow,
18367 warn_since: None,
18368 deny_since: None,
18369 },
18370 Lint {
18371 label: "windows_process_extensions_async_pipes",
18372 description: r##"# `windows_process_extensions_async_pipes`
18373
18374
18375
18376The tracking issue for this feature is: [#98289]
18377
18378[#98289]: https://github.com/rust-lang/rust/issues/98289
18379
18380------------------------
18381"##,
18382 default_severity: Severity::Allow,
18383 warn_since: None,
18384 deny_since: None,
18385 },
18386 Lint {
18387 label: "windows_process_extensions_desktop",
18388 description: r##"# `windows_process_extensions_desktop`
18389
18390
18391
18392The tracking issue for this feature is: [#158852]
18393
18394[#158852]: https://github.com/rust-lang/rust/issues/158852
18395
18396------------------------
18397"##,
18398 default_severity: Severity::Allow,
18399 warn_since: None,
18400 deny_since: None,
18401 },
18402 Lint {
18403 label: "windows_process_extensions_force_quotes",
18404 description: r##"# `windows_process_extensions_force_quotes`
18405
18406
18407
18408The tracking issue for this feature is: [#82227]
18409
18410[#82227]: https://github.com/rust-lang/rust/issues/82227
18411
18412------------------------
18413"##,
18414 default_severity: Severity::Allow,
18415 warn_since: None,
18416 deny_since: None,
18417 },
18418 Lint {
18419 label: "windows_process_extensions_raw_attribute",
18420 description: r##"# `windows_process_extensions_raw_attribute`
18421
18422
18423
18424The tracking issue for this feature is: [#114854]
18425
18426[#114854]: https://github.com/rust-lang/rust/issues/114854
18427
18428------------------------
18429"##,
18430 default_severity: Severity::Allow,
18431 warn_since: None,
18432 deny_since: None,
18433 },
18434 Lint {
18435 label: "windows_process_extensions_startupinfo",
18436 description: r##"# `windows_process_extensions_startupinfo`
18437
18438
18439
18440The tracking issue for this feature is: [#141010]
18441
18442[#141010]: https://github.com/rust-lang/rust/issues/141010
18443
18444------------------------
18445"##,
18446 default_severity: Severity::Allow,
18447 warn_since: None,
18448 deny_since: None,
18449 },
18450 Lint {
18451 label: "windows_stdio",
18452 description: r##"# `windows_stdio`
18453
18454This feature is internal to the Rust compiler and is not intended for general use.
18455
18456------------------------
18457"##,
18458 default_severity: Severity::Allow,
18459 warn_since: None,
18460 deny_since: None,
18461 },
18462 Lint {
18463 label: "windows_unix_domain_sockets",
18464 description: r##"# `windows_unix_domain_sockets`
18465
18466
18467
18468The tracking issue for this feature is: [#150487]
18469
18470[#150487]: https://github.com/rust-lang/rust/issues/150487
18471
18472------------------------
18473"##,
18474 default_severity: Severity::Allow,
18475 warn_since: None,
18476 deny_since: None,
18477 },
18478 Lint {
18479 label: "with_negative_coherence",
18480 description: r##"# `with_negative_coherence`
18481
18482Use for stable + negative coherence and strict coherence depending on trait's rustc_strict_coherence value.
18483
18484This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
18485
18486------------------------
18487"##,
18488 default_severity: Severity::Allow,
18489 warn_since: None,
18490 deny_since: None,
18491 },
18492 Lint {
18493 label: "wrapping_int_impl",
18494 description: r##"# `wrapping_int_impl`
18495
18496
18497
18498The tracking issue for this feature is: [#32463]
18499
18500[#32463]: https://github.com/rust-lang/rust/issues/32463
18501
18502------------------------
18503"##,
18504 default_severity: Severity::Allow,
18505 warn_since: None,
18506 deny_since: None,
18507 },
18508 Lint {
18509 label: "wrapping_next_power_of_two",
18510 description: r##"# `wrapping_next_power_of_two`
18511
18512
18513
18514The tracking issue for this feature is: [#32463]
18515
18516[#32463]: https://github.com/rust-lang/rust/issues/32463
18517
18518------------------------
18519"##,
18520 default_severity: Severity::Allow,
18521 warn_since: None,
18522 deny_since: None,
18523 },
18524 Lint {
18525 label: "write_all_vectored",
18526 description: r##"# `write_all_vectored`
18527
18528
18529
18530The tracking issue for this feature is: [#70436]
18531
18532[#70436]: https://github.com/rust-lang/rust/issues/70436
18533
18534------------------------
18535"##,
18536 default_severity: Severity::Allow,
18537 warn_since: None,
18538 deny_since: None,
18539 },
18540 Lint {
18541 label: "wtf8_internals",
18542 description: r##"# `wtf8_internals`
18543
18544
18545
18546This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
18547
18548------------------------
18549"##,
18550 default_severity: Severity::Allow,
18551 warn_since: None,
18552 deny_since: None,
18553 },
18554 Lint {
18555 label: "x86_amx_intrinsics",
18556 description: r##"# `x86_amx_intrinsics`
18557
18558Allows use of x86 `AMX` target-feature attributes and intrinsics
18559
18560The tracking issue for this feature is: [#126622]
18561
18562[#126622]: https://github.com/rust-lang/rust/issues/126622
18563
18564------------------------
18565"##,
18566 default_severity: Severity::Allow,
18567 warn_since: None,
18568 deny_since: None,
18569 },
18570 Lint {
18571 label: "x87_target_feature",
18572 description: r##"# `x87_target_feature`
18573
18574The x87 target feature on x86.
18575
18576The tracking issue for this feature is: [#150261]
18577
18578[#150261]: https://github.com/rust-lang/rust/issues/150261
18579
18580------------------------
18581"##,
18582 default_severity: Severity::Allow,
18583 warn_since: None,
18584 deny_since: None,
18585 },
18586 Lint {
18587 label: "xop_target_feature",
18588 description: r##"# `xop_target_feature`
18589
18590Allows use of the `xop` target-feature
18591
18592The tracking issue for this feature is: [#127208]
18593
18594[#127208]: https://github.com/rust-lang/rust/issues/127208
18595
18596------------------------
18597"##,
18598 default_severity: Severity::Allow,
18599 warn_since: None,
18600 deny_since: None,
18601 },
18602 Lint {
18603 label: "xtensa_target_feature",
18604 description: r##"# `xtensa_target_feature`
18605
18606Allows use of the Xtensa target-features
18607
18608The tracking issue for this feature is: [#157063]
18609
18610[#157063]: https://github.com/rust-lang/rust/issues/157063
18611
18612------------------------
18613"##,
18614 default_severity: Severity::Allow,
18615 warn_since: None,
18616 deny_since: None,
18617 },
18618 Lint {
18619 label: "yeet_desugar_details",
18620 description: r##"# `yeet_desugar_details`
18621
18622
18623
18624This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
18625
18626------------------------
18627"##,
18628 default_severity: Severity::Allow,
18629 warn_since: None,
18630 deny_since: None,
18631 },
18632 Lint {
18633 label: "yeet_expr",
18634 description: r##"# `yeet_expr`
18635
18636The tracking issue for this feature is: [#96373]
18637
18638[#96373]: https://github.com/rust-lang/rust/issues/96373
18639
18640------------------------
18641
18642The `yeet_expr` feature adds support for `do yeet` expressions,
18643which can be used to early-exit from a function or `try` block.
18644
18645These are highly experimental, thus the placeholder syntax.
18646
18647```rust,edition2021
18648#![feature(yeet_expr)]
18649
18650fn foo() -> Result<String, i32> {
18651 do yeet 4;
18652}
18653assert_eq!(foo(), Err(4));
18654
18655fn bar() -> Option<String> {
18656 do yeet;
18657}
18658assert_eq!(bar(), None);
18659```
18660"##,
18661 default_severity: Severity::Allow,
18662 warn_since: None,
18663 deny_since: None,
18664 },
18665 Lint {
18666 label: "yield_expr",
18667 description: r##"# `yield_expr`
18668
18669Allows the `yield` keyword for coroutines/generators.
18670
18671The tracking issue for this feature is: [#43122]
18672
18673[#43122]: https://github.com/rust-lang/rust/issues/43122
18674
18675------------------------
18676"##,
18677 default_severity: Severity::Allow,
18678 warn_since: None,
18679 deny_since: None,
18680 },
18681];
18682
18683pub const CLIPPY_LINTS: &[Lint] = &[
18684 Lint {
18685 label: "clippy::absolute_paths",
18686 description: r##"Checks for usage of items through absolute paths, like `std::env::current_dir`."##,
18687 default_severity: Severity::Allow,
18688 warn_since: None,
18689 deny_since: None,
18690 },
18691 Lint {
18692 label: "clippy::absurd_extreme_comparisons",
18693 description: r##"Checks for comparisons where one side of the relation is
18694either the minimum or maximum value for its type and warns if it involves a
18695case that is always true or always false. Only integer and boolean types are
18696checked."##,
18697 default_severity: Severity::Allow,
18698 warn_since: None,
18699 deny_since: None,
18700 },
18701 Lint {
18702 label: "clippy::alloc_instead_of_core",
18703 description: r##"Finds items imported through `alloc` when available through `core`."##,
18704 default_severity: Severity::Allow,
18705 warn_since: None,
18706 deny_since: None,
18707 },
18708 Lint {
18709 label: "clippy::allow_attributes",
18710 description: r##"Checks for usage of the `#[allow]` attribute and suggests replacing it with
18711the `#[expect]` (See [RFC 2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html))
18712
18713This lint only warns outer attributes (`#[allow]`), as inner attributes
18714(`#![allow]`) are usually used to enable or disable lints on a global scale."##,
18715 default_severity: Severity::Allow,
18716 warn_since: None,
18717 deny_since: None,
18718 },
18719 Lint {
18720 label: "clippy::allow_attributes_without_reason",
18721 description: r##"Checks for attributes that allow lints without a reason."##,
18722 default_severity: Severity::Allow,
18723 warn_since: None,
18724 deny_since: None,
18725 },
18726 Lint {
18727 label: "clippy::almost_complete_range",
18728 description: r##"Checks for ranges which almost include the entire range of letters from 'a' to 'z'
18729or digits from '0' to '9', but don't because they're a half open range."##,
18730 default_severity: Severity::Allow,
18731 warn_since: None,
18732 deny_since: None,
18733 },
18734 Lint {
18735 label: "clippy::almost_swapped",
18736 description: r##"Checks for `foo = bar; bar = foo` sequences."##,
18737 default_severity: Severity::Allow,
18738 warn_since: None,
18739 deny_since: None,
18740 },
18741 Lint {
18742 label: "clippy::approx_constant",
18743 description: r##"Checks for floating point literals that approximate
18744constants which are defined in
18745[`std::f32::consts`](https://doc.rust-lang.org/stable/std/f32/consts/#constants)
18746or
18747[`std::f64::consts`](https://doc.rust-lang.org/stable/std/f64/consts/#constants),
18748respectively, suggesting to use the predefined constant."##,
18749 default_severity: Severity::Allow,
18750 warn_since: None,
18751 deny_since: None,
18752 },
18753 Lint {
18754 label: "clippy::arc_with_non_send_sync",
18755 description: r##".
18756This lint warns when you use `Arc` with a type that does not implement `Send` or `Sync`."##,
18757 default_severity: Severity::Allow,
18758 warn_since: None,
18759 deny_since: None,
18760 },
18761 Lint {
18762 label: "clippy::arithmetic_side_effects",
18763 description: r##"Checks any kind of arithmetic operation of any type.
18764
18765Operators like `+`, `-`, `*` or `<<` are usually capable of overflowing according to the [Rust
18766Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow),
18767or can panic (`/`, `%`).
18768
18769Known safe built-in types like `Wrapping` or `Saturating`, floats, operations in constant
18770environments, allowed types and non-constant operations that won't overflow are ignored."##,
18771 default_severity: Severity::Allow,
18772 warn_since: None,
18773 deny_since: None,
18774 },
18775 Lint {
18776 label: "clippy::as_conversions",
18777 description: r##"Checks for usage of `as` conversions.
18778
18779Note that this lint is specialized in linting *every single* use of `as`
18780regardless of whether good alternatives exist or not.
18781If you want more precise lints for `as`, please consider using these separate lints:
18782`unnecessary_cast`, `cast_lossless/cast_possible_truncation/cast_possible_wrap/cast_precision_loss/cast_sign_loss`,
18783`fn_to_numeric_cast(_with_truncation)`, `char_lit_as_u8`, `ref_to_mut` and `ptr_as_ptr`.
18784There is a good explanation the reason why this lint should work in this way and how it is useful
18785[in this issue](https://github.com/rust-lang/rust-clippy/issues/5122)."##,
18786 default_severity: Severity::Allow,
18787 warn_since: None,
18788 deny_since: None,
18789 },
18790 Lint {
18791 label: "clippy::as_ptr_cast_mut",
18792 description: r##"Checks for the result of a `&self`-taking `as_ptr` being cast to a mutable pointer."##,
18793 default_severity: Severity::Allow,
18794 warn_since: None,
18795 deny_since: None,
18796 },
18797 Lint {
18798 label: "clippy::as_underscore",
18799 description: r##"Checks for the usage of `as _` conversion using inferred type."##,
18800 default_severity: Severity::Allow,
18801 warn_since: None,
18802 deny_since: None,
18803 },
18804 Lint {
18805 label: "clippy::assertions_on_constants",
18806 description: r##"Checks for `assert!(true)` and `assert!(false)` calls."##,
18807 default_severity: Severity::Allow,
18808 warn_since: None,
18809 deny_since: None,
18810 },
18811 Lint {
18812 label: "clippy::assertions_on_result_states",
18813 description: r##"Checks for `assert!(r.is_ok())` or `assert!(r.is_err())` calls."##,
18814 default_severity: Severity::Allow,
18815 warn_since: None,
18816 deny_since: None,
18817 },
18818 Lint {
18819 label: "clippy::assign_op_pattern",
18820 description: r##"Checks for `a = a op b` or `a = b commutative_op a`
18821patterns."##,
18822 default_severity: Severity::Allow,
18823 warn_since: None,
18824 deny_since: None,
18825 },
18826 Lint {
18827 label: "clippy::assign_ops",
18828 description: r##"Nothing. This lint has been deprecated"##,
18829 default_severity: Severity::Allow,
18830 warn_since: None,
18831 deny_since: None,
18832 },
18833 Lint {
18834 label: "clippy::assigning_clones",
18835 description: r##"Checks for code like `foo = bar.clone();`"##,
18836 default_severity: Severity::Allow,
18837 warn_since: None,
18838 deny_since: None,
18839 },
18840 Lint {
18841 label: "clippy::async_yields_async",
18842 description: r##"Checks for async blocks that yield values of types
18843that can themselves be awaited."##,
18844 default_severity: Severity::Allow,
18845 warn_since: None,
18846 deny_since: None,
18847 },
18848 Lint {
18849 label: "clippy::await_holding_invalid_type",
18850 description: r##"Allows users to configure types which should not be held across await
18851suspension points."##,
18852 default_severity: Severity::Allow,
18853 warn_since: None,
18854 deny_since: None,
18855 },
18856 Lint {
18857 label: "clippy::await_holding_lock",
18858 description: r##"Checks for calls to `await` while holding a non-async-aware
18859`MutexGuard`."##,
18860 default_severity: Severity::Allow,
18861 warn_since: None,
18862 deny_since: None,
18863 },
18864 Lint {
18865 label: "clippy::await_holding_refcell_ref",
18866 description: r##"Checks for calls to `await` while holding a `RefCell`, `Ref`, or `RefMut`."##,
18867 default_severity: Severity::Allow,
18868 warn_since: None,
18869 deny_since: None,
18870 },
18871 Lint {
18872 label: "clippy::bad_bit_mask",
18873 description: r##"Checks for incompatible bit masks in comparisons.
18874
18875The formula for detecting if an expression of the type `_ <bit_op> m
18876<cmp_op> c` (where `<bit_op>` is one of {`&`, `|`} and `<cmp_op>` is one of
18877{`!=`, `>=`, `>`, `!=`, `>=`, `>`}) can be determined from the following
18878table:
18879
18880|Comparison |Bit Op|Example |is always|Formula |
18881|------------|------|-------------|---------|----------------------|
18882|`==` or `!=`| `&` |`x & 2 == 3` |`false` |`c & m != c` |
18883|`<` or `>=`| `&` |`x & 2 < 3` |`true` |`m < c` |
18884|`>` or `<=`| `&` |`x & 1 > 1` |`false` |`m <= c` |
18885|`==` or `!=`| `\\|` |`x \\| 1 == 0`|`false` |`c \\| m != c` |
18886|`<` or `>=`| `\\|` |`x \\| 1 < 1` |`false` |`m >= c` |
18887|`<=` or `>` | `\\|` |`x \\| 1 > 0` |`true` |`m > c` |"##,
18888 default_severity: Severity::Allow,
18889 warn_since: None,
18890 deny_since: None,
18891 },
18892 Lint {
18893 label: "clippy::big_endian_bytes",
18894 description: r##"Checks for the usage of the `to_be_bytes` method and/or the function `from_be_bytes`."##,
18895 default_severity: Severity::Allow,
18896 warn_since: None,
18897 deny_since: None,
18898 },
18899 Lint {
18900 label: "clippy::bind_instead_of_map",
18901 description: r##"Checks for usage of `_.and_then(|x| Some(y))`, `_.and_then(|x| Ok(y))`
18902or `_.or_else(|x| Err(y))`."##,
18903 default_severity: Severity::Allow,
18904 warn_since: None,
18905 deny_since: None,
18906 },
18907 Lint {
18908 label: "clippy::blanket_clippy_restriction_lints",
18909 description: r##"Checks for `warn`/`deny`/`forbid` attributes targeting the whole clippy::restriction category."##,
18910 default_severity: Severity::Allow,
18911 warn_since: None,
18912 deny_since: None,
18913 },
18914 Lint {
18915 label: "clippy::blocks_in_conditions",
18916 description: r##"Checks for `if` and `match` conditions that use blocks containing an
18917expression, statements or conditions that use closures with blocks."##,
18918 default_severity: Severity::Allow,
18919 warn_since: None,
18920 deny_since: None,
18921 },
18922 Lint {
18923 label: "clippy::bool_assert_comparison",
18924 description: r##"This lint warns about boolean comparisons in assert-like macros."##,
18925 default_severity: Severity::Allow,
18926 warn_since: None,
18927 deny_since: None,
18928 },
18929 Lint {
18930 label: "clippy::bool_comparison",
18931 description: r##"Checks for expressions of the form `x == true`,
18932`x != true` and order comparisons such as `x < true` (or vice versa) and
18933suggest using the variable directly."##,
18934 default_severity: Severity::Allow,
18935 warn_since: None,
18936 deny_since: None,
18937 },
18938 Lint {
18939 label: "clippy::bool_to_int_with_if",
18940 description: r##"Instead of using an if statement to convert a bool to an int,
18941this lint suggests using a `from()` function or an `as` coercion."##,
18942 default_severity: Severity::Allow,
18943 warn_since: None,
18944 deny_since: None,
18945 },
18946 Lint {
18947 label: "clippy::borrow_as_ptr",
18948 description: r##"Checks for the usage of `&expr as *const T` or
18949`&mut expr as *mut T`, and suggest using `ptr::addr_of` or
18950`ptr::addr_of_mut` instead."##,
18951 default_severity: Severity::Allow,
18952 warn_since: None,
18953 deny_since: None,
18954 },
18955 Lint {
18956 label: "clippy::borrow_deref_ref",
18957 description: r##"Checks for `&*(&T)`."##,
18958 default_severity: Severity::Allow,
18959 warn_since: None,
18960 deny_since: None,
18961 },
18962 Lint {
18963 label: "clippy::borrow_interior_mutable_const",
18964 description: r##"Checks if `const` items which is interior mutable (e.g.,
18965contains a `Cell`, `Mutex`, `AtomicXxxx`, etc.) has been borrowed directly."##,
18966 default_severity: Severity::Allow,
18967 warn_since: None,
18968 deny_since: None,
18969 },
18970 Lint {
18971 label: "clippy::borrowed_box",
18972 description: r##"Checks for usage of `&Box<T>` anywhere in the code.
18973Check the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##,
18974 default_severity: Severity::Allow,
18975 warn_since: None,
18976 deny_since: None,
18977 },
18978 Lint {
18979 label: "clippy::box_collection",
18980 description: r##"Checks for usage of `Box<T>` where T is a collection such as Vec anywhere in the code.
18981Check the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##,
18982 default_severity: Severity::Allow,
18983 warn_since: None,
18984 deny_since: None,
18985 },
18986 Lint {
18987 label: "clippy::box_default",
18988 description: r##"checks for `Box::new(Default::default())`, which can be written as
18989`Box::default()`."##,
18990 default_severity: Severity::Allow,
18991 warn_since: None,
18992 deny_since: None,
18993 },
18994 Lint {
18995 label: "clippy::boxed_local",
18996 description: r##"Checks for usage of `Box<T>` where an unboxed `T` would
18997work fine."##,
18998 default_severity: Severity::Allow,
18999 warn_since: None,
19000 deny_since: None,
19001 },
19002 Lint {
19003 label: "clippy::branches_sharing_code",
19004 description: r##"Checks if the `if` and `else` block contain shared code that can be
19005moved out of the blocks."##,
19006 default_severity: Severity::Allow,
19007 warn_since: None,
19008 deny_since: None,
19009 },
19010 Lint {
19011 label: "clippy::builtin_type_shadow",
19012 description: r##"Warns if a generic shadows a built-in type."##,
19013 default_severity: Severity::Allow,
19014 warn_since: None,
19015 deny_since: None,
19016 },
19017 Lint {
19018 label: "clippy::byte_char_slices",
19019 description: r##"Checks for hard to read slices of byte characters, that could be more easily expressed as a
19020byte string."##,
19021 default_severity: Severity::Allow,
19022 warn_since: None,
19023 deny_since: None,
19024 },
19025 Lint {
19026 label: "clippy::bytes_count_to_len",
19027 description: r##"It checks for `str::bytes().count()` and suggests replacing it with
19028`str::len()`."##,
19029 default_severity: Severity::Allow,
19030 warn_since: None,
19031 deny_since: None,
19032 },
19033 Lint {
19034 label: "clippy::bytes_nth",
19035 description: r##"Checks for the use of `.bytes().nth()`."##,
19036 default_severity: Severity::Allow,
19037 warn_since: None,
19038 deny_since: None,
19039 },
19040 Lint {
19041 label: "clippy::cargo_common_metadata",
19042 description: r##"Checks to see if all common metadata is defined in
19043`Cargo.toml`. See: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#cargotoml-includes-all-common-metadata-c-metadata"##,
19044 default_severity: Severity::Allow,
19045 warn_since: None,
19046 deny_since: None,
19047 },
19048 Lint {
19049 label: "clippy::case_sensitive_file_extension_comparisons",
19050 description: r##"Checks for calls to `ends_with` with possible file extensions
19051and suggests to use a case-insensitive approach instead."##,
19052 default_severity: Severity::Allow,
19053 warn_since: None,
19054 deny_since: None,
19055 },
19056 Lint {
19057 label: "clippy::cast_abs_to_unsigned",
19058 description: r##"Checks for usage of the `abs()` method that cast the result to unsigned."##,
19059 default_severity: Severity::Allow,
19060 warn_since: None,
19061 deny_since: None,
19062 },
19063 Lint {
19064 label: "clippy::cast_enum_constructor",
19065 description: r##"Checks for casts from an enum tuple constructor to an integer."##,
19066 default_severity: Severity::Allow,
19067 warn_since: None,
19068 deny_since: None,
19069 },
19070 Lint {
19071 label: "clippy::cast_enum_truncation",
19072 description: r##"Checks for casts from an enum type to an integral type that will definitely truncate the
19073value."##,
19074 default_severity: Severity::Allow,
19075 warn_since: None,
19076 deny_since: None,
19077 },
19078 Lint {
19079 label: "clippy::cast_lossless",
19080 description: r##"Checks for casts between numeric types that can be replaced by safe
19081conversion functions."##,
19082 default_severity: Severity::Allow,
19083 warn_since: None,
19084 deny_since: None,
19085 },
19086 Lint {
19087 label: "clippy::cast_nan_to_int",
19088 description: r##"Checks for a known NaN float being cast to an integer"##,
19089 default_severity: Severity::Allow,
19090 warn_since: None,
19091 deny_since: None,
19092 },
19093 Lint {
19094 label: "clippy::cast_possible_truncation",
19095 description: r##"Checks for casts between numeric types that may
19096truncate large values. This is expected behavior, so the cast is `Allow` by
19097default. It suggests user either explicitly ignore the lint,
19098or use `try_from()` and handle the truncation, default, or panic explicitly."##,
19099 default_severity: Severity::Allow,
19100 warn_since: None,
19101 deny_since: None,
19102 },
19103 Lint {
19104 label: "clippy::cast_possible_wrap",
19105 description: r##"Checks for casts from an unsigned type to a signed type of
19106the same size, or possibly smaller due to target-dependent integers.
19107Performing such a cast is a no-op for the compiler (that is, nothing is
19108changed at the bit level), and the binary representation of the value is
19109reinterpreted. This can cause wrapping if the value is too big
19110for the target signed type. However, the cast works as defined, so this lint
19111is `Allow` by default."##,
19112 default_severity: Severity::Allow,
19113 warn_since: None,
19114 deny_since: None,
19115 },
19116 Lint {
19117 label: "clippy::cast_precision_loss",
19118 description: r##"Checks for casts from any numeric type to a float type where
19119the receiving type cannot store all values from the original type without
19120rounding errors. This possible rounding is to be expected, so this lint is
19121`Allow` by default.
19122
19123Basically, this warns on casting any integer with 32 or more bits to `f32`
19124or any 64-bit integer to `f64`."##,
19125 default_severity: Severity::Allow,
19126 warn_since: None,
19127 deny_since: None,
19128 },
19129 Lint {
19130 label: "clippy::cast_ptr_alignment",
19131 description: r##"Checks for casts, using `as` or `pointer::cast`, from a
19132less strictly aligned pointer to a more strictly aligned pointer."##,
19133 default_severity: Severity::Allow,
19134 warn_since: None,
19135 deny_since: None,
19136 },
19137 Lint {
19138 label: "clippy::cast_sign_loss",
19139 description: r##"Checks for casts from a signed to an unsigned numeric
19140type. In this case, negative values wrap around to large positive values,
19141which can be quite surprising in practice. However, since the cast works as
19142defined, this lint is `Allow` by default."##,
19143 default_severity: Severity::Allow,
19144 warn_since: None,
19145 deny_since: None,
19146 },
19147 Lint {
19148 label: "clippy::cast_slice_different_sizes",
19149 description: r##"Checks for `as` casts between raw pointers to slices with differently sized elements."##,
19150 default_severity: Severity::Allow,
19151 warn_since: None,
19152 deny_since: None,
19153 },
19154 Lint {
19155 label: "clippy::cast_slice_from_raw_parts",
19156 description: r##"Checks for a raw slice being cast to a slice pointer"##,
19157 default_severity: Severity::Allow,
19158 warn_since: None,
19159 deny_since: None,
19160 },
19161 Lint {
19162 label: "clippy::cfg_not_test",
19163 description: r##"Checks for usage of `cfg` that excludes code from `test` builds. (i.e., `#[cfg(not(test))]`)"##,
19164 default_severity: Severity::Allow,
19165 warn_since: None,
19166 deny_since: None,
19167 },
19168 Lint {
19169 label: "clippy::char_lit_as_u8",
19170 description: r##"Checks for expressions where a character literal is cast
19171to `u8` and suggests using a byte literal instead."##,
19172 default_severity: Severity::Allow,
19173 warn_since: None,
19174 deny_since: None,
19175 },
19176 Lint {
19177 label: "clippy::chars_last_cmp",
19178 description: r##"Checks for usage of `_.chars().last()` or
19179`_.chars().next_back()` on a `str` to check if it ends with a given char."##,
19180 default_severity: Severity::Allow,
19181 warn_since: None,
19182 deny_since: None,
19183 },
19184 Lint {
19185 label: "clippy::chars_next_cmp",
19186 description: r##"Checks for usage of `.chars().next()` on a `str` to check
19187if it starts with a given char."##,
19188 default_severity: Severity::Allow,
19189 warn_since: None,
19190 deny_since: None,
19191 },
19192 Lint {
19193 label: "clippy::checked_conversions",
19194 description: r##"Checks for explicit bounds checking when casting."##,
19195 default_severity: Severity::Allow,
19196 warn_since: None,
19197 deny_since: None,
19198 },
19199 Lint {
19200 label: "clippy::clear_with_drain",
19201 description: r##"Checks for usage of `.drain(..)` for the sole purpose of clearing a container."##,
19202 default_severity: Severity::Allow,
19203 warn_since: None,
19204 deny_since: None,
19205 },
19206 Lint {
19207 label: "clippy::clone_on_copy",
19208 description: r##"Checks for usage of `.clone()` on a `Copy` type."##,
19209 default_severity: Severity::Allow,
19210 warn_since: None,
19211 deny_since: None,
19212 },
19213 Lint {
19214 label: "clippy::clone_on_ref_ptr",
19215 description: r##"Checks for usage of `.clone()` on a ref-counted pointer,
19216(`Rc`, `Arc`, `rc::Weak`, or `sync::Weak`), and suggests calling Clone via unified
19217function syntax instead (e.g., `Rc::clone(foo)`)."##,
19218 default_severity: Severity::Allow,
19219 warn_since: None,
19220 deny_since: None,
19221 },
19222 Lint {
19223 label: "clippy::cloned_instead_of_copied",
19224 description: r##"Checks for usage of `cloned()` on an `Iterator` or `Option` where
19225`copied()` could be used instead."##,
19226 default_severity: Severity::Allow,
19227 warn_since: None,
19228 deny_since: None,
19229 },
19230 Lint {
19231 label: "clippy::cmp_null",
19232 description: r##"This lint checks for equality comparisons with `ptr::null`"##,
19233 default_severity: Severity::Allow,
19234 warn_since: None,
19235 deny_since: None,
19236 },
19237 Lint {
19238 label: "clippy::cmp_owned",
19239 description: r##"Checks for conversions to owned values just for the sake
19240of a comparison."##,
19241 default_severity: Severity::Allow,
19242 warn_since: None,
19243 deny_since: None,
19244 },
19245 Lint {
19246 label: "clippy::cognitive_complexity",
19247 description: r##"Checks for methods with high cognitive complexity."##,
19248 default_severity: Severity::Allow,
19249 warn_since: None,
19250 deny_since: None,
19251 },
19252 Lint {
19253 label: "clippy::collapsible_else_if",
19254 description: r##"Checks for collapsible `else { if ... }` expressions
19255that can be collapsed to `else if ...`."##,
19256 default_severity: Severity::Allow,
19257 warn_since: None,
19258 deny_since: None,
19259 },
19260 Lint {
19261 label: "clippy::collapsible_if",
19262 description: r##"Checks for nested `if` statements which can be collapsed
19263by `&&`-combining their conditions."##,
19264 default_severity: Severity::Allow,
19265 warn_since: None,
19266 deny_since: None,
19267 },
19268 Lint {
19269 label: "clippy::collapsible_match",
19270 description: r##"Finds nested `match` or `if let` expressions where the patterns may be collapsed together
19271without adding any branches.
19272
19273Note that this lint is not intended to find _all_ cases where nested match patterns can be merged, but only
19274cases where merging would most likely make the code more readable."##,
19275 default_severity: Severity::Allow,
19276 warn_since: None,
19277 deny_since: None,
19278 },
19279 Lint {
19280 label: "clippy::collapsible_str_replace",
19281 description: r##"Checks for consecutive calls to `str::replace` (2 or more)
19282that can be collapsed into a single call."##,
19283 default_severity: Severity::Allow,
19284 warn_since: None,
19285 deny_since: None,
19286 },
19287 Lint {
19288 label: "clippy::collection_is_never_read",
19289 description: r##"Checks for collections that are never queried."##,
19290 default_severity: Severity::Allow,
19291 warn_since: None,
19292 deny_since: None,
19293 },
19294 Lint {
19295 label: "clippy::comparison_chain",
19296 description: r##"Checks comparison chains written with `if` that can be
19297rewritten with `match` and `cmp`."##,
19298 default_severity: Severity::Allow,
19299 warn_since: None,
19300 deny_since: None,
19301 },
19302 Lint {
19303 label: "clippy::comparison_to_empty",
19304 description: r##"Checks for comparing to an empty slice such as `` or `[]`,
19305and suggests using `.is_empty()` where applicable."##,
19306 default_severity: Severity::Allow,
19307 warn_since: None,
19308 deny_since: None,
19309 },
19310 Lint {
19311 label: "clippy::const_is_empty",
19312 description: r##"It identifies calls to `.is_empty()` on constant values."##,
19313 default_severity: Severity::Allow,
19314 warn_since: None,
19315 deny_since: None,
19316 },
19317 Lint {
19318 label: "clippy::copy_iterator",
19319 description: r##"Checks for types that implement `Copy` as well as
19320`Iterator`."##,
19321 default_severity: Severity::Allow,
19322 warn_since: None,
19323 deny_since: None,
19324 },
19325 Lint {
19326 label: "clippy::crate_in_macro_def",
19327 description: r##"Checks for usage of `crate` as opposed to `$crate` in a macro definition."##,
19328 default_severity: Severity::Allow,
19329 warn_since: None,
19330 deny_since: None,
19331 },
19332 Lint {
19333 label: "clippy::create_dir",
19334 description: r##"Checks usage of `std::fs::create_dir` and suggest using `std::fs::create_dir_all` instead."##,
19335 default_severity: Severity::Allow,
19336 warn_since: None,
19337 deny_since: None,
19338 },
19339 Lint {
19340 label: "clippy::crosspointer_transmute",
19341 description: r##"Checks for transmutes between a type `T` and `*T`."##,
19342 default_severity: Severity::Allow,
19343 warn_since: None,
19344 deny_since: None,
19345 },
19346 Lint {
19347 label: "clippy::dbg_macro",
19348 description: r##"Checks for usage of the [`dbg!`](https://doc.rust-lang.org/std/macro.dbg.html) macro."##,
19349 default_severity: Severity::Allow,
19350 warn_since: None,
19351 deny_since: None,
19352 },
19353 Lint {
19354 label: "clippy::debug_assert_with_mut_call",
19355 description: r##"Checks for function/method calls with a mutable
19356parameter in `debug_assert!`, `debug_assert_eq!` and `debug_assert_ne!` macros."##,
19357 default_severity: Severity::Allow,
19358 warn_since: None,
19359 deny_since: None,
19360 },
19361 Lint {
19362 label: "clippy::decimal_literal_representation",
19363 description: r##"Warns if there is a better representation for a numeric literal."##,
19364 default_severity: Severity::Allow,
19365 warn_since: None,
19366 deny_since: None,
19367 },
19368 Lint {
19369 label: "clippy::declare_interior_mutable_const",
19370 description: r##"Checks for declaration of `const` items which is interior
19371mutable (e.g., contains a `Cell`, `Mutex`, `AtomicXxxx`, etc.)."##,
19372 default_severity: Severity::Allow,
19373 warn_since: None,
19374 deny_since: None,
19375 },
19376 Lint {
19377 label: "clippy::default_constructed_unit_structs",
19378 description: r##"Checks for construction on unit struct using `default`."##,
19379 default_severity: Severity::Allow,
19380 warn_since: None,
19381 deny_since: None,
19382 },
19383 Lint {
19384 label: "clippy::default_instead_of_iter_empty",
19385 description: r##"It checks for `std::iter::Empty::default()` and suggests replacing it with
19386`std::iter::empty()`."##,
19387 default_severity: Severity::Allow,
19388 warn_since: None,
19389 deny_since: None,
19390 },
19391 Lint {
19392 label: "clippy::default_numeric_fallback",
19393 description: r##"Checks for usage of unconstrained numeric literals which may cause default numeric fallback in type
19394inference.
19395
19396Default numeric fallback means that if numeric types have not yet been bound to concrete
19397types at the end of type inference, then integer type is bound to `i32`, and similarly
19398floating type is bound to `f64`.
19399
19400See [RFC0212](https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md) for more information about the fallback."##,
19401 default_severity: Severity::Allow,
19402 warn_since: None,
19403 deny_since: None,
19404 },
19405 Lint {
19406 label: "clippy::default_trait_access",
19407 description: r##"Checks for literal calls to `Default::default()`."##,
19408 default_severity: Severity::Allow,
19409 warn_since: None,
19410 deny_since: None,
19411 },
19412 Lint {
19413 label: "clippy::default_union_representation",
19414 description: r##"Displays a warning when a union is declared with the default representation (without a `#[repr(C)]` attribute)."##,
19415 default_severity: Severity::Allow,
19416 warn_since: None,
19417 deny_since: None,
19418 },
19419 Lint {
19420 label: "clippy::deprecated_cfg_attr",
19421 description: r##"Checks for `#[cfg_attr(rustfmt, rustfmt_skip)]` and suggests to replace it
19422with `#[rustfmt::skip]`."##,
19423 default_severity: Severity::Allow,
19424 warn_since: None,
19425 deny_since: None,
19426 },
19427 Lint {
19428 label: "clippy::deprecated_clippy_cfg_attr",
19429 description: r##"Checks for `#[cfg_attr(feature = cargo-clippy, ...)]` and for
19430`#[cfg(feature = cargo-clippy)]` and suggests to replace it with
19431`#[cfg_attr(clippy, ...)]` or `#[cfg(clippy)]`."##,
19432 default_severity: Severity::Allow,
19433 warn_since: None,
19434 deny_since: None,
19435 },
19436 Lint {
19437 label: "clippy::deprecated_semver",
19438 description: r##"Checks for `#[deprecated]` annotations with a `since`
19439field that is not a valid semantic version. Also allows TBD to signal
19440future deprecation."##,
19441 default_severity: Severity::Allow,
19442 warn_since: None,
19443 deny_since: None,
19444 },
19445 Lint {
19446 label: "clippy::deref_addrof",
19447 description: r##"Checks for usage of `*&` and `*&mut` in expressions."##,
19448 default_severity: Severity::Allow,
19449 warn_since: None,
19450 deny_since: None,
19451 },
19452 Lint {
19453 label: "clippy::deref_by_slicing",
19454 description: r##"Checks for slicing expressions which are equivalent to dereferencing the
19455value."##,
19456 default_severity: Severity::Allow,
19457 warn_since: None,
19458 deny_since: None,
19459 },
19460 Lint {
19461 label: "clippy::derivable_impls",
19462 description: r##"Detects manual `std::default::Default` implementations that are identical to a derived implementation."##,
19463 default_severity: Severity::Allow,
19464 warn_since: None,
19465 deny_since: None,
19466 },
19467 Lint {
19468 label: "clippy::derive_ord_xor_partial_ord",
19469 description: r##"Lints against manual `PartialOrd` and `Ord` implementations for types with a derived `Ord`
19470or `PartialOrd` implementation."##,
19471 default_severity: Severity::Allow,
19472 warn_since: None,
19473 deny_since: None,
19474 },
19475 Lint {
19476 label: "clippy::derive_partial_eq_without_eq",
19477 description: r##"Checks for types that derive `PartialEq` and could implement `Eq`."##,
19478 default_severity: Severity::Allow,
19479 warn_since: None,
19480 deny_since: None,
19481 },
19482 Lint {
19483 label: "clippy::derived_hash_with_manual_eq",
19484 description: r##"Lints against manual `PartialEq` implementations for types with a derived `Hash`
19485implementation."##,
19486 default_severity: Severity::Allow,
19487 warn_since: None,
19488 deny_since: None,
19489 },
19490 Lint {
19491 label: "clippy::disallowed_macros",
19492 description: r##"Denies the configured macros in clippy.toml
19493
19494Note: Even though this lint is warn-by-default, it will only trigger if
19495macros are defined in the clippy.toml file."##,
19496 default_severity: Severity::Allow,
19497 warn_since: None,
19498 deny_since: None,
19499 },
19500 Lint {
19501 label: "clippy::disallowed_methods",
19502 description: r##"Denies the configured methods and functions in clippy.toml
19503
19504Note: Even though this lint is warn-by-default, it will only trigger if
19505methods are defined in the clippy.toml file."##,
19506 default_severity: Severity::Allow,
19507 warn_since: None,
19508 deny_since: None,
19509 },
19510 Lint {
19511 label: "clippy::disallowed_names",
19512 description: r##"Checks for usage of disallowed names for variables, such
19513as `foo`."##,
19514 default_severity: Severity::Allow,
19515 warn_since: None,
19516 deny_since: None,
19517 },
19518 Lint {
19519 label: "clippy::disallowed_script_idents",
19520 description: r##"Checks for usage of unicode scripts other than those explicitly allowed
19521by the lint config.
19522
19523This lint doesn't take into account non-text scripts such as `Unknown` and `Linear_A`.
19524It also ignores the `Common` script type.
19525While configuring, be sure to use official script name [aliases] from
19526[the list of supported scripts][supported_scripts].
19527
19528See also: [`non_ascii_idents`].
19529
19530[aliases]: http://www.unicode.org/reports/tr24/tr24-31.html#Script_Value_Aliases
19531[supported_scripts]: https://www.unicode.org/iso15924/iso15924-codes.html"##,
19532 default_severity: Severity::Allow,
19533 warn_since: None,
19534 deny_since: None,
19535 },
19536 Lint {
19537 label: "clippy::disallowed_types",
19538 description: r##"Denies the configured types in clippy.toml.
19539
19540Note: Even though this lint is warn-by-default, it will only trigger if
19541types are defined in the clippy.toml file."##,
19542 default_severity: Severity::Allow,
19543 warn_since: None,
19544 deny_since: None,
19545 },
19546 Lint {
19547 label: "clippy::diverging_sub_expression",
19548 description: r##"Checks for diverging calls that are not match arms or
19549statements."##,
19550 default_severity: Severity::Allow,
19551 warn_since: None,
19552 deny_since: None,
19553 },
19554 Lint {
19555 label: "clippy::doc_lazy_continuation",
19556 description: r##"In CommonMark Markdown, the language used to write doc comments, a
19557paragraph nested within a list or block quote does not need any line
19558after the first one to be indented or marked. The specification calls
19559this a lazy paragraph continuation."##,
19560 default_severity: Severity::Allow,
19561 warn_since: None,
19562 deny_since: None,
19563 },
19564 Lint {
19565 label: "clippy::doc_link_with_quotes",
19566 description: r##"Detects the syntax `['foo']` in documentation comments (notice quotes instead of backticks)
19567outside of code blocks"##,
19568 default_severity: Severity::Allow,
19569 warn_since: None,
19570 deny_since: None,
19571 },
19572 Lint {
19573 label: "clippy::doc_markdown",
19574 description: r##"Checks for the presence of `_`, `::` or camel-case words
19575outside ticks in documentation."##,
19576 default_severity: Severity::Allow,
19577 warn_since: None,
19578 deny_since: None,
19579 },
19580 Lint {
19581 label: "clippy::double_comparisons",
19582 description: r##"Checks for double comparisons that could be simplified to a single expression."##,
19583 default_severity: Severity::Allow,
19584 warn_since: None,
19585 deny_since: None,
19586 },
19587 Lint {
19588 label: "clippy::double_must_use",
19589 description: r##"Checks for a `#[must_use]` attribute without
19590further information on functions and methods that return a type already
19591marked as `#[must_use]`."##,
19592 default_severity: Severity::Allow,
19593 warn_since: None,
19594 deny_since: None,
19595 },
19596 Lint {
19597 label: "clippy::double_neg",
19598 description: r##"Detects expressions of the form `--x`."##,
19599 default_severity: Severity::Allow,
19600 warn_since: None,
19601 deny_since: None,
19602 },
19603 Lint {
19604 label: "clippy::double_parens",
19605 description: r##"Checks for unnecessary double parentheses."##,
19606 default_severity: Severity::Allow,
19607 warn_since: None,
19608 deny_since: None,
19609 },
19610 Lint {
19611 label: "clippy::drain_collect",
19612 description: r##"Checks for calls to `.drain()` that clear the collection, immediately followed by a call to `.collect()`.
19613
19614> Collection in this context refers to any type with a `drain` method:
19615> `Vec`, `VecDeque`, `BinaryHeap`, `HashSet`,`HashMap`, `String`"##,
19616 default_severity: Severity::Allow,
19617 warn_since: None,
19618 deny_since: None,
19619 },
19620 Lint {
19621 label: "clippy::drop_non_drop",
19622 description: r##"Checks for calls to `std::mem::drop` with a value that does not implement `Drop`."##,
19623 default_severity: Severity::Allow,
19624 warn_since: None,
19625 deny_since: None,
19626 },
19627 Lint {
19628 label: "clippy::duplicate_mod",
19629 description: r##"Checks for files that are included as modules multiple times."##,
19630 default_severity: Severity::Allow,
19631 warn_since: None,
19632 deny_since: None,
19633 },
19634 Lint {
19635 label: "clippy::duplicate_underscore_argument",
19636 description: r##"Checks for function arguments having the similar names
19637differing by an underscore."##,
19638 default_severity: Severity::Allow,
19639 warn_since: None,
19640 deny_since: None,
19641 },
19642 Lint {
19643 label: "clippy::duplicated_attributes",
19644 description: r##"Checks for attributes that appear two or more times."##,
19645 default_severity: Severity::Allow,
19646 warn_since: None,
19647 deny_since: None,
19648 },
19649 Lint {
19650 label: "clippy::duration_subsec",
19651 description: r##"Checks for calculation of subsecond microseconds or milliseconds
19652from other `Duration` methods."##,
19653 default_severity: Severity::Allow,
19654 warn_since: None,
19655 deny_since: None,
19656 },
19657 Lint {
19658 label: "clippy::eager_transmute",
19659 description: r##"Checks for integer validity checks, followed by a transmute that is (incorrectly) evaluated
19660eagerly (e.g. using `bool::then_some`)."##,
19661 default_severity: Severity::Allow,
19662 warn_since: None,
19663 deny_since: None,
19664 },
19665 Lint {
19666 label: "clippy::else_if_without_else",
19667 description: r##"Checks for usage of if expressions with an `else if` branch,
19668but without a final `else` branch."##,
19669 default_severity: Severity::Allow,
19670 warn_since: None,
19671 deny_since: None,
19672 },
19673 Lint {
19674 label: "clippy::empty_docs",
19675 description: r##"Detects documentation that is empty."##,
19676 default_severity: Severity::Allow,
19677 warn_since: None,
19678 deny_since: None,
19679 },
19680 Lint {
19681 label: "clippy::empty_drop",
19682 description: r##"Checks for empty `Drop` implementations."##,
19683 default_severity: Severity::Allow,
19684 warn_since: None,
19685 deny_since: None,
19686 },
19687 Lint {
19688 label: "clippy::empty_enum",
19689 description: r##"Checks for `enum`s with no variants, which therefore are uninhabited types
19690(cannot be instantiated).
19691
19692As of this writing, the `never_type` is still a nightly-only experimental API.
19693Therefore, this lint is only triggered if `#![feature(never_type)]` is enabled."##,
19694 default_severity: Severity::Allow,
19695 warn_since: None,
19696 deny_since: None,
19697 },
19698 Lint {
19699 label: "clippy::empty_enum_variants_with_brackets",
19700 description: r##"Finds enum variants without fields that are declared with empty brackets."##,
19701 default_severity: Severity::Allow,
19702 warn_since: None,
19703 deny_since: None,
19704 },
19705 Lint {
19706 label: "clippy::empty_line_after_doc_comments",
19707 description: r##"Checks for empty lines after doc comments."##,
19708 default_severity: Severity::Allow,
19709 warn_since: None,
19710 deny_since: None,
19711 },
19712 Lint {
19713 label: "clippy::empty_line_after_outer_attr",
19714 description: r##"Checks for empty lines after outer attributes"##,
19715 default_severity: Severity::Allow,
19716 warn_since: None,
19717 deny_since: None,
19718 },
19719 Lint {
19720 label: "clippy::empty_loop",
19721 description: r##"Checks for empty `loop` expressions."##,
19722 default_severity: Severity::Allow,
19723 warn_since: None,
19724 deny_since: None,
19725 },
19726 Lint {
19727 label: "clippy::empty_structs_with_brackets",
19728 description: r##"Finds structs without fields (a so-called empty struct) that are declared with brackets."##,
19729 default_severity: Severity::Allow,
19730 warn_since: None,
19731 deny_since: None,
19732 },
19733 Lint {
19734 label: "clippy::enum_clike_unportable_variant",
19735 description: r##"Checks for C-like enumerations that are
19736`repr(isize/usize)` and have values that don't fit into an `i32`."##,
19737 default_severity: Severity::Allow,
19738 warn_since: None,
19739 deny_since: None,
19740 },
19741 Lint {
19742 label: "clippy::enum_glob_use",
19743 description: r##"Checks for `use Enum::*`."##,
19744 default_severity: Severity::Allow,
19745 warn_since: None,
19746 deny_since: None,
19747 },
19748 Lint {
19749 label: "clippy::enum_variant_names",
19750 description: r##"Detects enumeration variants that are prefixed or suffixed
19751by the same characters."##,
19752 default_severity: Severity::Allow,
19753 warn_since: None,
19754 deny_since: None,
19755 },
19756 Lint {
19757 label: "clippy::eq_op",
19758 description: r##"Checks for equal operands to comparison, logical and
19759bitwise, difference and division binary operators (`==`, `>`, etc., `&&`,
19760`||`, `&`, `|`, `^`, `-` and `/`)."##,
19761 default_severity: Severity::Allow,
19762 warn_since: None,
19763 deny_since: None,
19764 },
19765 Lint {
19766 label: "clippy::equatable_if_let",
19767 description: r##"Checks for pattern matchings that can be expressed using equality."##,
19768 default_severity: Severity::Allow,
19769 warn_since: None,
19770 deny_since: None,
19771 },
19772 Lint {
19773 label: "clippy::erasing_op",
19774 description: r##"Checks for erasing operations, e.g., `x * 0`."##,
19775 default_severity: Severity::Allow,
19776 warn_since: None,
19777 deny_since: None,
19778 },
19779 Lint {
19780 label: "clippy::err_expect",
19781 description: r##"Checks for `.err().expect()` calls on the `Result` type."##,
19782 default_severity: Severity::Allow,
19783 warn_since: None,
19784 deny_since: None,
19785 },
19786 Lint {
19787 label: "clippy::error_impl_error",
19788 description: r##"Checks for types named `Error` that implement `Error`."##,
19789 default_severity: Severity::Allow,
19790 warn_since: None,
19791 deny_since: None,
19792 },
19793 Lint {
19794 label: "clippy::excessive_nesting",
19795 description: r##"Checks for blocks which are nested beyond a certain threshold.
19796
19797Note: Even though this lint is warn-by-default, it will only trigger if a maximum nesting level is defined in the clippy.toml file."##,
19798 default_severity: Severity::Allow,
19799 warn_since: None,
19800 deny_since: None,
19801 },
19802 Lint {
19803 label: "clippy::excessive_precision",
19804 description: r##"Checks for float literals with a precision greater
19805than that supported by the underlying type."##,
19806 default_severity: Severity::Allow,
19807 warn_since: None,
19808 deny_since: None,
19809 },
19810 Lint {
19811 label: "clippy::exhaustive_enums",
19812 description: r##"Warns on any exported `enum`s that are not tagged `#[non_exhaustive]`"##,
19813 default_severity: Severity::Allow,
19814 warn_since: None,
19815 deny_since: None,
19816 },
19817 Lint {
19818 label: "clippy::exhaustive_structs",
19819 description: r##"Warns on any exported `struct`s that are not tagged `#[non_exhaustive]`"##,
19820 default_severity: Severity::Allow,
19821 warn_since: None,
19822 deny_since: None,
19823 },
19824 Lint {
19825 label: "clippy::exit",
19826 description: r##"Detects calls to the `exit()` function which terminates the program."##,
19827 default_severity: Severity::Allow,
19828 warn_since: None,
19829 deny_since: None,
19830 },
19831 Lint {
19832 label: "clippy::expect_fun_call",
19833 description: r##"Checks for calls to `.expect(&format!(...))`, `.expect(foo(..))`,
19834etc., and suggests to use `unwrap_or_else` instead"##,
19835 default_severity: Severity::Allow,
19836 warn_since: None,
19837 deny_since: None,
19838 },
19839 Lint {
19840 label: "clippy::expect_used",
19841 description: r##"Checks for `.expect()` or `.expect_err()` calls on `Result`s and `.expect()` call on `Option`s."##,
19842 default_severity: Severity::Allow,
19843 warn_since: None,
19844 deny_since: None,
19845 },
19846 Lint {
19847 label: "clippy::expl_impl_clone_on_copy",
19848 description: r##"Checks for explicit `Clone` implementations for `Copy`
19849types."##,
19850 default_severity: Severity::Allow,
19851 warn_since: None,
19852 deny_since: None,
19853 },
19854 Lint {
19855 label: "clippy::explicit_auto_deref",
19856 description: r##"Checks for dereferencing expressions which would be covered by auto-deref."##,
19857 default_severity: Severity::Allow,
19858 warn_since: None,
19859 deny_since: None,
19860 },
19861 Lint {
19862 label: "clippy::explicit_counter_loop",
19863 description: r##"Checks `for` loops over slices with an explicit counter
19864and suggests the use of `.enumerate()`."##,
19865 default_severity: Severity::Allow,
19866 warn_since: None,
19867 deny_since: None,
19868 },
19869 Lint {
19870 label: "clippy::explicit_deref_methods",
19871 description: r##"Checks for explicit `deref()` or `deref_mut()` method calls."##,
19872 default_severity: Severity::Allow,
19873 warn_since: None,
19874 deny_since: None,
19875 },
19876 Lint {
19877 label: "clippy::explicit_into_iter_loop",
19878 description: r##"Checks for loops on `y.into_iter()` where `y` will do, and
19879suggests the latter."##,
19880 default_severity: Severity::Allow,
19881 warn_since: None,
19882 deny_since: None,
19883 },
19884 Lint {
19885 label: "clippy::explicit_iter_loop",
19886 description: r##"Checks for loops on `x.iter()` where `&x` will do, and
19887suggests the latter."##,
19888 default_severity: Severity::Allow,
19889 warn_since: None,
19890 deny_since: None,
19891 },
19892 Lint {
19893 label: "clippy::explicit_write",
19894 description: r##"Checks for usage of `write!()` / `writeln()!` which can be
19895replaced with `(e)print!()` / `(e)println!()`"##,
19896 default_severity: Severity::Allow,
19897 warn_since: None,
19898 deny_since: None,
19899 },
19900 Lint {
19901 label: "clippy::extend_from_slice",
19902 description: r##"Nothing. This lint has been deprecated"##,
19903 default_severity: Severity::Allow,
19904 warn_since: None,
19905 deny_since: None,
19906 },
19907 Lint {
19908 label: "clippy::extend_with_drain",
19909 description: r##"Checks for occurrences where one vector gets extended instead of append"##,
19910 default_severity: Severity::Allow,
19911 warn_since: None,
19912 deny_since: None,
19913 },
19914 Lint {
19915 label: "clippy::extra_unused_lifetimes",
19916 description: r##"Checks for lifetimes in generics that are never used
19917anywhere else."##,
19918 default_severity: Severity::Allow,
19919 warn_since: None,
19920 deny_since: None,
19921 },
19922 Lint {
19923 label: "clippy::extra_unused_type_parameters",
19924 description: r##"Checks for type parameters in generics that are never used anywhere else."##,
19925 default_severity: Severity::Allow,
19926 warn_since: None,
19927 deny_since: None,
19928 },
19929 Lint {
19930 label: "clippy::fallible_impl_from",
19931 description: r##"Checks for impls of `From<..>` that contain `panic!()` or `unwrap()`"##,
19932 default_severity: Severity::Allow,
19933 warn_since: None,
19934 deny_since: None,
19935 },
19936 Lint {
19937 label: "clippy::field_reassign_with_default",
19938 description: r##"Checks for immediate reassignment of fields initialized
19939with Default::default()."##,
19940 default_severity: Severity::Allow,
19941 warn_since: None,
19942 deny_since: None,
19943 },
19944 Lint {
19945 label: "clippy::field_scoped_visibility_modifiers",
19946 description: r##"Checks for usage of scoped visibility modifiers, like `pub(crate)`, on fields. These
19947make a field visible within a scope between public and private."##,
19948 default_severity: Severity::Allow,
19949 warn_since: None,
19950 deny_since: None,
19951 },
19952 Lint {
19953 label: "clippy::filetype_is_file",
19954 description: r##"Checks for `FileType::is_file()`."##,
19955 default_severity: Severity::Allow,
19956 warn_since: None,
19957 deny_since: None,
19958 },
19959 Lint {
19960 label: "clippy::filter_map_bool_then",
19961 description: r##"Checks for usage of `bool::then` in `Iterator::filter_map`."##,
19962 default_severity: Severity::Allow,
19963 warn_since: None,
19964 deny_since: None,
19965 },
19966 Lint {
19967 label: "clippy::filter_map_identity",
19968 description: r##"Checks for usage of `filter_map(|x| x)`."##,
19969 default_severity: Severity::Allow,
19970 warn_since: None,
19971 deny_since: None,
19972 },
19973 Lint {
19974 label: "clippy::filter_map_next",
19975 description: r##"Checks for usage of `_.filter_map(_).next()`."##,
19976 default_severity: Severity::Allow,
19977 warn_since: None,
19978 deny_since: None,
19979 },
19980 Lint {
19981 label: "clippy::filter_next",
19982 description: r##"Checks for usage of `_.filter(_).next()`."##,
19983 default_severity: Severity::Allow,
19984 warn_since: None,
19985 deny_since: None,
19986 },
19987 Lint {
19988 label: "clippy::flat_map_identity",
19989 description: r##"Checks for usage of `flat_map(|x| x)`."##,
19990 default_severity: Severity::Allow,
19991 warn_since: None,
19992 deny_since: None,
19993 },
19994 Lint {
19995 label: "clippy::flat_map_option",
19996 description: r##"Checks for usage of `Iterator::flat_map()` where `filter_map()` could be
19997used instead."##,
19998 default_severity: Severity::Allow,
19999 warn_since: None,
20000 deny_since: None,
20001 },
20002 Lint {
20003 label: "clippy::float_arithmetic",
20004 description: r##"Checks for float arithmetic."##,
20005 default_severity: Severity::Allow,
20006 warn_since: None,
20007 deny_since: None,
20008 },
20009 Lint {
20010 label: "clippy::float_cmp",
20011 description: r##"Checks for (in-)equality comparisons on floating-point
20012values (apart from zero), except in functions called `*eq*` (which probably
20013implement equality for a type involving floats)."##,
20014 default_severity: Severity::Allow,
20015 warn_since: None,
20016 deny_since: None,
20017 },
20018 Lint {
20019 label: "clippy::float_cmp_const",
20020 description: r##"Checks for (in-)equality comparisons on constant floating-point
20021values (apart from zero), except in functions called `*eq*` (which probably
20022implement equality for a type involving floats)."##,
20023 default_severity: Severity::Allow,
20024 warn_since: None,
20025 deny_since: None,
20026 },
20027 Lint {
20028 label: "clippy::float_equality_without_abs",
20029 description: r##"Checks for statements of the form `(a - b) < f32::EPSILON` or
20030`(a - b) < f64::EPSILON`. Notes the missing `.abs()`."##,
20031 default_severity: Severity::Allow,
20032 warn_since: None,
20033 deny_since: None,
20034 },
20035 Lint {
20036 label: "clippy::fn_address_comparisons",
20037 description: r##"Checks for comparisons with an address of a function item."##,
20038 default_severity: Severity::Allow,
20039 warn_since: None,
20040 deny_since: None,
20041 },
20042 Lint {
20043 label: "clippy::fn_params_excessive_bools",
20044 description: r##"Checks for excessive use of
20045bools in function definitions."##,
20046 default_severity: Severity::Allow,
20047 warn_since: None,
20048 deny_since: None,
20049 },
20050 Lint {
20051 label: "clippy::fn_to_numeric_cast",
20052 description: r##"Checks for casts of function pointers to something other than `usize`."##,
20053 default_severity: Severity::Allow,
20054 warn_since: None,
20055 deny_since: None,
20056 },
20057 Lint {
20058 label: "clippy::fn_to_numeric_cast_any",
20059 description: r##"Checks for casts of a function pointer to any integer type."##,
20060 default_severity: Severity::Allow,
20061 warn_since: None,
20062 deny_since: None,
20063 },
20064 Lint {
20065 label: "clippy::fn_to_numeric_cast_with_truncation",
20066 description: r##"Checks for casts of a function pointer to a numeric type not wide enough to
20067store an address."##,
20068 default_severity: Severity::Allow,
20069 warn_since: None,
20070 deny_since: None,
20071 },
20072 Lint {
20073 label: "clippy::for_kv_map",
20074 description: r##"Checks for iterating a map (`HashMap` or `BTreeMap`) and
20075ignoring either the keys or values."##,
20076 default_severity: Severity::Allow,
20077 warn_since: None,
20078 deny_since: None,
20079 },
20080 Lint {
20081 label: "clippy::forget_non_drop",
20082 description: r##"Checks for calls to `std::mem::forget` with a value that does not implement `Drop`."##,
20083 default_severity: Severity::Allow,
20084 warn_since: None,
20085 deny_since: None,
20086 },
20087 Lint {
20088 label: "clippy::format_collect",
20089 description: r##"Checks for usage of `.map(|_| format!(..)).collect::<String>()`."##,
20090 default_severity: Severity::Allow,
20091 warn_since: None,
20092 deny_since: None,
20093 },
20094 Lint {
20095 label: "clippy::format_in_format_args",
20096 description: r##"Detects `format!` within the arguments of another macro that does
20097formatting such as `format!` itself, `write!` or `println!`. Suggests
20098inlining the `format!` call."##,
20099 default_severity: Severity::Allow,
20100 warn_since: None,
20101 deny_since: None,
20102 },
20103 Lint {
20104 label: "clippy::format_push_string",
20105 description: r##"Detects cases where the result of a `format!` call is
20106appended to an existing `String`."##,
20107 default_severity: Severity::Allow,
20108 warn_since: None,
20109 deny_since: None,
20110 },
20111 Lint {
20112 label: "clippy::four_forward_slashes",
20113 description: r##"Checks for outer doc comments written with 4 forward slashes (`////`)."##,
20114 default_severity: Severity::Allow,
20115 warn_since: None,
20116 deny_since: None,
20117 },
20118 Lint {
20119 label: "clippy::from_iter_instead_of_collect",
20120 description: r##"Checks for `from_iter()` function calls on types that implement the `FromIterator`
20121trait."##,
20122 default_severity: Severity::Allow,
20123 warn_since: None,
20124 deny_since: None,
20125 },
20126 Lint {
20127 label: "clippy::from_over_into",
20128 description: r##"Searches for implementations of the `Into<..>` trait and suggests to implement `From<..>` instead."##,
20129 default_severity: Severity::Allow,
20130 warn_since: None,
20131 deny_since: None,
20132 },
20133 Lint {
20134 label: "clippy::from_raw_with_void_ptr",
20135 description: r##"Checks if we're passing a `c_void` raw pointer to `{Box,Rc,Arc,Weak}::from_raw(_)`"##,
20136 default_severity: Severity::Allow,
20137 warn_since: None,
20138 deny_since: None,
20139 },
20140 Lint {
20141 label: "clippy::from_str_radix_10",
20142 description: r##"Checks for function invocations of the form `primitive::from_str_radix(s, 10)`"##,
20143 default_severity: Severity::Allow,
20144 warn_since: None,
20145 deny_since: None,
20146 },
20147 Lint {
20148 label: "clippy::future_not_send",
20149 description: r##"This lint requires Future implementations returned from
20150functions and methods to implement the `Send` marker trait. It is mostly
20151used by library authors (public and internal) that target an audience where
20152multithreaded executors are likely to be used for running these Futures."##,
20153 default_severity: Severity::Allow,
20154 warn_since: None,
20155 deny_since: None,
20156 },
20157 Lint {
20158 label: "clippy::get_first",
20159 description: r##"Checks for usage of `x.get(0)` instead of
20160`x.first()` or `x.front()`."##,
20161 default_severity: Severity::Allow,
20162 warn_since: None,
20163 deny_since: None,
20164 },
20165 Lint {
20166 label: "clippy::get_last_with_len",
20167 description: r##"Checks for usage of `x.get(x.len() - 1)` instead of
20168`x.last()`."##,
20169 default_severity: Severity::Allow,
20170 warn_since: None,
20171 deny_since: None,
20172 },
20173 Lint {
20174 label: "clippy::get_unwrap",
20175 description: r##"Checks for usage of `.get().unwrap()` (or
20176`.get_mut().unwrap`) on a standard library type which implements `Index`"##,
20177 default_severity: Severity::Allow,
20178 warn_since: None,
20179 deny_since: None,
20180 },
20181 Lint {
20182 label: "clippy::host_endian_bytes",
20183 description: r##"Checks for the usage of the `to_ne_bytes` method and/or the function `from_ne_bytes`."##,
20184 default_severity: Severity::Allow,
20185 warn_since: None,
20186 deny_since: None,
20187 },
20188 Lint {
20189 label: "clippy::identity_op",
20190 description: r##"Checks for identity operations, e.g., `x + 0`."##,
20191 default_severity: Severity::Allow,
20192 warn_since: None,
20193 deny_since: None,
20194 },
20195 Lint {
20196 label: "clippy::if_let_mutex",
20197 description: r##"Checks for `Mutex::lock` calls in `if let` expression
20198with lock calls in any of the else blocks."##,
20199 default_severity: Severity::Allow,
20200 warn_since: None,
20201 deny_since: None,
20202 },
20203 Lint {
20204 label: "clippy::if_not_else",
20205 description: r##"Checks for usage of `!` or `!=` in an if condition with an
20206else branch."##,
20207 default_severity: Severity::Allow,
20208 warn_since: None,
20209 deny_since: None,
20210 },
20211 Lint {
20212 label: "clippy::if_same_then_else",
20213 description: r##"Checks for `if/else` with the same body as the *then* part
20214and the *else* part."##,
20215 default_severity: Severity::Allow,
20216 warn_since: None,
20217 deny_since: None,
20218 },
20219 Lint {
20220 label: "clippy::if_then_some_else_none",
20221 description: r##"Checks for if-else that could be written using either `bool::then` or `bool::then_some`."##,
20222 default_severity: Severity::Allow,
20223 warn_since: None,
20224 deny_since: None,
20225 },
20226 Lint {
20227 label: "clippy::ifs_same_cond",
20228 description: r##"Checks for consecutive `if`s with the same condition."##,
20229 default_severity: Severity::Allow,
20230 warn_since: None,
20231 deny_since: None,
20232 },
20233 Lint {
20234 label: "clippy::ignored_unit_patterns",
20235 description: r##"Checks for usage of `_` in patterns of type `()`."##,
20236 default_severity: Severity::Allow,
20237 warn_since: None,
20238 deny_since: None,
20239 },
20240 Lint {
20241 label: "clippy::impl_hash_borrow_with_str_and_bytes",
20242 description: r##"This lint is concerned with the semantics of `Borrow` and `Hash` for a
20243type that implements all three of `Hash`, `Borrow<str>` and `Borrow<[u8]>`
20244as it is impossible to satisfy the semantics of Borrow and `Hash` for
20245both `Borrow<str>` and `Borrow<[u8]>`."##,
20246 default_severity: Severity::Allow,
20247 warn_since: None,
20248 deny_since: None,
20249 },
20250 Lint {
20251 label: "clippy::impl_trait_in_params",
20252 description: r##"Lints when `impl Trait` is being used in a function's parameters."##,
20253 default_severity: Severity::Allow,
20254 warn_since: None,
20255 deny_since: None,
20256 },
20257 Lint {
20258 label: "clippy::implicit_clone",
20259 description: r##"Checks for the usage of `_.to_owned()`, `vec.to_vec()`, or similar when calling `_.clone()` would be clearer."##,
20260 default_severity: Severity::Allow,
20261 warn_since: None,
20262 deny_since: None,
20263 },
20264 Lint {
20265 label: "clippy::implicit_hasher",
20266 description: r##"Checks for public `impl` or `fn` missing generalization
20267over different hashers and implicitly defaulting to the default hashing
20268algorithm (`SipHash`)."##,
20269 default_severity: Severity::Allow,
20270 warn_since: None,
20271 deny_since: None,
20272 },
20273 Lint {
20274 label: "clippy::implicit_return",
20275 description: r##"Checks for missing return statements at the end of a block."##,
20276 default_severity: Severity::Allow,
20277 warn_since: None,
20278 deny_since: None,
20279 },
20280 Lint {
20281 label: "clippy::implicit_saturating_add",
20282 description: r##"Checks for implicit saturating addition."##,
20283 default_severity: Severity::Allow,
20284 warn_since: None,
20285 deny_since: None,
20286 },
20287 Lint {
20288 label: "clippy::implicit_saturating_sub",
20289 description: r##"Checks for implicit saturating subtraction."##,
20290 default_severity: Severity::Allow,
20291 warn_since: None,
20292 deny_since: None,
20293 },
20294 Lint {
20295 label: "clippy::implied_bounds_in_impls",
20296 description: r##"Looks for bounds in `impl Trait` in return position that are implied by other bounds.
20297This can happen when a trait is specified that another trait already has as a supertrait
20298(e.g. `fn() -> impl Deref + DerefMut<Target = i32>` has an unnecessary `Deref` bound,
20299because `Deref` is a supertrait of `DerefMut`)"##,
20300 default_severity: Severity::Allow,
20301 warn_since: None,
20302 deny_since: None,
20303 },
20304 Lint {
20305 label: "clippy::impossible_comparisons",
20306 description: r##"Checks for double comparisons that can never succeed"##,
20307 default_severity: Severity::Allow,
20308 warn_since: None,
20309 deny_since: None,
20310 },
20311 Lint {
20312 label: "clippy::imprecise_flops",
20313 description: r##"Looks for floating-point expressions that
20314can be expressed using built-in methods to improve accuracy
20315at the cost of performance."##,
20316 default_severity: Severity::Allow,
20317 warn_since: None,
20318 deny_since: None,
20319 },
20320 Lint {
20321 label: "clippy::incompatible_msrv",
20322 description: r##"This lint checks that no function newer than the defined MSRV (minimum
20323supported rust version) is used in the crate."##,
20324 default_severity: Severity::Allow,
20325 warn_since: None,
20326 deny_since: None,
20327 },
20328 Lint {
20329 label: "clippy::inconsistent_digit_grouping",
20330 description: r##"Warns if an integral or floating-point constant is
20331grouped inconsistently with underscores."##,
20332 default_severity: Severity::Allow,
20333 warn_since: None,
20334 deny_since: None,
20335 },
20336 Lint {
20337 label: "clippy::inconsistent_struct_constructor",
20338 description: r##"Checks for struct constructors where all fields are shorthand and
20339the order of the field init shorthand in the constructor is inconsistent
20340with the order in the struct definition."##,
20341 default_severity: Severity::Allow,
20342 warn_since: None,
20343 deny_since: None,
20344 },
20345 Lint {
20346 label: "clippy::index_refutable_slice",
20347 description: r##"The lint checks for slice bindings in patterns that are only used to
20348access individual slice values."##,
20349 default_severity: Severity::Allow,
20350 warn_since: None,
20351 deny_since: None,
20352 },
20353 Lint {
20354 label: "clippy::indexing_slicing",
20355 description: r##"Checks for usage of indexing or slicing. Arrays are special cases, this lint
20356does report on arrays if we can tell that slicing operations are in bounds and does not
20357lint on constant `usize` indexing on arrays because that is handled by rustc's `const_err` lint."##,
20358 default_severity: Severity::Allow,
20359 warn_since: None,
20360 deny_since: None,
20361 },
20362 Lint {
20363 label: "clippy::ineffective_bit_mask",
20364 description: r##"Checks for bit masks in comparisons which can be removed
20365without changing the outcome. The basic structure can be seen in the
20366following table:
20367
20368|Comparison| Bit Op |Example |equals |
20369|----------|----------|------------|-------|
20370|`>` / `<=`|`\\|` / `^`|`x \\| 2 > 3`|`x > 3`|
20371|`<` / `>=`|`\\|` / `^`|`x ^ 1 < 4` |`x < 4`|"##,
20372 default_severity: Severity::Allow,
20373 warn_since: None,
20374 deny_since: None,
20375 },
20376 Lint {
20377 label: "clippy::ineffective_open_options",
20378 description: r##"Checks if both `.write(true)` and `.append(true)` methods are called
20379on a same `OpenOptions`."##,
20380 default_severity: Severity::Allow,
20381 warn_since: None,
20382 deny_since: None,
20383 },
20384 Lint {
20385 label: "clippy::inefficient_to_string",
20386 description: r##"Checks for usage of `.to_string()` on an `&&T` where
20387`T` implements `ToString` directly (like `&&str` or `&&String`)."##,
20388 default_severity: Severity::Allow,
20389 warn_since: None,
20390 deny_since: None,
20391 },
20392 Lint {
20393 label: "clippy::infallible_destructuring_match",
20394 description: r##"Checks for matches being used to destructure a single-variant enum
20395or tuple struct where a `let` will suffice."##,
20396 default_severity: Severity::Allow,
20397 warn_since: None,
20398 deny_since: None,
20399 },
20400 Lint {
20401 label: "clippy::infinite_iter",
20402 description: r##"Checks for iteration that is guaranteed to be infinite."##,
20403 default_severity: Severity::Allow,
20404 warn_since: None,
20405 deny_since: None,
20406 },
20407 Lint {
20408 label: "clippy::infinite_loop",
20409 description: r##"Checks for infinite loops in a function where the return type is not `!`
20410and lint accordingly."##,
20411 default_severity: Severity::Allow,
20412 warn_since: None,
20413 deny_since: None,
20414 },
20415 Lint {
20416 label: "clippy::inherent_to_string",
20417 description: r##"Checks for the definition of inherent methods with a signature of `to_string(&self) -> String`."##,
20418 default_severity: Severity::Allow,
20419 warn_since: None,
20420 deny_since: None,
20421 },
20422 Lint {
20423 label: "clippy::inherent_to_string_shadow_display",
20424 description: r##"Checks for the definition of inherent methods with a signature of `to_string(&self) -> String` and if the type implementing this method also implements the `Display` trait."##,
20425 default_severity: Severity::Allow,
20426 warn_since: None,
20427 deny_since: None,
20428 },
20429 Lint {
20430 label: "clippy::init_numbered_fields",
20431 description: r##"Checks for tuple structs initialized with field syntax.
20432It will however not lint if a base initializer is present.
20433The lint will also ignore code in macros."##,
20434 default_severity: Severity::Allow,
20435 warn_since: None,
20436 deny_since: None,
20437 },
20438 Lint {
20439 label: "clippy::inline_always",
20440 description: r##"Checks for items annotated with `#[inline(always)]`,
20441unless the annotated function is empty or simply panics."##,
20442 default_severity: Severity::Allow,
20443 warn_since: None,
20444 deny_since: None,
20445 },
20446 Lint {
20447 label: "clippy::inline_asm_x86_att_syntax",
20448 description: r##"Checks for usage of AT&T x86 assembly syntax."##,
20449 default_severity: Severity::Allow,
20450 warn_since: None,
20451 deny_since: None,
20452 },
20453 Lint {
20454 label: "clippy::inline_asm_x86_intel_syntax",
20455 description: r##"Checks for usage of Intel x86 assembly syntax."##,
20456 default_severity: Severity::Allow,
20457 warn_since: None,
20458 deny_since: None,
20459 },
20460 Lint {
20461 label: "clippy::inline_fn_without_body",
20462 description: r##"Checks for `#[inline]` on trait methods without bodies"##,
20463 default_severity: Severity::Allow,
20464 warn_since: None,
20465 deny_since: None,
20466 },
20467 Lint {
20468 label: "clippy::inspect_for_each",
20469 description: r##"Checks for usage of `inspect().for_each()`."##,
20470 default_severity: Severity::Allow,
20471 warn_since: None,
20472 deny_since: None,
20473 },
20474 Lint {
20475 label: "clippy::int_plus_one",
20476 description: r##"Checks for usage of `x >= y + 1` or `x - 1 >= y` (and `<=`) in a block"##,
20477 default_severity: Severity::Allow,
20478 warn_since: None,
20479 deny_since: None,
20480 },
20481 Lint {
20482 label: "clippy::integer_division",
20483 description: r##"Checks for division of integers"##,
20484 default_severity: Severity::Allow,
20485 warn_since: None,
20486 deny_since: None,
20487 },
20488 Lint {
20489 label: "clippy::integer_division_remainder_used",
20490 description: r##"Checks for the usage of division (`/`) and remainder (`%`) operations
20491when performed on any integer types using the default `Div` and `Rem` trait implementations."##,
20492 default_severity: Severity::Allow,
20493 warn_since: None,
20494 deny_since: None,
20495 },
20496 Lint {
20497 label: "clippy::into_iter_on_ref",
20498 description: r##"Checks for `into_iter` calls on references which should be replaced by `iter`
20499or `iter_mut`."##,
20500 default_severity: Severity::Allow,
20501 warn_since: None,
20502 deny_since: None,
20503 },
20504 Lint {
20505 label: "clippy::into_iter_without_iter",
20506 description: r##"This is the opposite of the `iter_without_into_iter` lint.
20507It looks for `IntoIterator for (&|&mut) Type` implementations without an inherent `iter` or `iter_mut` method
20508on the type or on any of the types in its `Deref` chain."##,
20509 default_severity: Severity::Allow,
20510 warn_since: None,
20511 deny_since: None,
20512 },
20513 Lint {
20514 label: "clippy::invalid_null_ptr_usage",
20515 description: r##"This lint checks for invalid usages of `ptr::null`."##,
20516 default_severity: Severity::Allow,
20517 warn_since: None,
20518 deny_since: None,
20519 },
20520 Lint {
20521 label: "clippy::invalid_regex",
20522 description: r##"Checks [regex](https://crates.io/crates/regex) creation
20523(with `Regex::new`, `RegexBuilder::new`, or `RegexSet::new`) for correct
20524regex syntax."##,
20525 default_severity: Severity::Allow,
20526 warn_since: None,
20527 deny_since: None,
20528 },
20529 Lint {
20530 label: "clippy::invalid_upcast_comparisons",
20531 description: r##"Checks for comparisons where the relation is always either
20532true or false, but where one side has been upcast so that the comparison is
20533necessary. Only integer types are checked."##,
20534 default_severity: Severity::Allow,
20535 warn_since: None,
20536 deny_since: None,
20537 },
20538 Lint {
20539 label: "clippy::inverted_saturating_sub",
20540 description: r##"Checks for comparisons between integers, followed by subtracting the greater value from the
20541lower one."##,
20542 default_severity: Severity::Allow,
20543 warn_since: None,
20544 deny_since: None,
20545 },
20546 Lint {
20547 label: "clippy::invisible_characters",
20548 description: r##"Checks for invisible Unicode characters in the code."##,
20549 default_severity: Severity::Allow,
20550 warn_since: None,
20551 deny_since: None,
20552 },
20553 Lint {
20554 label: "clippy::is_digit_ascii_radix",
20555 description: r##"Finds usages of [`char::is_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_digit) that
20556can be replaced with [`is_ascii_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_ascii_digit) or
20557[`is_ascii_hexdigit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_ascii_hexdigit)."##,
20558 default_severity: Severity::Allow,
20559 warn_since: None,
20560 deny_since: None,
20561 },
20562 Lint {
20563 label: "clippy::items_after_statements",
20564 description: r##"Checks for items declared after some statement in a block."##,
20565 default_severity: Severity::Allow,
20566 warn_since: None,
20567 deny_since: None,
20568 },
20569 Lint {
20570 label: "clippy::items_after_test_module",
20571 description: r##"Triggers if an item is declared after the testing module marked with `#[cfg(test)]`."##,
20572 default_severity: Severity::Allow,
20573 warn_since: None,
20574 deny_since: None,
20575 },
20576 Lint {
20577 label: "clippy::iter_cloned_collect",
20578 description: r##"Checks for the use of `.cloned().collect()` on slice to
20579create a `Vec`."##,
20580 default_severity: Severity::Allow,
20581 warn_since: None,
20582 deny_since: None,
20583 },
20584 Lint {
20585 label: "clippy::iter_count",
20586 description: r##"Checks for the use of `.iter().count()`."##,
20587 default_severity: Severity::Allow,
20588 warn_since: None,
20589 deny_since: None,
20590 },
20591 Lint {
20592 label: "clippy::iter_filter_is_ok",
20593 description: r##"Checks for usage of `.filter(Result::is_ok)` that may be replaced with a `.flatten()` call.
20594This lint will require additional changes to the follow-up calls as it affects the type."##,
20595 default_severity: Severity::Allow,
20596 warn_since: None,
20597 deny_since: None,
20598 },
20599 Lint {
20600 label: "clippy::iter_filter_is_some",
20601 description: r##"Checks for usage of `.filter(Option::is_some)` that may be replaced with a `.flatten()` call.
20602This lint will require additional changes to the follow-up calls as it affects the type."##,
20603 default_severity: Severity::Allow,
20604 warn_since: None,
20605 deny_since: None,
20606 },
20607 Lint {
20608 label: "clippy::iter_kv_map",
20609 description: r##"Checks for iterating a map (`HashMap` or `BTreeMap`) and
20610ignoring either the keys or values."##,
20611 default_severity: Severity::Allow,
20612 warn_since: None,
20613 deny_since: None,
20614 },
20615 Lint {
20616 label: "clippy::iter_next_loop",
20617 description: r##"Checks for loops on `x.next()`."##,
20618 default_severity: Severity::Allow,
20619 warn_since: None,
20620 deny_since: None,
20621 },
20622 Lint {
20623 label: "clippy::iter_next_slice",
20624 description: r##"Checks for usage of `iter().next()` on a Slice or an Array"##,
20625 default_severity: Severity::Allow,
20626 warn_since: None,
20627 deny_since: None,
20628 },
20629 Lint {
20630 label: "clippy::iter_not_returning_iterator",
20631 description: r##"Detects methods named `iter` or `iter_mut` that do not have a return type that implements `Iterator`."##,
20632 default_severity: Severity::Allow,
20633 warn_since: None,
20634 deny_since: None,
20635 },
20636 Lint {
20637 label: "clippy::iter_nth",
20638 description: r##"Checks for usage of `.iter().nth()`/`.iter_mut().nth()` on standard library types that have
20639equivalent `.get()`/`.get_mut()` methods."##,
20640 default_severity: Severity::Allow,
20641 warn_since: None,
20642 deny_since: None,
20643 },
20644 Lint {
20645 label: "clippy::iter_nth_zero",
20646 description: r##"Checks for the use of `iter.nth(0)`."##,
20647 default_severity: Severity::Allow,
20648 warn_since: None,
20649 deny_since: None,
20650 },
20651 Lint {
20652 label: "clippy::iter_on_empty_collections",
20653 description: r##"Checks for calls to `iter`, `iter_mut` or `into_iter` on empty collections"##,
20654 default_severity: Severity::Allow,
20655 warn_since: None,
20656 deny_since: None,
20657 },
20658 Lint {
20659 label: "clippy::iter_on_single_items",
20660 description: r##"Checks for calls to `iter`, `iter_mut` or `into_iter` on collections containing a single item"##,
20661 default_severity: Severity::Allow,
20662 warn_since: None,
20663 deny_since: None,
20664 },
20665 Lint {
20666 label: "clippy::iter_out_of_bounds",
20667 description: r##"Looks for iterator combinator calls such as `.take(x)` or `.skip(x)`
20668where `x` is greater than the amount of items that an iterator will produce."##,
20669 default_severity: Severity::Allow,
20670 warn_since: None,
20671 deny_since: None,
20672 },
20673 Lint {
20674 label: "clippy::iter_over_hash_type",
20675 description: r##"This is a restriction lint which prevents the use of hash types (i.e., `HashSet` and `HashMap`) in for loops."##,
20676 default_severity: Severity::Allow,
20677 warn_since: None,
20678 deny_since: None,
20679 },
20680 Lint {
20681 label: "clippy::iter_overeager_cloned",
20682 description: r##"Checks for usage of `_.cloned().<func>()` where call to `.cloned()` can be postponed."##,
20683 default_severity: Severity::Allow,
20684 warn_since: None,
20685 deny_since: None,
20686 },
20687 Lint {
20688 label: "clippy::iter_skip_next",
20689 description: r##"Checks for usage of `.skip(x).next()` on iterators."##,
20690 default_severity: Severity::Allow,
20691 warn_since: None,
20692 deny_since: None,
20693 },
20694 Lint {
20695 label: "clippy::iter_skip_zero",
20696 description: r##"Checks for usage of `.skip(0)` on iterators."##,
20697 default_severity: Severity::Allow,
20698 warn_since: None,
20699 deny_since: None,
20700 },
20701 Lint {
20702 label: "clippy::iter_with_drain",
20703 description: r##"Checks for usage of `.drain(..)` on `Vec` and `VecDeque` for iteration."##,
20704 default_severity: Severity::Allow,
20705 warn_since: None,
20706 deny_since: None,
20707 },
20708 Lint {
20709 label: "clippy::iter_without_into_iter",
20710 description: r##"Looks for `iter` and `iter_mut` methods without an associated `IntoIterator for (&|&mut) Type` implementation."##,
20711 default_severity: Severity::Allow,
20712 warn_since: None,
20713 deny_since: None,
20714 },
20715 Lint {
20716 label: "clippy::iterator_step_by_zero",
20717 description: r##"Checks for calling `.step_by(0)` on iterators which panics."##,
20718 default_severity: Severity::Allow,
20719 warn_since: None,
20720 deny_since: None,
20721 },
20722 Lint {
20723 label: "clippy::join_absolute_paths",
20724 description: r##"Checks for calls to `Path::join` that start with a path separator (`\\\\` or `/`)."##,
20725 default_severity: Severity::Allow,
20726 warn_since: None,
20727 deny_since: None,
20728 },
20729 Lint {
20730 label: "clippy::just_underscores_and_digits",
20731 description: r##"Checks if you have variables whose name consists of just
20732underscores and digits."##,
20733 default_severity: Severity::Allow,
20734 warn_since: None,
20735 deny_since: None,
20736 },
20737 Lint {
20738 label: "clippy::large_const_arrays",
20739 description: r##"Checks for large `const` arrays that should
20740be defined as `static` instead."##,
20741 default_severity: Severity::Allow,
20742 warn_since: None,
20743 deny_since: None,
20744 },
20745 Lint {
20746 label: "clippy::large_digit_groups",
20747 description: r##"Warns if the digits of an integral or floating-point
20748constant are grouped into groups that
20749are too large."##,
20750 default_severity: Severity::Allow,
20751 warn_since: None,
20752 deny_since: None,
20753 },
20754 Lint {
20755 label: "clippy::large_enum_variant",
20756 description: r##"Checks for large size differences between variants on
20757`enum`s."##,
20758 default_severity: Severity::Allow,
20759 warn_since: None,
20760 deny_since: None,
20761 },
20762 Lint {
20763 label: "clippy::large_futures",
20764 description: r##"It checks for the size of a `Future` created by `async fn` or `async {}`."##,
20765 default_severity: Severity::Allow,
20766 warn_since: None,
20767 deny_since: None,
20768 },
20769 Lint {
20770 label: "clippy::large_include_file",
20771 description: r##"Checks for the inclusion of large files via `include_bytes!()`
20772or `include_str!()`."##,
20773 default_severity: Severity::Allow,
20774 warn_since: None,
20775 deny_since: None,
20776 },
20777 Lint {
20778 label: "clippy::large_stack_arrays",
20779 description: r##"Checks for local arrays that may be too large."##,
20780 default_severity: Severity::Allow,
20781 warn_since: None,
20782 deny_since: None,
20783 },
20784 Lint {
20785 label: "clippy::large_stack_frames",
20786 description: r##"Checks for functions that use a lot of stack space.
20787
20788This often happens when constructing a large type, such as an array with a lot of elements,
20789or constructing *many* smaller-but-still-large structs, or copying around a lot of large types.
20790
20791This lint is a more general version of [`large_stack_arrays`](https://rust-lang.github.io/rust-clippy/master/#large_stack_arrays)
20792that is intended to look at functions as a whole instead of only individual array expressions inside of a function."##,
20793 default_severity: Severity::Allow,
20794 warn_since: None,
20795 deny_since: None,
20796 },
20797 Lint {
20798 label: "clippy::large_types_passed_by_value",
20799 description: r##"Checks for functions taking arguments by value, where
20800the argument type is `Copy` and large enough to be worth considering
20801passing by reference. Does not trigger if the function is being exported,
20802because that might induce API breakage, if the parameter is declared as mutable,
20803or if the argument is a `self`."##,
20804 default_severity: Severity::Allow,
20805 warn_since: None,
20806 deny_since: None,
20807 },
20808 Lint {
20809 label: "clippy::legacy_numeric_constants",
20810 description: r##"Checks for usage of `<integer>::max_value()`, `std::<integer>::MAX`,
20811`std::<float>::EPSILON`, etc."##,
20812 default_severity: Severity::Allow,
20813 warn_since: None,
20814 deny_since: None,
20815 },
20816 Lint {
20817 label: "clippy::len_without_is_empty",
20818 description: r##"Checks for items that implement `.len()` but not
20819`.is_empty()`."##,
20820 default_severity: Severity::Allow,
20821 warn_since: None,
20822 deny_since: None,
20823 },
20824 Lint {
20825 label: "clippy::len_zero",
20826 description: r##"Checks for getting the length of something via `.len()`
20827just to compare to zero, and suggests using `.is_empty()` where applicable."##,
20828 default_severity: Severity::Allow,
20829 warn_since: None,
20830 deny_since: None,
20831 },
20832 Lint {
20833 label: "clippy::let_and_return",
20834 description: r##"Checks for `let`-bindings, which are subsequently
20835returned."##,
20836 default_severity: Severity::Allow,
20837 warn_since: None,
20838 deny_since: None,
20839 },
20840 Lint {
20841 label: "clippy::let_underscore_future",
20842 description: r##"Checks for `let _ = <expr>` where the resulting type of expr implements `Future`"##,
20843 default_severity: Severity::Allow,
20844 warn_since: None,
20845 deny_since: None,
20846 },
20847 Lint {
20848 label: "clippy::let_underscore_lock",
20849 description: r##"Checks for `let _ = sync_lock`. This supports `mutex` and `rwlock` in
20850`parking_lot`. For `std` locks see the `rustc` lint
20851[`let_underscore_lock`](https://doc.rust-lang.org/nightly/rustc/lints/listing/deny-by-default.html#let-underscore-lock)"##,
20852 default_severity: Severity::Allow,
20853 warn_since: None,
20854 deny_since: None,
20855 },
20856 Lint {
20857 label: "clippy::let_underscore_must_use",
20858 description: r##"Checks for `let _ = <expr>` where expr is `#[must_use]`"##,
20859 default_severity: Severity::Allow,
20860 warn_since: None,
20861 deny_since: None,
20862 },
20863 Lint {
20864 label: "clippy::let_underscore_untyped",
20865 description: r##"Checks for `let _ = <expr>` without a type annotation, and suggests to either provide one,
20866or remove the `let` keyword altogether."##,
20867 default_severity: Severity::Allow,
20868 warn_since: None,
20869 deny_since: None,
20870 },
20871 Lint {
20872 label: "clippy::let_unit_value",
20873 description: r##"Checks for binding a unit value."##,
20874 default_severity: Severity::Allow,
20875 warn_since: None,
20876 deny_since: None,
20877 },
20878 Lint {
20879 label: "clippy::let_with_type_underscore",
20880 description: r##"Detects when a variable is declared with an explicit type of `_`."##,
20881 default_severity: Severity::Allow,
20882 warn_since: None,
20883 deny_since: None,
20884 },
20885 Lint {
20886 label: "clippy::lines_filter_map_ok",
20887 description: r##"Checks for usage of `lines.filter_map(Result::ok)` or `lines.flat_map(Result::ok)`
20888when `lines` has type `std::io::Lines`."##,
20889 default_severity: Severity::Allow,
20890 warn_since: None,
20891 deny_since: None,
20892 },
20893 Lint {
20894 label: "clippy::linkedlist",
20895 description: r##"Checks for usage of any `LinkedList`, suggesting to use a
20896`Vec` or a `VecDeque` (formerly called `RingBuf`)."##,
20897 default_severity: Severity::Allow,
20898 warn_since: None,
20899 deny_since: None,
20900 },
20901 Lint {
20902 label: "clippy::lint_groups_priority",
20903 description: r##"Checks for lint groups with the same priority as lints in the `Cargo.toml`
20904[`[lints]` table](https://doc.rust-lang.org/cargo/reference/manifest.html#the-lints-section).
20905
20906This lint will be removed once [cargo#12918](https://github.com/rust-lang/cargo/issues/12918)
20907is resolved."##,
20908 default_severity: Severity::Allow,
20909 warn_since: None,
20910 deny_since: None,
20911 },
20912 Lint {
20913 label: "clippy::little_endian_bytes",
20914 description: r##"Checks for the usage of the `to_le_bytes` method and/or the function `from_le_bytes`."##,
20915 default_severity: Severity::Allow,
20916 warn_since: None,
20917 deny_since: None,
20918 },
20919 Lint {
20920 label: "clippy::lossy_float_literal",
20921 description: r##"Checks for whole number float literals that
20922cannot be represented as the underlying type without loss."##,
20923 default_severity: Severity::Allow,
20924 warn_since: None,
20925 deny_since: None,
20926 },
20927 Lint {
20928 label: "clippy::macro_metavars_in_unsafe",
20929 description: r##"Looks for macros that expand metavariables in an unsafe block."##,
20930 default_severity: Severity::Allow,
20931 warn_since: None,
20932 deny_since: None,
20933 },
20934 Lint {
20935 label: "clippy::macro_use_imports",
20936 description: r##"Checks for `#[macro_use] use...`."##,
20937 default_severity: Severity::Allow,
20938 warn_since: None,
20939 deny_since: None,
20940 },
20941 Lint {
20942 label: "clippy::main_recursion",
20943 description: r##"Checks for recursion using the entrypoint."##,
20944 default_severity: Severity::Allow,
20945 warn_since: None,
20946 deny_since: None,
20947 },
20948 Lint {
20949 label: "clippy::manual_assert",
20950 description: r##"Detects `if`-then-`panic!` that can be replaced with `assert!`."##,
20951 default_severity: Severity::Allow,
20952 warn_since: None,
20953 deny_since: None,
20954 },
20955 Lint {
20956 label: "clippy::manual_async_fn",
20957 description: r##"It checks for manual implementations of `async` functions."##,
20958 default_severity: Severity::Allow,
20959 warn_since: None,
20960 deny_since: None,
20961 },
20962 Lint {
20963 label: "clippy::manual_bits",
20964 description: r##"Checks for usage of `std::mem::size_of::<T>() * 8` when
20965`T::BITS` is available."##,
20966 default_severity: Severity::Allow,
20967 warn_since: None,
20968 deny_since: None,
20969 },
20970 Lint {
20971 label: "clippy::manual_c_str_literals",
20972 description: r##"Checks for the manual creation of C strings (a string with a `NUL` byte at the end), either
20973through one of the `CStr` constructor functions, or more plainly by calling `.as_ptr()`
20974on a (byte) string literal with a hardcoded `\\0` byte at the end."##,
20975 default_severity: Severity::Allow,
20976 warn_since: None,
20977 deny_since: None,
20978 },
20979 Lint {
20980 label: "clippy::manual_clamp",
20981 description: r##"Identifies good opportunities for a clamp function from std or core, and suggests using it."##,
20982 default_severity: Severity::Allow,
20983 warn_since: None,
20984 deny_since: None,
20985 },
20986 Lint {
20987 label: "clippy::manual_div_ceil",
20988 description: r##"Checks for an expression like `(x + (y - 1)) / y` which is a common manual reimplementation
20989of `x.div_ceil(y)`."##,
20990 default_severity: Severity::Allow,
20991 warn_since: None,
20992 deny_since: None,
20993 },
20994 Lint {
20995 label: "clippy::manual_filter",
20996 description: r##"Checks for usage of `match` which could be implemented using `filter`"##,
20997 default_severity: Severity::Allow,
20998 warn_since: None,
20999 deny_since: None,
21000 },
21001 Lint {
21002 label: "clippy::manual_filter_map",
21003 description: r##"Checks for usage of `_.filter(_).map(_)` that can be written more simply
21004as `filter_map(_)`."##,
21005 default_severity: Severity::Allow,
21006 warn_since: None,
21007 deny_since: None,
21008 },
21009 Lint {
21010 label: "clippy::manual_find",
21011 description: r##"Checks for manual implementations of Iterator::find"##,
21012 default_severity: Severity::Allow,
21013 warn_since: None,
21014 deny_since: None,
21015 },
21016 Lint {
21017 label: "clippy::manual_find_map",
21018 description: r##"Checks for usage of `_.find(_).map(_)` that can be written more simply
21019as `find_map(_)`."##,
21020 default_severity: Severity::Allow,
21021 warn_since: None,
21022 deny_since: None,
21023 },
21024 Lint {
21025 label: "clippy::manual_flatten",
21026 description: r##"Checks for unnecessary `if let` usage in a for loop
21027where only the `Some` or `Ok` variant of the iterator element is used."##,
21028 default_severity: Severity::Allow,
21029 warn_since: None,
21030 deny_since: None,
21031 },
21032 Lint {
21033 label: "clippy::manual_hash_one",
21034 description: r##"Checks for cases where [`BuildHasher::hash_one`] can be used.
21035
21036[`BuildHasher::hash_one`]: https://doc.rust-lang.org/std/hash/trait.BuildHasher.html#method.hash_one"##,
21037 default_severity: Severity::Allow,
21038 warn_since: None,
21039 deny_since: None,
21040 },
21041 Lint {
21042 label: "clippy::manual_inspect",
21043 description: r##"Checks for uses of `map` which return the original item."##,
21044 default_severity: Severity::Allow,
21045 warn_since: None,
21046 deny_since: None,
21047 },
21048 Lint {
21049 label: "clippy::manual_instant_elapsed",
21050 description: r##"Lints subtraction between `Instant::now()` and another `Instant`."##,
21051 default_severity: Severity::Allow,
21052 warn_since: None,
21053 deny_since: None,
21054 },
21055 Lint {
21056 label: "clippy::manual_is_ascii_check",
21057 description: r##"Suggests to use dedicated built-in methods,
21058`is_ascii_(lowercase|uppercase|digit|hexdigit)` for checking on corresponding
21059ascii range"##,
21060 default_severity: Severity::Allow,
21061 warn_since: None,
21062 deny_since: None,
21063 },
21064 Lint {
21065 label: "clippy::manual_is_finite",
21066 description: r##"Checks for manual `is_finite` reimplementations
21067(i.e., `x != <float>::INFINITY && x != <float>::NEG_INFINITY`)."##,
21068 default_severity: Severity::Allow,
21069 warn_since: None,
21070 deny_since: None,
21071 },
21072 Lint {
21073 label: "clippy::manual_is_infinite",
21074 description: r##"Checks for manual `is_infinite` reimplementations
21075(i.e., `x == <float>::INFINITY || x == <float>::NEG_INFINITY`)."##,
21076 default_severity: Severity::Allow,
21077 warn_since: None,
21078 deny_since: None,
21079 },
21080 Lint {
21081 label: "clippy::manual_is_power_of_two",
21082 description: r##"Checks for expressions like `x.count_ones() == 1` or `x & (x - 1) == 0`, with x and unsigned integer, which are manual
21083reimplementations of `x.is_power_of_two()`."##,
21084 default_severity: Severity::Allow,
21085 warn_since: None,
21086 deny_since: None,
21087 },
21088 Lint {
21089 label: "clippy::manual_is_variant_and",
21090 description: r##"Checks for usage of `option.map(f).unwrap_or_default()` and `result.map(f).unwrap_or_default()` where f is a function or closure that returns the `bool` type."##,
21091 default_severity: Severity::Allow,
21092 warn_since: None,
21093 deny_since: None,
21094 },
21095 Lint {
21096 label: "clippy::manual_let_else",
21097 description: r##"Warn of cases where `let...else` could be used"##,
21098 default_severity: Severity::Allow,
21099 warn_since: None,
21100 deny_since: None,
21101 },
21102 Lint {
21103 label: "clippy::manual_main_separator_str",
21104 description: r##"Checks for references on `std::path::MAIN_SEPARATOR.to_string()` used
21105to build a `&str`."##,
21106 default_severity: Severity::Allow,
21107 warn_since: None,
21108 deny_since: None,
21109 },
21110 Lint {
21111 label: "clippy::manual_map",
21112 description: r##"Checks for usage of `match` which could be implemented using `map`"##,
21113 default_severity: Severity::Allow,
21114 warn_since: None,
21115 deny_since: None,
21116 },
21117 Lint {
21118 label: "clippy::manual_memcpy",
21119 description: r##"Checks for for-loops that manually copy items between
21120slices that could be optimized by having a memcpy."##,
21121 default_severity: Severity::Allow,
21122 warn_since: None,
21123 deny_since: None,
21124 },
21125 Lint {
21126 label: "clippy::manual_next_back",
21127 description: r##"Checks for `.rev().next()` on a `DoubleEndedIterator`"##,
21128 default_severity: Severity::Allow,
21129 warn_since: None,
21130 deny_since: None,
21131 },
21132 Lint {
21133 label: "clippy::manual_non_exhaustive",
21134 description: r##"Checks for manual implementations of the non-exhaustive pattern."##,
21135 default_severity: Severity::Allow,
21136 warn_since: None,
21137 deny_since: None,
21138 },
21139 Lint {
21140 label: "clippy::manual_ok_or",
21141 description: r##"Finds patterns that reimplement `Option::ok_or`."##,
21142 default_severity: Severity::Allow,
21143 warn_since: None,
21144 deny_since: None,
21145 },
21146 Lint {
21147 label: "clippy::manual_pattern_char_comparison",
21148 description: r##"Checks for manual `char` comparison in string patterns"##,
21149 default_severity: Severity::Allow,
21150 warn_since: None,
21151 deny_since: None,
21152 },
21153 Lint {
21154 label: "clippy::manual_range_contains",
21155 description: r##"Checks for expressions like `x >= 3 && x < 8` that could
21156be more readably expressed as `(3..8).contains(x)`."##,
21157 default_severity: Severity::Allow,
21158 warn_since: None,
21159 deny_since: None,
21160 },
21161 Lint {
21162 label: "clippy::manual_range_patterns",
21163 description: r##"Looks for combined OR patterns that are all contained in a specific range,
21164e.g. `6 | 4 | 5 | 9 | 7 | 8` can be rewritten as `4..=9`."##,
21165 default_severity: Severity::Allow,
21166 warn_since: None,
21167 deny_since: None,
21168 },
21169 Lint {
21170 label: "clippy::manual_rem_euclid",
21171 description: r##"Checks for an expression like `((x % 4) + 4) % 4` which is a common manual reimplementation
21172of `x.rem_euclid(4)`."##,
21173 default_severity: Severity::Allow,
21174 warn_since: None,
21175 deny_since: None,
21176 },
21177 Lint {
21178 label: "clippy::manual_retain",
21179 description: r##"Checks for code to be replaced by `.retain()`."##,
21180 default_severity: Severity::Allow,
21181 warn_since: None,
21182 deny_since: None,
21183 },
21184 Lint {
21185 label: "clippy::manual_rotate",
21186 description: r##"It detects manual bit rotations that could be rewritten using standard
21187functions `rotate_left` or `rotate_right`."##,
21188 default_severity: Severity::Allow,
21189 warn_since: None,
21190 deny_since: None,
21191 },
21192 Lint {
21193 label: "clippy::manual_saturating_arithmetic",
21194 description: r##"Checks for `.checked_add/sub(x).unwrap_or(MAX/MIN)`."##,
21195 default_severity: Severity::Allow,
21196 warn_since: None,
21197 deny_since: None,
21198 },
21199 Lint {
21200 label: "clippy::manual_slice_size_calculation",
21201 description: r##"When `a` is `&[T]`, detect `a.len() * size_of::<T>()` and suggest `size_of_val(a)`
21202instead."##,
21203 default_severity: Severity::Allow,
21204 warn_since: None,
21205 deny_since: None,
21206 },
21207 Lint {
21208 label: "clippy::manual_split_once",
21209 description: r##"Checks for usage of `str::splitn(2, _)`"##,
21210 default_severity: Severity::Allow,
21211 warn_since: None,
21212 deny_since: None,
21213 },
21214 Lint {
21215 label: "clippy::manual_str_repeat",
21216 description: r##"Checks for manual implementations of `str::repeat`"##,
21217 default_severity: Severity::Allow,
21218 warn_since: None,
21219 deny_since: None,
21220 },
21221 Lint {
21222 label: "clippy::manual_string_new",
21223 description: r##"Checks for usage of `` to create a `String`, such as `.to_string()`, `.to_owned()`,
21224`String::from()` and others."##,
21225 default_severity: Severity::Allow,
21226 warn_since: None,
21227 deny_since: None,
21228 },
21229 Lint {
21230 label: "clippy::manual_strip",
21231 description: r##"Suggests using `strip_{prefix,suffix}` over `str::{starts,ends}_with` and slicing using
21232the pattern's length."##,
21233 default_severity: Severity::Allow,
21234 warn_since: None,
21235 deny_since: None,
21236 },
21237 Lint {
21238 label: "clippy::manual_swap",
21239 description: r##"Checks for manual swapping.
21240
21241Note that the lint will not be emitted in const blocks, as the suggestion would not be applicable."##,
21242 default_severity: Severity::Allow,
21243 warn_since: None,
21244 deny_since: None,
21245 },
21246 Lint {
21247 label: "clippy::manual_try_fold",
21248 description: r##"Checks for usage of `Iterator::fold` with a type that implements `Try`."##,
21249 default_severity: Severity::Allow,
21250 warn_since: None,
21251 deny_since: None,
21252 },
21253 Lint {
21254 label: "clippy::manual_unwrap_or",
21255 description: r##"Finds patterns that reimplement `Option::unwrap_or` or `Result::unwrap_or`."##,
21256 default_severity: Severity::Allow,
21257 warn_since: None,
21258 deny_since: None,
21259 },
21260 Lint {
21261 label: "clippy::manual_unwrap_or_default",
21262 description: r##"Checks if a `match` or `if let` expression can be simplified using
21263`.unwrap_or_default()`."##,
21264 default_severity: Severity::Allow,
21265 warn_since: None,
21266 deny_since: None,
21267 },
21268 Lint {
21269 label: "clippy::manual_while_let_some",
21270 description: r##"Looks for loops that check for emptiness of a `Vec` in the condition and pop an element
21271in the body as a separate operation."##,
21272 default_severity: Severity::Allow,
21273 warn_since: None,
21274 deny_since: None,
21275 },
21276 Lint {
21277 label: "clippy::many_single_char_names",
21278 description: r##"Checks for too many variables whose name consists of a
21279single character."##,
21280 default_severity: Severity::Allow,
21281 warn_since: None,
21282 deny_since: None,
21283 },
21284 Lint {
21285 label: "clippy::map_clone",
21286 description: r##"Checks for usage of `map(|x| x.clone())` or
21287dereferencing closures for `Copy` types, on `Iterator` or `Option`,
21288and suggests `cloned()` or `copied()` instead"##,
21289 default_severity: Severity::Allow,
21290 warn_since: None,
21291 deny_since: None,
21292 },
21293 Lint {
21294 label: "clippy::map_collect_result_unit",
21295 description: r##"Checks for usage of `_.map(_).collect::<Result<(), _>()`."##,
21296 default_severity: Severity::Allow,
21297 warn_since: None,
21298 deny_since: None,
21299 },
21300 Lint {
21301 label: "clippy::map_entry",
21302 description: r##"Checks for usage of `contains_key` + `insert` on `HashMap`
21303or `BTreeMap`."##,
21304 default_severity: Severity::Allow,
21305 warn_since: None,
21306 deny_since: None,
21307 },
21308 Lint {
21309 label: "clippy::map_err_ignore",
21310 description: r##"Checks for instances of `map_err(|_| Some::Enum)`"##,
21311 default_severity: Severity::Allow,
21312 warn_since: None,
21313 deny_since: None,
21314 },
21315 Lint {
21316 label: "clippy::map_flatten",
21317 description: r##"Checks for usage of `_.map(_).flatten(_)` on `Iterator` and `Option`"##,
21318 default_severity: Severity::Allow,
21319 warn_since: None,
21320 deny_since: None,
21321 },
21322 Lint {
21323 label: "clippy::map_identity",
21324 description: r##"Checks for instances of `map(f)` where `f` is the identity function."##,
21325 default_severity: Severity::Allow,
21326 warn_since: None,
21327 deny_since: None,
21328 },
21329 Lint {
21330 label: "clippy::map_unwrap_or",
21331 description: r##"Checks for usage of `option.map(_).unwrap_or(_)` or `option.map(_).unwrap_or_else(_)` or
21332`result.map(_).unwrap_or_else(_)`."##,
21333 default_severity: Severity::Allow,
21334 warn_since: None,
21335 deny_since: None,
21336 },
21337 Lint {
21338 label: "clippy::match_as_ref",
21339 description: r##"Checks for match which is used to add a reference to an
21340`Option` value."##,
21341 default_severity: Severity::Allow,
21342 warn_since: None,
21343 deny_since: None,
21344 },
21345 Lint {
21346 label: "clippy::match_bool",
21347 description: r##"Checks for matches where match expression is a `bool`. It
21348suggests to replace the expression with an `if...else` block."##,
21349 default_severity: Severity::Allow,
21350 warn_since: None,
21351 deny_since: None,
21352 },
21353 Lint {
21354 label: "clippy::match_like_matches_macro",
21355 description: r##"Checks for `match` or `if let` expressions producing a
21356`bool` that could be written using `matches!`"##,
21357 default_severity: Severity::Allow,
21358 warn_since: None,
21359 deny_since: None,
21360 },
21361 Lint {
21362 label: "clippy::match_on_vec_items",
21363 description: r##"Checks for `match vec[idx]` or `match vec[n..m]`."##,
21364 default_severity: Severity::Allow,
21365 warn_since: None,
21366 deny_since: None,
21367 },
21368 Lint {
21369 label: "clippy::match_overlapping_arm",
21370 description: r##"Checks for overlapping match arms."##,
21371 default_severity: Severity::Allow,
21372 warn_since: None,
21373 deny_since: None,
21374 },
21375 Lint {
21376 label: "clippy::match_ref_pats",
21377 description: r##"Checks for matches where all arms match a reference,
21378suggesting to remove the reference and deref the matched expression
21379instead. It also checks for `if let &foo = bar` blocks."##,
21380 default_severity: Severity::Allow,
21381 warn_since: None,
21382 deny_since: None,
21383 },
21384 Lint {
21385 label: "clippy::match_result_ok",
21386 description: r##"Checks for unnecessary `ok()` in `while let`."##,
21387 default_severity: Severity::Allow,
21388 warn_since: None,
21389 deny_since: None,
21390 },
21391 Lint {
21392 label: "clippy::match_same_arms",
21393 description: r##"Checks for `match` with identical arm bodies.
21394
21395Note: Does not lint on wildcards if the `non_exhaustive_omitted_patterns_lint` feature is
21396enabled and disallowed."##,
21397 default_severity: Severity::Allow,
21398 warn_since: None,
21399 deny_since: None,
21400 },
21401 Lint {
21402 label: "clippy::match_single_binding",
21403 description: r##"Checks for useless match that binds to only one value."##,
21404 default_severity: Severity::Allow,
21405 warn_since: None,
21406 deny_since: None,
21407 },
21408 Lint {
21409 label: "clippy::match_str_case_mismatch",
21410 description: r##"Checks for `match` expressions modifying the case of a string with non-compliant arms"##,
21411 default_severity: Severity::Allow,
21412 warn_since: None,
21413 deny_since: None,
21414 },
21415 Lint {
21416 label: "clippy::match_wild_err_arm",
21417 description: r##"Checks for arm which matches all errors with `Err(_)`
21418and take drastic actions like `panic!`."##,
21419 default_severity: Severity::Allow,
21420 warn_since: None,
21421 deny_since: None,
21422 },
21423 Lint {
21424 label: "clippy::match_wildcard_for_single_variants",
21425 description: r##"Checks for wildcard enum matches for a single variant."##,
21426 default_severity: Severity::Allow,
21427 warn_since: None,
21428 deny_since: None,
21429 },
21430 Lint {
21431 label: "clippy::maybe_infinite_iter",
21432 description: r##"Checks for iteration that may be infinite."##,
21433 default_severity: Severity::Allow,
21434 warn_since: None,
21435 deny_since: None,
21436 },
21437 Lint {
21438 label: "clippy::mem_forget",
21439 description: r##"Checks for usage of `std::mem::forget(t)` where `t` is
21440`Drop` or has a field that implements `Drop`."##,
21441 default_severity: Severity::Allow,
21442 warn_since: None,
21443 deny_since: None,
21444 },
21445 Lint {
21446 label: "clippy::mem_replace_option_with_none",
21447 description: r##"Checks for `mem::replace()` on an `Option` with
21448`None`."##,
21449 default_severity: Severity::Allow,
21450 warn_since: None,
21451 deny_since: None,
21452 },
21453 Lint {
21454 label: "clippy::mem_replace_with_default",
21455 description: r##"Checks for `std::mem::replace` on a value of type
21456`T` with `T::default()`."##,
21457 default_severity: Severity::Allow,
21458 warn_since: None,
21459 deny_since: None,
21460 },
21461 Lint {
21462 label: "clippy::mem_replace_with_uninit",
21463 description: r##"Checks for `mem::replace(&mut _, mem::uninitialized())`
21464and `mem::replace(&mut _, mem::zeroed())`."##,
21465 default_severity: Severity::Allow,
21466 warn_since: None,
21467 deny_since: None,
21468 },
21469 Lint {
21470 label: "clippy::min_ident_chars",
21471 description: r##"Checks for identifiers which consist of a single character (or fewer than the configured threshold).
21472
21473Note: This lint can be very noisy when enabled; it may be desirable to only enable it
21474temporarily."##,
21475 default_severity: Severity::Allow,
21476 warn_since: None,
21477 deny_since: None,
21478 },
21479 Lint {
21480 label: "clippy::min_max",
21481 description: r##"Checks for expressions where `std::cmp::min` and `max` are
21482used to clamp values, but switched so that the result is constant."##,
21483 default_severity: Severity::Allow,
21484 warn_since: None,
21485 deny_since: None,
21486 },
21487 Lint {
21488 label: "clippy::misaligned_transmute",
21489 description: r##"Nothing. This lint has been deprecated"##,
21490 default_severity: Severity::Allow,
21491 warn_since: None,
21492 deny_since: None,
21493 },
21494 Lint {
21495 label: "clippy::mismatching_type_param_order",
21496 description: r##"Checks for type parameters which are positioned inconsistently between
21497a type definition and impl block. Specifically, a parameter in an impl
21498block which has the same name as a parameter in the type def, but is in
21499a different place."##,
21500 default_severity: Severity::Allow,
21501 warn_since: None,
21502 deny_since: None,
21503 },
21504 Lint {
21505 label: "clippy::misnamed_getters",
21506 description: r##"Checks for getter methods that return a field that doesn't correspond
21507to the name of the method, when there is a field's whose name matches that of the method."##,
21508 default_severity: Severity::Allow,
21509 warn_since: None,
21510 deny_since: None,
21511 },
21512 Lint {
21513 label: "clippy::misrefactored_assign_op",
21514 description: r##"Checks for `a op= a op b` or `a op= b op a` patterns."##,
21515 default_severity: Severity::Allow,
21516 warn_since: None,
21517 deny_since: None,
21518 },
21519 Lint {
21520 label: "clippy::missing_assert_message",
21521 description: r##"Checks assertions without a custom panic message."##,
21522 default_severity: Severity::Allow,
21523 warn_since: None,
21524 deny_since: None,
21525 },
21526 Lint {
21527 label: "clippy::missing_asserts_for_indexing",
21528 description: r##"Checks for repeated slice indexing without asserting beforehand that the length
21529is greater than the largest index used to index into the slice."##,
21530 default_severity: Severity::Allow,
21531 warn_since: None,
21532 deny_since: None,
21533 },
21534 Lint {
21535 label: "clippy::missing_const_for_fn",
21536 description: r##"Suggests the use of `const` in functions and methods where possible."##,
21537 default_severity: Severity::Allow,
21538 warn_since: None,
21539 deny_since: None,
21540 },
21541 Lint {
21542 label: "clippy::missing_const_for_thread_local",
21543 description: r##"Suggests to use `const` in `thread_local!` macro if possible."##,
21544 default_severity: Severity::Allow,
21545 warn_since: None,
21546 deny_since: None,
21547 },
21548 Lint {
21549 label: "clippy::missing_docs_in_private_items",
21550 description: r##"Warns if there is missing documentation for any private documentable item."##,
21551 default_severity: Severity::Allow,
21552 warn_since: None,
21553 deny_since: None,
21554 },
21555 Lint {
21556 label: "clippy::missing_enforced_import_renames",
21557 description: r##"Checks for imports that do not rename the item as specified
21558in the `enforced-import-renames` config option.
21559
21560Note: Even though this lint is warn-by-default, it will only trigger if
21561import renames are defined in the `clippy.toml` file."##,
21562 default_severity: Severity::Allow,
21563 warn_since: None,
21564 deny_since: None,
21565 },
21566 Lint {
21567 label: "clippy::missing_errors_doc",
21568 description: r##"Checks the doc comments of publicly visible functions that
21569return a `Result` type and warns if there is no `# Errors` section."##,
21570 default_severity: Severity::Allow,
21571 warn_since: None,
21572 deny_since: None,
21573 },
21574 Lint {
21575 label: "clippy::missing_fields_in_debug",
21576 description: r##"Checks for manual [`core::fmt::Debug`](https://doc.rust-lang.org/core/fmt/trait.Debug.html) implementations that do not use all fields."##,
21577 default_severity: Severity::Allow,
21578 warn_since: None,
21579 deny_since: None,
21580 },
21581 Lint {
21582 label: "clippy::missing_inline_in_public_items",
21583 description: r##"It lints if an exported function, method, trait method with default impl,
21584or trait method impl is not `#[inline]`."##,
21585 default_severity: Severity::Allow,
21586 warn_since: None,
21587 deny_since: None,
21588 },
21589 Lint {
21590 label: "clippy::missing_panics_doc",
21591 description: r##"Checks the doc comments of publicly visible functions that
21592may panic and warns if there is no `# Panics` section."##,
21593 default_severity: Severity::Allow,
21594 warn_since: None,
21595 deny_since: None,
21596 },
21597 Lint {
21598 label: "clippy::missing_safety_doc",
21599 description: r##"Checks for the doc comments of publicly visible
21600unsafe functions and warns if there is no `# Safety` section."##,
21601 default_severity: Severity::Allow,
21602 warn_since: None,
21603 deny_since: None,
21604 },
21605 Lint {
21606 label: "clippy::missing_spin_loop",
21607 description: r##"Checks for empty spin loops"##,
21608 default_severity: Severity::Allow,
21609 warn_since: None,
21610 deny_since: None,
21611 },
21612 Lint {
21613 label: "clippy::missing_trait_methods",
21614 description: r##"Checks if a provided method is used implicitly by a trait
21615implementation."##,
21616 default_severity: Severity::Allow,
21617 warn_since: None,
21618 deny_since: None,
21619 },
21620 Lint {
21621 label: "clippy::missing_transmute_annotations",
21622 description: r##"Checks if transmute calls have all generics specified."##,
21623 default_severity: Severity::Allow,
21624 warn_since: None,
21625 deny_since: None,
21626 },
21627 Lint {
21628 label: "clippy::mistyped_literal_suffixes",
21629 description: r##"Warns for mistyped suffix in literals"##,
21630 default_severity: Severity::Allow,
21631 warn_since: None,
21632 deny_since: None,
21633 },
21634 Lint {
21635 label: "clippy::mixed_attributes_style",
21636 description: r##"Checks for items that have the same kind of attributes with mixed styles (inner/outer)."##,
21637 default_severity: Severity::Allow,
21638 warn_since: None,
21639 deny_since: None,
21640 },
21641 Lint {
21642 label: "clippy::mixed_case_hex_literals",
21643 description: r##"Warns on hexadecimal literals with mixed-case letter
21644digits."##,
21645 default_severity: Severity::Allow,
21646 warn_since: None,
21647 deny_since: None,
21648 },
21649 Lint {
21650 label: "clippy::mixed_read_write_in_expression",
21651 description: r##"Checks for a read and a write to the same variable where
21652whether the read occurs before or after the write depends on the evaluation
21653order of sub-expressions."##,
21654 default_severity: Severity::Allow,
21655 warn_since: None,
21656 deny_since: None,
21657 },
21658 Lint {
21659 label: "clippy::mod_module_files",
21660 description: r##"Checks that module layout uses only self named module files; bans `mod.rs` files."##,
21661 default_severity: Severity::Allow,
21662 warn_since: None,
21663 deny_since: None,
21664 },
21665 Lint {
21666 label: "clippy::module_inception",
21667 description: r##"Checks for modules that have the same name as their
21668parent module"##,
21669 default_severity: Severity::Allow,
21670 warn_since: None,
21671 deny_since: None,
21672 },
21673 Lint {
21674 label: "clippy::module_name_repetitions",
21675 description: r##"Detects type names that are prefixed or suffixed by the
21676containing module's name."##,
21677 default_severity: Severity::Allow,
21678 warn_since: None,
21679 deny_since: None,
21680 },
21681 Lint {
21682 label: "clippy::modulo_arithmetic",
21683 description: r##"Checks for modulo arithmetic."##,
21684 default_severity: Severity::Allow,
21685 warn_since: None,
21686 deny_since: None,
21687 },
21688 Lint {
21689 label: "clippy::modulo_one",
21690 description: r##"Checks for getting the remainder of integer division by one or minus
21691one."##,
21692 default_severity: Severity::Allow,
21693 warn_since: None,
21694 deny_since: None,
21695 },
21696 Lint {
21697 label: "clippy::multi_assignments",
21698 description: r##"Checks for nested assignments."##,
21699 default_severity: Severity::Allow,
21700 warn_since: None,
21701 deny_since: None,
21702 },
21703 Lint {
21704 label: "clippy::multiple_bound_locations",
21705 description: r##"Check if a generic is defined both in the bound predicate and in the `where` clause."##,
21706 default_severity: Severity::Allow,
21707 warn_since: None,
21708 deny_since: None,
21709 },
21710 Lint {
21711 label: "clippy::multiple_crate_versions",
21712 description: r##"Checks to see if multiple versions of a crate are being
21713used."##,
21714 default_severity: Severity::Allow,
21715 warn_since: None,
21716 deny_since: None,
21717 },
21718 Lint {
21719 label: "clippy::multiple_inherent_impl",
21720 description: r##"Checks for multiple inherent implementations of a struct"##,
21721 default_severity: Severity::Allow,
21722 warn_since: None,
21723 deny_since: None,
21724 },
21725 Lint {
21726 label: "clippy::multiple_unsafe_ops_per_block",
21727 description: r##"Checks for `unsafe` blocks that contain more than one unsafe operation."##,
21728 default_severity: Severity::Allow,
21729 warn_since: None,
21730 deny_since: None,
21731 },
21732 Lint {
21733 label: "clippy::must_use_candidate",
21734 description: r##"Checks for public functions that have no
21735`#[must_use]` attribute, but return something not already marked
21736must-use, have no mutable arg and mutate no statics."##,
21737 default_severity: Severity::Allow,
21738 warn_since: None,
21739 deny_since: None,
21740 },
21741 Lint {
21742 label: "clippy::must_use_unit",
21743 description: r##"Checks for a `#[must_use]` attribute on
21744unit-returning functions and methods."##,
21745 default_severity: Severity::Allow,
21746 warn_since: None,
21747 deny_since: None,
21748 },
21749 Lint {
21750 label: "clippy::mut_from_ref",
21751 description: r##"This lint checks for functions that take immutable references and return
21752mutable ones. This will not trigger if no unsafe code exists as there
21753are multiple safe functions which will do this transformation
21754
21755To be on the conservative side, if there's at least one mutable
21756reference with the output lifetime, this lint will not trigger."##,
21757 default_severity: Severity::Allow,
21758 warn_since: None,
21759 deny_since: None,
21760 },
21761 Lint {
21762 label: "clippy::mut_mut",
21763 description: r##"Checks for instances of `mut mut` references."##,
21764 default_severity: Severity::Allow,
21765 warn_since: None,
21766 deny_since: None,
21767 },
21768 Lint {
21769 label: "clippy::mut_mutex_lock",
21770 description: r##"Checks for `&mut Mutex::lock` calls"##,
21771 default_severity: Severity::Allow,
21772 warn_since: None,
21773 deny_since: None,
21774 },
21775 Lint {
21776 label: "clippy::mut_range_bound",
21777 description: r##"Checks for loops with a range bound that is a mutable variable."##,
21778 default_severity: Severity::Allow,
21779 warn_since: None,
21780 deny_since: None,
21781 },
21782 Lint {
21783 label: "clippy::mutable_key_type",
21784 description: r##"Checks for sets/maps with mutable key types."##,
21785 default_severity: Severity::Allow,
21786 warn_since: None,
21787 deny_since: None,
21788 },
21789 Lint {
21790 label: "clippy::mutex_atomic",
21791 description: r##"Checks for usage of `Mutex<X>` where an atomic will do."##,
21792 default_severity: Severity::Allow,
21793 warn_since: None,
21794 deny_since: None,
21795 },
21796 Lint {
21797 label: "clippy::mutex_integer",
21798 description: r##"Checks for usage of `Mutex<X>` where `X` is an integral
21799type."##,
21800 default_severity: Severity::Allow,
21801 warn_since: None,
21802 deny_since: None,
21803 },
21804 Lint {
21805 label: "clippy::naive_bytecount",
21806 description: r##"Checks for naive byte counts"##,
21807 default_severity: Severity::Allow,
21808 warn_since: None,
21809 deny_since: None,
21810 },
21811 Lint {
21812 label: "clippy::needless_arbitrary_self_type",
21813 description: r##"The lint checks for `self` in fn parameters that
21814specify the `Self`-type explicitly"##,
21815 default_severity: Severity::Allow,
21816 warn_since: None,
21817 deny_since: None,
21818 },
21819 Lint {
21820 label: "clippy::needless_bitwise_bool",
21821 description: r##"Checks for usage of bitwise and/or operators between booleans, where performance may be improved by using
21822a lazy and."##,
21823 default_severity: Severity::Allow,
21824 warn_since: None,
21825 deny_since: None,
21826 },
21827 Lint {
21828 label: "clippy::needless_bool",
21829 description: r##"Checks for expressions of the form `if c { true } else {
21830false }` (or vice versa) and suggests using the condition directly."##,
21831 default_severity: Severity::Allow,
21832 warn_since: None,
21833 deny_since: None,
21834 },
21835 Lint {
21836 label: "clippy::needless_bool_assign",
21837 description: r##"Checks for expressions of the form `if c { x = true } else { x = false }`
21838(or vice versa) and suggest assigning the variable directly from the
21839condition."##,
21840 default_severity: Severity::Allow,
21841 warn_since: None,
21842 deny_since: None,
21843 },
21844 Lint {
21845 label: "clippy::needless_borrow",
21846 description: r##"Checks for address of operations (`&`) that are going to
21847be dereferenced immediately by the compiler."##,
21848 default_severity: Severity::Allow,
21849 warn_since: None,
21850 deny_since: None,
21851 },
21852 Lint {
21853 label: "clippy::needless_borrowed_reference",
21854 description: r##"Checks for bindings that needlessly destructure a reference and borrow the inner
21855value with `&ref`."##,
21856 default_severity: Severity::Allow,
21857 warn_since: None,
21858 deny_since: None,
21859 },
21860 Lint {
21861 label: "clippy::needless_borrows_for_generic_args",
21862 description: r##"Checks for borrow operations (`&`) that are used as a generic argument to a
21863function when the borrowed value could be used."##,
21864 default_severity: Severity::Allow,
21865 warn_since: None,
21866 deny_since: None,
21867 },
21868 Lint {
21869 label: "clippy::needless_character_iteration",
21870 description: r##"Checks if an iterator is used to check if a string is ascii."##,
21871 default_severity: Severity::Allow,
21872 warn_since: None,
21873 deny_since: None,
21874 },
21875 Lint {
21876 label: "clippy::needless_collect",
21877 description: r##"Checks for functions collecting an iterator when collect
21878is not needed."##,
21879 default_severity: Severity::Allow,
21880 warn_since: None,
21881 deny_since: None,
21882 },
21883 Lint {
21884 label: "clippy::needless_continue",
21885 description: r##"The lint checks for `if`-statements appearing in loops
21886that contain a `continue` statement in either their main blocks or their
21887`else`-blocks, when omitting the `else`-block possibly with some
21888rearrangement of code can make the code easier to understand."##,
21889 default_severity: Severity::Allow,
21890 warn_since: None,
21891 deny_since: None,
21892 },
21893 Lint {
21894 label: "clippy::needless_doctest_main",
21895 description: r##"Checks for `fn main() { .. }` in doctests"##,
21896 default_severity: Severity::Allow,
21897 warn_since: None,
21898 deny_since: None,
21899 },
21900 Lint {
21901 label: "clippy::needless_else",
21902 description: r##"Checks for empty `else` branches."##,
21903 default_severity: Severity::Allow,
21904 warn_since: None,
21905 deny_since: None,
21906 },
21907 Lint {
21908 label: "clippy::needless_for_each",
21909 description: r##"Checks for usage of `for_each` that would be more simply written as a
21910`for` loop."##,
21911 default_severity: Severity::Allow,
21912 warn_since: None,
21913 deny_since: None,
21914 },
21915 Lint {
21916 label: "clippy::needless_if",
21917 description: r##"Checks for empty `if` branches with no else branch."##,
21918 default_severity: Severity::Allow,
21919 warn_since: None,
21920 deny_since: None,
21921 },
21922 Lint {
21923 label: "clippy::needless_late_init",
21924 description: r##"Checks for late initializations that can be replaced by a `let` statement
21925with an initializer."##,
21926 default_severity: Severity::Allow,
21927 warn_since: None,
21928 deny_since: None,
21929 },
21930 Lint {
21931 label: "clippy::needless_lifetimes",
21932 description: r##"Checks for lifetime annotations which can be removed by
21933relying on lifetime elision."##,
21934 default_severity: Severity::Allow,
21935 warn_since: None,
21936 deny_since: None,
21937 },
21938 Lint {
21939 label: "clippy::needless_match",
21940 description: r##"Checks for unnecessary `match` or match-like `if let` returns for `Option` and `Result`
21941when function signatures are the same."##,
21942 default_severity: Severity::Allow,
21943 warn_since: None,
21944 deny_since: None,
21945 },
21946 Lint {
21947 label: "clippy::needless_maybe_sized",
21948 description: r##"Lints `?Sized` bounds applied to type parameters that cannot be unsized"##,
21949 default_severity: Severity::Allow,
21950 warn_since: None,
21951 deny_since: None,
21952 },
21953 Lint {
21954 label: "clippy::needless_option_as_deref",
21955 description: r##"Checks for no-op uses of `Option::{as_deref, as_deref_mut}`,
21956for example, `Option<&T>::as_deref()` returns the same type."##,
21957 default_severity: Severity::Allow,
21958 warn_since: None,
21959 deny_since: None,
21960 },
21961 Lint {
21962 label: "clippy::needless_option_take",
21963 description: r##"Checks for calling `take` function after `as_ref`."##,
21964 default_severity: Severity::Allow,
21965 warn_since: None,
21966 deny_since: None,
21967 },
21968 Lint {
21969 label: "clippy::needless_parens_on_range_literals",
21970 description: r##"The lint checks for parenthesis on literals in range statements that are
21971superfluous."##,
21972 default_severity: Severity::Allow,
21973 warn_since: None,
21974 deny_since: None,
21975 },
21976 Lint {
21977 label: "clippy::needless_pass_by_ref_mut",
21978 description: r##"Check if a `&mut` function argument is actually used mutably.
21979
21980Be careful if the function is publicly reexported as it would break compatibility with
21981users of this function, when the users pass this function as an argument."##,
21982 default_severity: Severity::Allow,
21983 warn_since: None,
21984 deny_since: None,
21985 },
21986 Lint {
21987 label: "clippy::needless_pass_by_value",
21988 description: r##"Checks for functions taking arguments by value, but not
21989consuming them in its
21990body."##,
21991 default_severity: Severity::Allow,
21992 warn_since: None,
21993 deny_since: None,
21994 },
21995 Lint {
21996 label: "clippy::needless_pub_self",
21997 description: r##"Checks for usage of `pub(self)` and `pub(in self)`."##,
21998 default_severity: Severity::Allow,
21999 warn_since: None,
22000 deny_since: None,
22001 },
22002 Lint {
22003 label: "clippy::needless_question_mark",
22004 description: r##"Suggests alternatives for useless applications of `?` in terminating expressions"##,
22005 default_severity: Severity::Allow,
22006 warn_since: None,
22007 deny_since: None,
22008 },
22009 Lint {
22010 label: "clippy::needless_range_loop",
22011 description: r##"Checks for looping over the range of `0..len` of some
22012collection just to get the values by index."##,
22013 default_severity: Severity::Allow,
22014 warn_since: None,
22015 deny_since: None,
22016 },
22017 Lint {
22018 label: "clippy::needless_raw_string_hashes",
22019 description: r##"Checks for raw string literals with an unnecessary amount of hashes around them."##,
22020 default_severity: Severity::Allow,
22021 warn_since: None,
22022 deny_since: None,
22023 },
22024 Lint {
22025 label: "clippy::needless_raw_strings",
22026 description: r##"Checks for raw string literals where a string literal can be used instead."##,
22027 default_severity: Severity::Allow,
22028 warn_since: None,
22029 deny_since: None,
22030 },
22031 Lint {
22032 label: "clippy::needless_return",
22033 description: r##"Checks for return statements at the end of a block."##,
22034 default_severity: Severity::Allow,
22035 warn_since: None,
22036 deny_since: None,
22037 },
22038 Lint {
22039 label: "clippy::needless_return_with_question_mark",
22040 description: r##"Checks for return statements on `Err` paired with the `?` operator."##,
22041 default_severity: Severity::Allow,
22042 warn_since: None,
22043 deny_since: None,
22044 },
22045 Lint {
22046 label: "clippy::needless_splitn",
22047 description: r##"Checks for usage of `str::splitn` (or `str::rsplitn`) where using `str::split` would be the same."##,
22048 default_severity: Severity::Allow,
22049 warn_since: None,
22050 deny_since: None,
22051 },
22052 Lint {
22053 label: "clippy::needless_update",
22054 description: r##"Checks for needlessly including a base struct on update
22055when all fields are changed anyway.
22056
22057This lint is not applied to structs marked with
22058[non_exhaustive](https://doc.rust-lang.org/reference/attributes/type_system.html)."##,
22059 default_severity: Severity::Allow,
22060 warn_since: None,
22061 deny_since: None,
22062 },
22063 Lint {
22064 label: "clippy::neg_cmp_op_on_partial_ord",
22065 description: r##"Checks for the usage of negated comparison operators on types which only implement
22066`PartialOrd` (e.g., `f64`)."##,
22067 default_severity: Severity::Allow,
22068 warn_since: None,
22069 deny_since: None,
22070 },
22071 Lint {
22072 label: "clippy::neg_multiply",
22073 description: r##"Checks for multiplication by -1 as a form of negation."##,
22074 default_severity: Severity::Allow,
22075 warn_since: None,
22076 deny_since: None,
22077 },
22078 Lint {
22079 label: "clippy::negative_feature_names",
22080 description: r##"Checks for negative feature names with prefix `no-` or `not-`"##,
22081 default_severity: Severity::Allow,
22082 warn_since: None,
22083 deny_since: None,
22084 },
22085 Lint {
22086 label: "clippy::never_loop",
22087 description: r##"Checks for loops that will always `break`, `return` or
22088`continue` an outer loop."##,
22089 default_severity: Severity::Allow,
22090 warn_since: None,
22091 deny_since: None,
22092 },
22093 Lint {
22094 label: "clippy::new_ret_no_self",
22095 description: r##"Checks for `new` not returning a type that contains `Self`."##,
22096 default_severity: Severity::Allow,
22097 warn_since: None,
22098 deny_since: None,
22099 },
22100 Lint {
22101 label: "clippy::new_without_default",
22102 description: r##"Checks for public types with a `pub fn new() -> Self` method and no
22103implementation of
22104[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html)."##,
22105 default_severity: Severity::Allow,
22106 warn_since: None,
22107 deny_since: None,
22108 },
22109 Lint {
22110 label: "clippy::no_effect",
22111 description: r##"Checks for statements which have no effect."##,
22112 default_severity: Severity::Allow,
22113 warn_since: None,
22114 deny_since: None,
22115 },
22116 Lint {
22117 label: "clippy::no_effect_replace",
22118 description: r##"Checks for `replace` statements which have no effect."##,
22119 default_severity: Severity::Allow,
22120 warn_since: None,
22121 deny_since: None,
22122 },
22123 Lint {
22124 label: "clippy::no_effect_underscore_binding",
22125 description: r##"Checks for binding to underscore prefixed variable without side-effects."##,
22126 default_severity: Severity::Allow,
22127 warn_since: None,
22128 deny_since: None,
22129 },
22130 Lint {
22131 label: "clippy::no_mangle_with_rust_abi",
22132 description: r##"Checks for Rust ABI functions with the `#[no_mangle]` attribute."##,
22133 default_severity: Severity::Allow,
22134 warn_since: None,
22135 deny_since: None,
22136 },
22137 Lint {
22138 label: "clippy::non_ascii_literal",
22139 description: r##"Checks for non-ASCII characters in string and char literals."##,
22140 default_severity: Severity::Allow,
22141 warn_since: None,
22142 deny_since: None,
22143 },
22144 Lint {
22145 label: "clippy::non_canonical_clone_impl",
22146 description: r##"Checks for non-canonical implementations of `Clone` when `Copy` is already implemented."##,
22147 default_severity: Severity::Allow,
22148 warn_since: None,
22149 deny_since: None,
22150 },
22151 Lint {
22152 label: "clippy::non_canonical_partial_ord_impl",
22153 description: r##"Checks for non-canonical implementations of `PartialOrd` when `Ord` is already implemented."##,
22154 default_severity: Severity::Allow,
22155 warn_since: None,
22156 deny_since: None,
22157 },
22158 Lint {
22159 label: "clippy::non_minimal_cfg",
22160 description: r##"Checks for `any` and `all` combinators in `cfg` with only one condition."##,
22161 default_severity: Severity::Allow,
22162 warn_since: None,
22163 deny_since: None,
22164 },
22165 Lint {
22166 label: "clippy::non_octal_unix_permissions",
22167 description: r##"Checks for non-octal values used to set Unix file permissions."##,
22168 default_severity: Severity::Allow,
22169 warn_since: None,
22170 deny_since: None,
22171 },
22172 Lint {
22173 label: "clippy::non_send_fields_in_send_ty",
22174 description: r##"This lint warns about a `Send` implementation for a type that
22175contains fields that are not safe to be sent across threads.
22176It tries to detect fields that can cause a soundness issue
22177when sent to another thread (e.g., `Rc`) while allowing `!Send` fields
22178that are expected to exist in a `Send` type, such as raw pointers."##,
22179 default_severity: Severity::Allow,
22180 warn_since: None,
22181 deny_since: None,
22182 },
22183 Lint {
22184 label: "clippy::non_zero_suggestions",
22185 description: r##"Checks for conversions from `NonZero` types to regular integer types,
22186and suggests using `NonZero` types for the target as well."##,
22187 default_severity: Severity::Allow,
22188 warn_since: None,
22189 deny_since: None,
22190 },
22191 Lint {
22192 label: "clippy::nonminimal_bool",
22193 description: r##"Checks for boolean expressions that can be written more
22194concisely."##,
22195 default_severity: Severity::Allow,
22196 warn_since: None,
22197 deny_since: None,
22198 },
22199 Lint {
22200 label: "clippy::nonsensical_open_options",
22201 description: r##"Checks for duplicate open options as well as combinations
22202that make no sense."##,
22203 default_severity: Severity::Allow,
22204 warn_since: None,
22205 deny_since: None,
22206 },
22207 Lint {
22208 label: "clippy::nonstandard_macro_braces",
22209 description: r##"Checks that common macros are used with consistent bracing."##,
22210 default_severity: Severity::Allow,
22211 warn_since: None,
22212 deny_since: None,
22213 },
22214 Lint {
22215 label: "clippy::not_unsafe_ptr_arg_deref",
22216 description: r##"Checks for public functions that dereference raw pointer
22217arguments but are not marked `unsafe`."##,
22218 default_severity: Severity::Allow,
22219 warn_since: None,
22220 deny_since: None,
22221 },
22222 Lint {
22223 label: "clippy::obfuscated_if_else",
22224 description: r##"Checks for usage of `.then_some(..).unwrap_or(..)`"##,
22225 default_severity: Severity::Allow,
22226 warn_since: None,
22227 deny_since: None,
22228 },
22229 Lint {
22230 label: "clippy::octal_escapes",
22231 description: r##"Checks for `\\0` escapes in string and byte literals that look like octal
22232character escapes in C."##,
22233 default_severity: Severity::Allow,
22234 warn_since: None,
22235 deny_since: None,
22236 },
22237 Lint {
22238 label: "clippy::ok_expect",
22239 description: r##"Checks for usage of `ok().expect(..)`."##,
22240 default_severity: Severity::Allow,
22241 warn_since: None,
22242 deny_since: None,
22243 },
22244 Lint {
22245 label: "clippy::only_used_in_recursion",
22246 description: r##"Checks for arguments that are only used in recursion with no side-effects."##,
22247 default_severity: Severity::Allow,
22248 warn_since: None,
22249 deny_since: None,
22250 },
22251 Lint {
22252 label: "clippy::op_ref",
22253 description: r##"Checks for arguments to `==` which have their address
22254taken to satisfy a bound
22255and suggests to dereference the other argument instead"##,
22256 default_severity: Severity::Allow,
22257 warn_since: None,
22258 deny_since: None,
22259 },
22260 Lint {
22261 label: "clippy::option_as_ref_cloned",
22262 description: r##"Checks for usage of `.as_ref().cloned()` and `.as_mut().cloned()` on `Option`s"##,
22263 default_severity: Severity::Allow,
22264 warn_since: None,
22265 deny_since: None,
22266 },
22267 Lint {
22268 label: "clippy::option_as_ref_deref",
22269 description: r##"Checks for usage of `_.as_ref().map(Deref::deref)` or its aliases (such as String::as_str)."##,
22270 default_severity: Severity::Allow,
22271 warn_since: None,
22272 deny_since: None,
22273 },
22274 Lint {
22275 label: "clippy::option_env_unwrap",
22276 description: r##"Checks for usage of `option_env!(...).unwrap()` and
22277suggests usage of the `env!` macro."##,
22278 default_severity: Severity::Allow,
22279 warn_since: None,
22280 deny_since: None,
22281 },
22282 Lint {
22283 label: "clippy::option_filter_map",
22284 description: r##"Checks for iterators of `Option`s using `.filter(Option::is_some).map(Option::unwrap)` that may
22285be replaced with a `.flatten()` call."##,
22286 default_severity: Severity::Allow,
22287 warn_since: None,
22288 deny_since: None,
22289 },
22290 Lint {
22291 label: "clippy::option_if_let_else",
22292 description: r##"Lints usage of `if let Some(v) = ... { y } else { x }` and
22293`match .. { Some(v) => y, None/_ => x }` which are more
22294idiomatically done with `Option::map_or` (if the else bit is a pure
22295expression) or `Option::map_or_else` (if the else bit is an impure
22296expression)."##,
22297 default_severity: Severity::Allow,
22298 warn_since: None,
22299 deny_since: None,
22300 },
22301 Lint {
22302 label: "clippy::option_map_or_err_ok",
22303 description: r##"Checks for usage of `_.map_or(Err(_), Ok)`."##,
22304 default_severity: Severity::Allow,
22305 warn_since: None,
22306 deny_since: None,
22307 },
22308 Lint {
22309 label: "clippy::option_map_or_none",
22310 description: r##"Checks for usage of `_.map_or(None, _)`."##,
22311 default_severity: Severity::Allow,
22312 warn_since: None,
22313 deny_since: None,
22314 },
22315 Lint {
22316 label: "clippy::option_map_unit_fn",
22317 description: r##"Checks for usage of `option.map(f)` where f is a function
22318or closure that returns the unit type `()`."##,
22319 default_severity: Severity::Allow,
22320 warn_since: None,
22321 deny_since: None,
22322 },
22323 Lint {
22324 label: "clippy::option_option",
22325 description: r##"Checks for usage of `Option<Option<_>>` in function signatures and type
22326definitions"##,
22327 default_severity: Severity::Allow,
22328 warn_since: None,
22329 deny_since: None,
22330 },
22331 Lint {
22332 label: "clippy::or_fun_call",
22333 description: r##"Checks for calls to `.or(foo(..))`, `.unwrap_or(foo(..))`,
22334`.or_insert(foo(..))` etc., and suggests to use `.or_else(|| foo(..))`,
22335`.unwrap_or_else(|| foo(..))`, `.unwrap_or_default()` or `.or_default()`
22336etc. instead."##,
22337 default_severity: Severity::Allow,
22338 warn_since: None,
22339 deny_since: None,
22340 },
22341 Lint {
22342 label: "clippy::or_then_unwrap",
22343 description: r##"Checks for `.or(…).unwrap()` calls to Options and Results."##,
22344 default_severity: Severity::Allow,
22345 warn_since: None,
22346 deny_since: None,
22347 },
22348 Lint {
22349 label: "clippy::out_of_bounds_indexing",
22350 description: r##"Checks for out of bounds array indexing with a constant
22351index."##,
22352 default_severity: Severity::Allow,
22353 warn_since: None,
22354 deny_since: None,
22355 },
22356 Lint {
22357 label: "clippy::overly_complex_bool_expr",
22358 description: r##"Checks for boolean expressions that contain terminals that
22359can be eliminated."##,
22360 default_severity: Severity::Allow,
22361 warn_since: None,
22362 deny_since: None,
22363 },
22364 Lint {
22365 label: "clippy::panic",
22366 description: r##"Checks for usage of `panic!`."##,
22367 default_severity: Severity::Allow,
22368 warn_since: None,
22369 deny_since: None,
22370 },
22371 Lint {
22372 label: "clippy::panic_in_result_fn",
22373 description: r##"Checks for usage of `panic!` or assertions in a function whose return type is `Result`."##,
22374 default_severity: Severity::Allow,
22375 warn_since: None,
22376 deny_since: None,
22377 },
22378 Lint {
22379 label: "clippy::panicking_overflow_checks",
22380 description: r##"Detects C-style underflow/overflow checks."##,
22381 default_severity: Severity::Allow,
22382 warn_since: None,
22383 deny_since: None,
22384 },
22385 Lint {
22386 label: "clippy::panicking_unwrap",
22387 description: r##"Checks for calls of `unwrap[_err]()` that will always fail."##,
22388 default_severity: Severity::Allow,
22389 warn_since: None,
22390 deny_since: None,
22391 },
22392 Lint {
22393 label: "clippy::partial_pub_fields",
22394 description: r##"Checks whether some but not all fields of a `struct` are public.
22395
22396Either make all fields of a type public, or make none of them public"##,
22397 default_severity: Severity::Allow,
22398 warn_since: None,
22399 deny_since: None,
22400 },
22401 Lint {
22402 label: "clippy::partialeq_ne_impl",
22403 description: r##"Checks for manual re-implementations of `PartialEq::ne`."##,
22404 default_severity: Severity::Allow,
22405 warn_since: None,
22406 deny_since: None,
22407 },
22408 Lint {
22409 label: "clippy::partialeq_to_none",
22410 description: r##"Checks for binary comparisons to a literal `Option::None`."##,
22411 default_severity: Severity::Allow,
22412 warn_since: None,
22413 deny_since: None,
22414 },
22415 Lint {
22416 label: "clippy::path_buf_push_overwrite",
22417 description: r##"* Checks for [push](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.push)
22418calls on `PathBuf` that can cause overwrites."##,
22419 default_severity: Severity::Allow,
22420 warn_since: None,
22421 deny_since: None,
22422 },
22423 Lint {
22424 label: "clippy::path_ends_with_ext",
22425 description: r##"Looks for calls to `Path::ends_with` calls where the argument looks like a file extension.
22426
22427By default, Clippy has a short list of known filenames that start with a dot
22428but aren't necessarily file extensions (e.g. the `.git` folder), which are allowed by default.
22429The `allowed-dotfiles` configuration can be used to allow additional
22430file extensions that Clippy should not lint."##,
22431 default_severity: Severity::Allow,
22432 warn_since: None,
22433 deny_since: None,
22434 },
22435 Lint {
22436 label: "clippy::pathbuf_init_then_push",
22437 description: r##"Checks for calls to `push` immediately after creating a new `PathBuf`."##,
22438 default_severity: Severity::Allow,
22439 warn_since: None,
22440 deny_since: None,
22441 },
22442 Lint {
22443 label: "clippy::pattern_type_mismatch",
22444 description: r##"Checks for patterns that aren't exact representations of the types
22445they are applied to.
22446
22447To satisfy this lint, you will have to adjust either the expression that is matched
22448against or the pattern itself, as well as the bindings that are introduced by the
22449adjusted patterns. For matching you will have to either dereference the expression
22450with the `*` operator, or amend the patterns to explicitly match against `&<pattern>`
22451or `&mut <pattern>` depending on the reference mutability. For the bindings you need
22452to use the inverse. You can leave them as plain bindings if you wish for the value
22453to be copied, but you must use `ref mut <variable>` or `ref <variable>` to construct
22454a reference into the matched structure.
22455
22456If you are looking for a way to learn about ownership semantics in more detail, it
22457is recommended to look at IDE options available to you to highlight types, lifetimes
22458and reference semantics in your code. The available tooling would expose these things
22459in a general way even outside of the various pattern matching mechanics. Of course
22460this lint can still be used to highlight areas of interest and ensure a good understanding
22461of ownership semantics."##,
22462 default_severity: Severity::Allow,
22463 warn_since: None,
22464 deny_since: None,
22465 },
22466 Lint {
22467 label: "clippy::permissions_set_readonly_false",
22468 description: r##"Checks for calls to `std::fs::Permissions.set_readonly` with argument `false`."##,
22469 default_severity: Severity::Allow,
22470 warn_since: None,
22471 deny_since: None,
22472 },
22473 Lint {
22474 label: "clippy::pointers_in_nomem_asm_block",
22475 description: r##"Checks if any pointer is being passed to an asm! block with `nomem` option."##,
22476 default_severity: Severity::Allow,
22477 warn_since: None,
22478 deny_since: None,
22479 },
22480 Lint {
22481 label: "clippy::possible_missing_comma",
22482 description: r##"Checks for possible missing comma in an array. It lints if
22483an array element is a binary operator expression and it lies on two lines."##,
22484 default_severity: Severity::Allow,
22485 warn_since: None,
22486 deny_since: None,
22487 },
22488 Lint {
22489 label: "clippy::precedence",
22490 description: r##"Checks for operations where precedence may be unclear
22491and suggests to add parentheses. Currently it catches the following:
22492* mixed usage of arithmetic and bit shifting/combining operators without
22493parentheses"##,
22494 default_severity: Severity::Allow,
22495 warn_since: None,
22496 deny_since: None,
22497 },
22498 Lint {
22499 label: "clippy::print_in_format_impl",
22500 description: r##"Checks for usage of `println`, `print`, `eprintln` or `eprint` in an
22501implementation of a formatting trait."##,
22502 default_severity: Severity::Allow,
22503 warn_since: None,
22504 deny_since: None,
22505 },
22506 Lint {
22507 label: "clippy::print_literal",
22508 description: r##"This lint warns about the use of literals as `print!`/`println!` args."##,
22509 default_severity: Severity::Allow,
22510 warn_since: None,
22511 deny_since: None,
22512 },
22513 Lint {
22514 label: "clippy::print_stderr",
22515 description: r##"Checks for printing on *stderr*. The purpose of this lint
22516is to catch debugging remnants."##,
22517 default_severity: Severity::Allow,
22518 warn_since: None,
22519 deny_since: None,
22520 },
22521 Lint {
22522 label: "clippy::print_stdout",
22523 description: r##"Checks for printing on *stdout*. The purpose of this lint
22524is to catch debugging remnants."##,
22525 default_severity: Severity::Allow,
22526 warn_since: None,
22527 deny_since: None,
22528 },
22529 Lint {
22530 label: "clippy::print_with_newline",
22531 description: r##"This lint warns when you use `print!()` with a format
22532string that ends in a newline."##,
22533 default_severity: Severity::Allow,
22534 warn_since: None,
22535 deny_since: None,
22536 },
22537 Lint {
22538 label: "clippy::println_empty_string",
22539 description: r##"This lint warns when you use `println!()` to
22540print a newline."##,
22541 default_severity: Severity::Allow,
22542 warn_since: None,
22543 deny_since: None,
22544 },
22545 Lint {
22546 label: "clippy::ptr_arg",
22547 description: r##"This lint checks for function arguments of type `&String`, `&Vec`,
22548`&PathBuf`, and `Cow<_>`. It will also suggest you replace `.clone()` calls
22549with the appropriate `.to_owned()`/`to_string()` calls."##,
22550 default_severity: Severity::Allow,
22551 warn_since: None,
22552 deny_since: None,
22553 },
22554 Lint {
22555 label: "clippy::ptr_as_ptr",
22556 description: r##"Checks for `as` casts between raw pointers that don't change their
22557constness, namely `*const T` to `*const U` and `*mut T` to `*mut U`."##,
22558 default_severity: Severity::Allow,
22559 warn_since: None,
22560 deny_since: None,
22561 },
22562 Lint {
22563 label: "clippy::ptr_cast_constness",
22564 description: r##"Checks for `as` casts between raw pointers that change their constness, namely `*const T` to
22565`*mut T` and `*mut T` to `*const T`."##,
22566 default_severity: Severity::Allow,
22567 warn_since: None,
22568 deny_since: None,
22569 },
22570 Lint {
22571 label: "clippy::ptr_eq",
22572 description: r##"Use `std::ptr::eq` when applicable"##,
22573 default_severity: Severity::Allow,
22574 warn_since: None,
22575 deny_since: None,
22576 },
22577 Lint {
22578 label: "clippy::ptr_offset_with_cast",
22579 description: r##"Checks for usage of the `offset` pointer method with a `usize` casted to an
22580`isize`."##,
22581 default_severity: Severity::Allow,
22582 warn_since: None,
22583 deny_since: None,
22584 },
22585 Lint {
22586 label: "clippy::pub_enum_variant_names",
22587 description: r##"Nothing. This lint has been deprecated"##,
22588 default_severity: Severity::Allow,
22589 warn_since: None,
22590 deny_since: None,
22591 },
22592 Lint {
22593 label: "clippy::pub_underscore_fields",
22594 description: r##"Checks whether any field of the struct is prefixed with an `_` (underscore) and also marked
22595`pub` (public)"##,
22596 default_severity: Severity::Allow,
22597 warn_since: None,
22598 deny_since: None,
22599 },
22600 Lint {
22601 label: "clippy::pub_use",
22602 description: r##"Restricts the usage of `pub use ...`"##,
22603 default_severity: Severity::Allow,
22604 warn_since: None,
22605 deny_since: None,
22606 },
22607 Lint {
22608 label: "clippy::pub_with_shorthand",
22609 description: r##"Checks for usage of `pub(<loc>)` with `in`."##,
22610 default_severity: Severity::Allow,
22611 warn_since: None,
22612 deny_since: None,
22613 },
22614 Lint {
22615 label: "clippy::pub_without_shorthand",
22616 description: r##"Checks for usage of `pub(<loc>)` without `in`.
22617
22618Note: As you cannot write a module's path in `pub(<loc>)`, this will only trigger on
22619`pub(super)` and the like."##,
22620 default_severity: Severity::Allow,
22621 warn_since: None,
22622 deny_since: None,
22623 },
22624 Lint {
22625 label: "clippy::question_mark",
22626 description: r##"Checks for expressions that could be replaced by the question mark operator."##,
22627 default_severity: Severity::Allow,
22628 warn_since: None,
22629 deny_since: None,
22630 },
22631 Lint {
22632 label: "clippy::question_mark_used",
22633 description: r##"Checks for expressions that use the question mark operator and rejects them."##,
22634 default_severity: Severity::Allow,
22635 warn_since: None,
22636 deny_since: None,
22637 },
22638 Lint {
22639 label: "clippy::range_minus_one",
22640 description: r##"Checks for inclusive ranges where 1 is subtracted from
22641the upper bound, e.g., `x..=(y-1)`."##,
22642 default_severity: Severity::Allow,
22643 warn_since: None,
22644 deny_since: None,
22645 },
22646 Lint {
22647 label: "clippy::range_plus_one",
22648 description: r##"Checks for exclusive ranges where 1 is added to the
22649upper bound, e.g., `x..(y+1)`."##,
22650 default_severity: Severity::Allow,
22651 warn_since: None,
22652 deny_since: None,
22653 },
22654 Lint {
22655 label: "clippy::range_step_by_zero",
22656 description: r##"Nothing. This lint has been deprecated"##,
22657 default_severity: Severity::Allow,
22658 warn_since: None,
22659 deny_since: None,
22660 },
22661 Lint {
22662 label: "clippy::range_zip_with_len",
22663 description: r##"Checks for zipping a collection with the range of
22664`0.._.len()`."##,
22665 default_severity: Severity::Allow,
22666 warn_since: None,
22667 deny_since: None,
22668 },
22669 Lint {
22670 label: "clippy::rc_buffer",
22671 description: r##"Checks for `Rc<T>` and `Arc<T>` when `T` is a mutable buffer type such as `String` or `Vec`."##,
22672 default_severity: Severity::Allow,
22673 warn_since: None,
22674 deny_since: None,
22675 },
22676 Lint {
22677 label: "clippy::rc_clone_in_vec_init",
22678 description: r##"Checks for reference-counted pointers (`Arc`, `Rc`, `rc::Weak`, and `sync::Weak`)
22679in `vec![elem; len]`"##,
22680 default_severity: Severity::Allow,
22681 warn_since: None,
22682 deny_since: None,
22683 },
22684 Lint {
22685 label: "clippy::rc_mutex",
22686 description: r##"Checks for `Rc<Mutex<T>>`."##,
22687 default_severity: Severity::Allow,
22688 warn_since: None,
22689 deny_since: None,
22690 },
22691 Lint {
22692 label: "clippy::read_line_without_trim",
22693 description: r##"Looks for calls to [`Stdin::read_line`] to read a line from the standard input
22694into a string, then later attempting to use that string for an operation that will never
22695work for strings with a trailing newline character in it (e.g. parsing into a `i32`)."##,
22696 default_severity: Severity::Allow,
22697 warn_since: None,
22698 deny_since: None,
22699 },
22700 Lint {
22701 label: "clippy::read_zero_byte_vec",
22702 description: r##"This lint catches reads into a zero-length `Vec`.
22703Especially in the case of a call to `with_capacity`, this lint warns that read
22704gets the number of bytes from the `Vec`'s length, not its capacity."##,
22705 default_severity: Severity::Allow,
22706 warn_since: None,
22707 deny_since: None,
22708 },
22709 Lint {
22710 label: "clippy::readonly_write_lock",
22711 description: r##"Looks for calls to `RwLock::write` where the lock is only used for reading."##,
22712 default_severity: Severity::Allow,
22713 warn_since: None,
22714 deny_since: None,
22715 },
22716 Lint {
22717 label: "clippy::recursive_format_impl",
22718 description: r##"Checks for format trait implementations (e.g. `Display`) with a recursive call to itself
22719which uses `self` as a parameter.
22720This is typically done indirectly with the `write!` macro or with `to_string()`."##,
22721 default_severity: Severity::Allow,
22722 warn_since: None,
22723 deny_since: None,
22724 },
22725 Lint {
22726 label: "clippy::redundant_allocation",
22727 description: r##"Checks for usage of redundant allocations anywhere in the code."##,
22728 default_severity: Severity::Allow,
22729 warn_since: None,
22730 deny_since: None,
22731 },
22732 Lint {
22733 label: "clippy::redundant_as_str",
22734 description: r##"Checks for usage of `as_str()` on a `String` chained with a method available on the `String` itself."##,
22735 default_severity: Severity::Allow,
22736 warn_since: None,
22737 deny_since: None,
22738 },
22739 Lint {
22740 label: "clippy::redundant_async_block",
22741 description: r##"Checks for `async` block that only returns `await` on a future."##,
22742 default_severity: Severity::Allow,
22743 warn_since: None,
22744 deny_since: None,
22745 },
22746 Lint {
22747 label: "clippy::redundant_at_rest_pattern",
22748 description: r##"Checks for `[all @ ..]` patterns."##,
22749 default_severity: Severity::Allow,
22750 warn_since: None,
22751 deny_since: None,
22752 },
22753 Lint {
22754 label: "clippy::redundant_clone",
22755 description: r##"Checks for a redundant `clone()` (and its relatives) which clones an owned
22756value that is going to be dropped without further use."##,
22757 default_severity: Severity::Allow,
22758 warn_since: None,
22759 deny_since: None,
22760 },
22761 Lint {
22762 label: "clippy::redundant_closure",
22763 description: r##"Checks for closures which just call another function where
22764the function can be called directly. `unsafe` functions, calls where types
22765get adjusted or where the callee is marked `#[track_caller]` are ignored."##,
22766 default_severity: Severity::Allow,
22767 warn_since: None,
22768 deny_since: None,
22769 },
22770 Lint {
22771 label: "clippy::redundant_closure_call",
22772 description: r##"Detects closures called in the same expression where they
22773are defined."##,
22774 default_severity: Severity::Allow,
22775 warn_since: None,
22776 deny_since: None,
22777 },
22778 Lint {
22779 label: "clippy::redundant_closure_for_method_calls",
22780 description: r##"Checks for closures which only invoke a method on the closure
22781argument and can be replaced by referencing the method directly."##,
22782 default_severity: Severity::Allow,
22783 warn_since: None,
22784 deny_since: None,
22785 },
22786 Lint {
22787 label: "clippy::redundant_comparisons",
22788 description: r##"Checks for ineffective double comparisons against constants."##,
22789 default_severity: Severity::Allow,
22790 warn_since: None,
22791 deny_since: None,
22792 },
22793 Lint {
22794 label: "clippy::redundant_else",
22795 description: r##"Checks for `else` blocks that can be removed without changing semantics."##,
22796 default_severity: Severity::Allow,
22797 warn_since: None,
22798 deny_since: None,
22799 },
22800 Lint {
22801 label: "clippy::redundant_feature_names",
22802 description: r##"Checks for feature names with prefix `use-`, `with-` or suffix `-support`"##,
22803 default_severity: Severity::Allow,
22804 warn_since: None,
22805 deny_since: None,
22806 },
22807 Lint {
22808 label: "clippy::redundant_field_names",
22809 description: r##"Checks for fields in struct literals where shorthands
22810could be used."##,
22811 default_severity: Severity::Allow,
22812 warn_since: None,
22813 deny_since: None,
22814 },
22815 Lint {
22816 label: "clippy::redundant_guards",
22817 description: r##"Checks for unnecessary guards in match expressions."##,
22818 default_severity: Severity::Allow,
22819 warn_since: None,
22820 deny_since: None,
22821 },
22822 Lint {
22823 label: "clippy::redundant_locals",
22824 description: r##"Checks for redundant redefinitions of local bindings."##,
22825 default_severity: Severity::Allow,
22826 warn_since: None,
22827 deny_since: None,
22828 },
22829 Lint {
22830 label: "clippy::redundant_pattern",
22831 description: r##"Checks for patterns in the form `name @ _`."##,
22832 default_severity: Severity::Allow,
22833 warn_since: None,
22834 deny_since: None,
22835 },
22836 Lint {
22837 label: "clippy::redundant_pattern_matching",
22838 description: r##"Lint for redundant pattern matching over `Result`, `Option`,
22839`std::task::Poll`, `std::net::IpAddr` or `bool`s"##,
22840 default_severity: Severity::Allow,
22841 warn_since: None,
22842 deny_since: None,
22843 },
22844 Lint {
22845 label: "clippy::redundant_pub_crate",
22846 description: r##"Checks for items declared `pub(crate)` that are not crate visible because they
22847are inside a private module."##,
22848 default_severity: Severity::Allow,
22849 warn_since: None,
22850 deny_since: None,
22851 },
22852 Lint {
22853 label: "clippy::redundant_slicing",
22854 description: r##"Checks for redundant slicing expressions which use the full range, and
22855do not change the type."##,
22856 default_severity: Severity::Allow,
22857 warn_since: None,
22858 deny_since: None,
22859 },
22860 Lint {
22861 label: "clippy::redundant_static_lifetimes",
22862 description: r##"Checks for constants and statics with an explicit `'static` lifetime."##,
22863 default_severity: Severity::Allow,
22864 warn_since: None,
22865 deny_since: None,
22866 },
22867 Lint {
22868 label: "clippy::redundant_type_annotations",
22869 description: r##"Warns about needless / redundant type annotations."##,
22870 default_severity: Severity::Allow,
22871 warn_since: None,
22872 deny_since: None,
22873 },
22874 Lint {
22875 label: "clippy::ref_as_ptr",
22876 description: r##"Checks for casts of references to pointer using `as`
22877and suggests `std::ptr::from_ref` and `std::ptr::from_mut` instead."##,
22878 default_severity: Severity::Allow,
22879 warn_since: None,
22880 deny_since: None,
22881 },
22882 Lint {
22883 label: "clippy::ref_binding_to_reference",
22884 description: r##"Checks for `ref` bindings which create a reference to a reference."##,
22885 default_severity: Severity::Allow,
22886 warn_since: None,
22887 deny_since: None,
22888 },
22889 Lint {
22890 label: "clippy::ref_option",
22891 description: r##"Warns when a function signature uses `&Option<T>` instead of `Option<&T>`."##,
22892 default_severity: Severity::Allow,
22893 warn_since: None,
22894 deny_since: None,
22895 },
22896 Lint {
22897 label: "clippy::ref_option_ref",
22898 description: r##"Checks for usage of `&Option<&T>`."##,
22899 default_severity: Severity::Allow,
22900 warn_since: None,
22901 deny_since: None,
22902 },
22903 Lint {
22904 label: "clippy::ref_patterns",
22905 description: r##"Checks for usages of the `ref` keyword."##,
22906 default_severity: Severity::Allow,
22907 warn_since: None,
22908 deny_since: None,
22909 },
22910 Lint {
22911 label: "clippy::regex_macro",
22912 description: r##"Nothing. This lint has been deprecated"##,
22913 default_severity: Severity::Allow,
22914 warn_since: None,
22915 deny_since: None,
22916 },
22917 Lint {
22918 label: "clippy::renamed_function_params",
22919 description: r##"Lints when the name of function parameters from trait impl is
22920different than its default implementation."##,
22921 default_severity: Severity::Allow,
22922 warn_since: None,
22923 deny_since: None,
22924 },
22925 Lint {
22926 label: "clippy::repeat_once",
22927 description: r##"Checks for usage of `.repeat(1)` and suggest the following method for each types.
22928- `.to_string()` for `str`
22929- `.clone()` for `String`
22930- `.to_vec()` for `slice`
22931
22932The lint will evaluate constant expressions and values as arguments of `.repeat(..)` and emit a message if
22933they are equivalent to `1`. (Related discussion in [rust-clippy#7306](https://github.com/rust-lang/rust-clippy/issues/7306))"##,
22934 default_severity: Severity::Allow,
22935 warn_since: None,
22936 deny_since: None,
22937 },
22938 Lint {
22939 label: "clippy::repeat_vec_with_capacity",
22940 description: r##"Looks for patterns such as `vec![Vec::with_capacity(x); n]` or `iter::repeat(Vec::with_capacity(x))`."##,
22941 default_severity: Severity::Allow,
22942 warn_since: None,
22943 deny_since: None,
22944 },
22945 Lint {
22946 label: "clippy::replace_consts",
22947 description: r##"Nothing. This lint has been deprecated"##,
22948 default_severity: Severity::Allow,
22949 warn_since: None,
22950 deny_since: None,
22951 },
22952 Lint {
22953 label: "clippy::reserve_after_initialization",
22954 description: r##"Informs the user about a more concise way to create a vector with a known capacity."##,
22955 default_severity: Severity::Allow,
22956 warn_since: None,
22957 deny_since: None,
22958 },
22959 Lint {
22960 label: "clippy::rest_pat_in_fully_bound_structs",
22961 description: r##"Checks for unnecessary '..' pattern binding on struct when all fields are explicitly matched."##,
22962 default_severity: Severity::Allow,
22963 warn_since: None,
22964 deny_since: None,
22965 },
22966 Lint {
22967 label: "clippy::result_filter_map",
22968 description: r##"Checks for iterators of `Result`s using `.filter(Result::is_ok).map(Result::unwrap)` that may
22969be replaced with a `.flatten()` call."##,
22970 default_severity: Severity::Allow,
22971 warn_since: None,
22972 deny_since: None,
22973 },
22974 Lint {
22975 label: "clippy::result_large_err",
22976 description: r##"Checks for functions that return `Result` with an unusually large
22977`Err`-variant."##,
22978 default_severity: Severity::Allow,
22979 warn_since: None,
22980 deny_since: None,
22981 },
22982 Lint {
22983 label: "clippy::result_map_or_into_option",
22984 description: r##"Checks for usage of `_.map_or(None, Some)`."##,
22985 default_severity: Severity::Allow,
22986 warn_since: None,
22987 deny_since: None,
22988 },
22989 Lint {
22990 label: "clippy::result_map_unit_fn",
22991 description: r##"Checks for usage of `result.map(f)` where f is a function
22992or closure that returns the unit type `()`."##,
22993 default_severity: Severity::Allow,
22994 warn_since: None,
22995 deny_since: None,
22996 },
22997 Lint {
22998 label: "clippy::result_unit_err",
22999 description: r##"Checks for public functions that return a `Result`
23000with an `Err` type of `()`. It suggests using a custom type that
23001implements `std::error::Error`."##,
23002 default_severity: Severity::Allow,
23003 warn_since: None,
23004 deny_since: None,
23005 },
23006 Lint {
23007 label: "clippy::return_self_not_must_use",
23008 description: r##"This lint warns when a method returning `Self` doesn't have the `#[must_use]` attribute."##,
23009 default_severity: Severity::Allow,
23010 warn_since: None,
23011 deny_since: None,
23012 },
23013 Lint {
23014 label: "clippy::reversed_empty_ranges",
23015 description: r##"Checks for range expressions `x..y` where both `x` and `y`
23016are constant and `x` is greater to `y`. Also triggers if `x` is equal to `y` when they are conditions to a `for` loop."##,
23017 default_severity: Severity::Allow,
23018 warn_since: None,
23019 deny_since: None,
23020 },
23021 Lint {
23022 label: "clippy::same_functions_in_if_condition",
23023 description: r##"Checks for consecutive `if`s with the same function call."##,
23024 default_severity: Severity::Allow,
23025 warn_since: None,
23026 deny_since: None,
23027 },
23028 Lint {
23029 label: "clippy::same_item_push",
23030 description: r##"Checks whether a for loop is being used to push a constant
23031value into a Vec."##,
23032 default_severity: Severity::Allow,
23033 warn_since: None,
23034 deny_since: None,
23035 },
23036 Lint {
23037 label: "clippy::same_name_method",
23038 description: r##"It lints if a struct has two methods with the same name:
23039one from a trait, another not from a trait."##,
23040 default_severity: Severity::Allow,
23041 warn_since: None,
23042 deny_since: None,
23043 },
23044 Lint {
23045 label: "clippy::search_is_some",
23046 description: r##"Checks for an iterator or string search (such as `find()`,
23047`position()`, or `rposition()`) followed by a call to `is_some()` or `is_none()`."##,
23048 default_severity: Severity::Allow,
23049 warn_since: None,
23050 deny_since: None,
23051 },
23052 Lint {
23053 label: "clippy::seek_from_current",
23054 description: r##"Checks if the `seek` method of the `Seek` trait is called with `SeekFrom::Current(0)`,
23055and if it is, suggests using `stream_position` instead."##,
23056 default_severity: Severity::Allow,
23057 warn_since: None,
23058 deny_since: None,
23059 },
23060 Lint {
23061 label: "clippy::seek_to_start_instead_of_rewind",
23062 description: r##"Checks for jumps to the start of a stream that implements `Seek`
23063and uses the `seek` method providing `Start` as parameter."##,
23064 default_severity: Severity::Allow,
23065 warn_since: None,
23066 deny_since: None,
23067 },
23068 Lint {
23069 label: "clippy::self_assignment",
23070 description: r##"Checks for explicit self-assignments."##,
23071 default_severity: Severity::Allow,
23072 warn_since: None,
23073 deny_since: None,
23074 },
23075 Lint {
23076 label: "clippy::self_named_constructors",
23077 description: r##"Warns when constructors have the same name as their types."##,
23078 default_severity: Severity::Allow,
23079 warn_since: None,
23080 deny_since: None,
23081 },
23082 Lint {
23083 label: "clippy::self_named_module_files",
23084 description: r##"Checks that module layout uses only `mod.rs` files."##,
23085 default_severity: Severity::Allow,
23086 warn_since: None,
23087 deny_since: None,
23088 },
23089 Lint {
23090 label: "clippy::semicolon_if_nothing_returned",
23091 description: r##"Looks for blocks of expressions and fires if the last expression returns
23092`()` but is not followed by a semicolon."##,
23093 default_severity: Severity::Allow,
23094 warn_since: None,
23095 deny_since: None,
23096 },
23097 Lint {
23098 label: "clippy::semicolon_inside_block",
23099 description: r##"Suggests moving the semicolon after a block to the inside of the block, after its last
23100expression."##,
23101 default_severity: Severity::Allow,
23102 warn_since: None,
23103 deny_since: None,
23104 },
23105 Lint {
23106 label: "clippy::semicolon_outside_block",
23107 description: r##"Suggests moving the semicolon from a block's final expression outside of the block."##,
23108 default_severity: Severity::Allow,
23109 warn_since: None,
23110 deny_since: None,
23111 },
23112 Lint {
23113 label: "clippy::separated_literal_suffix",
23114 description: r##"Warns if literal suffixes are separated by an underscore.
23115To enforce separated literal suffix style,
23116see the `unseparated_literal_suffix` lint."##,
23117 default_severity: Severity::Allow,
23118 warn_since: None,
23119 deny_since: None,
23120 },
23121 Lint {
23122 label: "clippy::serde_api_misuse",
23123 description: r##"Checks for misuses of the serde API."##,
23124 default_severity: Severity::Allow,
23125 warn_since: None,
23126 deny_since: None,
23127 },
23128 Lint {
23129 label: "clippy::set_contains_or_insert",
23130 description: r##"Checks for usage of `contains` to see if a value is not present
23131in a set like `HashSet` or `BTreeSet`, followed by an `insert`."##,
23132 default_severity: Severity::Allow,
23133 warn_since: None,
23134 deny_since: None,
23135 },
23136 Lint {
23137 label: "clippy::shadow_reuse",
23138 description: r##"Checks for bindings that shadow other bindings already in
23139scope, while reusing the original value."##,
23140 default_severity: Severity::Allow,
23141 warn_since: None,
23142 deny_since: None,
23143 },
23144 Lint {
23145 label: "clippy::shadow_same",
23146 description: r##"Checks for bindings that shadow other bindings already in
23147scope, while just changing reference level or mutability."##,
23148 default_severity: Severity::Allow,
23149 warn_since: None,
23150 deny_since: None,
23151 },
23152 Lint {
23153 label: "clippy::shadow_unrelated",
23154 description: r##"Checks for bindings that shadow other bindings already in
23155scope, either without an initialization or with one that does not even use
23156the original value."##,
23157 default_severity: Severity::Allow,
23158 warn_since: None,
23159 deny_since: None,
23160 },
23161 Lint {
23162 label: "clippy::short_circuit_statement",
23163 description: r##"Checks for the use of short circuit boolean conditions as
23164a
23165statement."##,
23166 default_severity: Severity::Allow,
23167 warn_since: None,
23168 deny_since: None,
23169 },
23170 Lint {
23171 label: "clippy::should_assert_eq",
23172 description: r##"Nothing. This lint has been deprecated"##,
23173 default_severity: Severity::Allow,
23174 warn_since: None,
23175 deny_since: None,
23176 },
23177 Lint {
23178 label: "clippy::should_implement_trait",
23179 description: r##"Checks for methods that should live in a trait
23180implementation of a `std` trait (see [llogiq's blog
23181post](http://llogiq.github.io/2015/07/30/traits.html) for further
23182information) instead of an inherent implementation."##,
23183 default_severity: Severity::Allow,
23184 warn_since: None,
23185 deny_since: None,
23186 },
23187 Lint {
23188 label: "clippy::should_panic_without_expect",
23189 description: r##"Checks for `#[should_panic]` attributes without specifying the expected panic message."##,
23190 default_severity: Severity::Allow,
23191 warn_since: None,
23192 deny_since: None,
23193 },
23194 Lint {
23195 label: "clippy::significant_drop_in_scrutinee",
23196 description: r##"Checks for temporaries returned from function calls in a match scrutinee that have the
23197`clippy::has_significant_drop` attribute."##,
23198 default_severity: Severity::Allow,
23199 warn_since: None,
23200 deny_since: None,
23201 },
23202 Lint {
23203 label: "clippy::significant_drop_tightening",
23204 description: r##"Searches for elements marked with `#[clippy::has_significant_drop]` that could be early
23205dropped but are in fact dropped at the end of their scopes. In other words, enforces the
23206tightening of their possible lifetimes."##,
23207 default_severity: Severity::Allow,
23208 warn_since: None,
23209 deny_since: None,
23210 },
23211 Lint {
23212 label: "clippy::similar_names",
23213 description: r##"Checks for names that are very similar and thus confusing.
23214
23215Note: this lint looks for similar names throughout each
23216scope. To allow it, you need to allow it on the scope
23217level, not on the name that is reported."##,
23218 default_severity: Severity::Allow,
23219 warn_since: None,
23220 deny_since: None,
23221 },
23222 Lint {
23223 label: "clippy::single_call_fn",
23224 description: r##"Checks for functions that are only used once. Does not lint tests."##,
23225 default_severity: Severity::Allow,
23226 warn_since: None,
23227 deny_since: None,
23228 },
23229 Lint {
23230 label: "clippy::single_char_add_str",
23231 description: r##"Warns when using `push_str`/`insert_str` with a single-character string literal
23232where `push`/`insert` with a `char` would work fine."##,
23233 default_severity: Severity::Allow,
23234 warn_since: None,
23235 deny_since: None,
23236 },
23237 Lint {
23238 label: "clippy::single_char_lifetime_names",
23239 description: r##"Checks for lifetimes with names which are one character
23240long."##,
23241 default_severity: Severity::Allow,
23242 warn_since: None,
23243 deny_since: None,
23244 },
23245 Lint {
23246 label: "clippy::single_char_pattern",
23247 description: r##"Checks for string methods that receive a single-character
23248`str` as an argument, e.g., `_.split(x)`."##,
23249 default_severity: Severity::Allow,
23250 warn_since: None,
23251 deny_since: None,
23252 },
23253 Lint {
23254 label: "clippy::single_component_path_imports",
23255 description: r##"Checking for imports with single component use path."##,
23256 default_severity: Severity::Allow,
23257 warn_since: None,
23258 deny_since: None,
23259 },
23260 Lint {
23261 label: "clippy::single_element_loop",
23262 description: r##"Checks whether a for loop has a single element."##,
23263 default_severity: Severity::Allow,
23264 warn_since: None,
23265 deny_since: None,
23266 },
23267 Lint {
23268 label: "clippy::single_match",
23269 description: r##"Checks for matches with a single arm where an `if let`
23270will usually suffice.
23271
23272This intentionally does not lint if there are comments
23273inside of the other arm, so as to allow the user to document
23274why having another explicit pattern with an empty body is necessary,
23275or because the comments need to be preserved for other reasons."##,
23276 default_severity: Severity::Allow,
23277 warn_since: None,
23278 deny_since: None,
23279 },
23280 Lint {
23281 label: "clippy::single_match_else",
23282 description: r##"Checks for matches with two arms where an `if let else` will
23283usually suffice."##,
23284 default_severity: Severity::Allow,
23285 warn_since: None,
23286 deny_since: None,
23287 },
23288 Lint {
23289 label: "clippy::single_range_in_vec_init",
23290 description: r##"Checks for `Vec` or array initializations that contain only one range."##,
23291 default_severity: Severity::Allow,
23292 warn_since: None,
23293 deny_since: None,
23294 },
23295 Lint {
23296 label: "clippy::size_of_in_element_count",
23297 description: r##"Detects expressions where
23298`size_of::<T>` or `size_of_val::<T>` is used as a
23299count of elements of type `T`"##,
23300 default_severity: Severity::Allow,
23301 warn_since: None,
23302 deny_since: None,
23303 },
23304 Lint {
23305 label: "clippy::size_of_ref",
23306 description: r##"Checks for calls to `std::mem::size_of_val()` where the argument is
23307a reference to a reference."##,
23308 default_severity: Severity::Allow,
23309 warn_since: None,
23310 deny_since: None,
23311 },
23312 Lint {
23313 label: "clippy::skip_while_next",
23314 description: r##"Checks for usage of `_.skip_while(condition).next()`."##,
23315 default_severity: Severity::Allow,
23316 warn_since: None,
23317 deny_since: None,
23318 },
23319 Lint {
23320 label: "clippy::slow_vector_initialization",
23321 description: r##"Checks slow zero-filled vector initialization"##,
23322 default_severity: Severity::Allow,
23323 warn_since: None,
23324 deny_since: None,
23325 },
23326 Lint {
23327 label: "clippy::stable_sort_primitive",
23328 description: r##"When sorting primitive values (integers, bools, chars, as well
23329as arrays, slices, and tuples of such items), it is typically better to
23330use an unstable sort than a stable sort."##,
23331 default_severity: Severity::Allow,
23332 warn_since: None,
23333 deny_since: None,
23334 },
23335 Lint {
23336 label: "clippy::std_instead_of_alloc",
23337 description: r##"Finds items imported through `std` when available through `alloc`."##,
23338 default_severity: Severity::Allow,
23339 warn_since: None,
23340 deny_since: None,
23341 },
23342 Lint {
23343 label: "clippy::std_instead_of_core",
23344 description: r##"Finds items imported through `std` when available through `core`."##,
23345 default_severity: Severity::Allow,
23346 warn_since: None,
23347 deny_since: None,
23348 },
23349 Lint {
23350 label: "clippy::str_split_at_newline",
23351 description: r##"Checks for usages of `str.trim().split(\
23352)` and `str.trim().split(\\
23353)`."##,
23354 default_severity: Severity::Allow,
23355 warn_since: None,
23356 deny_since: None,
23357 },
23358 Lint {
23359 label: "clippy::str_to_string",
23360 description: r##"This lint checks for `.to_string()` method calls on values of type `&str`."##,
23361 default_severity: Severity::Allow,
23362 warn_since: None,
23363 deny_since: None,
23364 },
23365 Lint {
23366 label: "clippy::string_add",
23367 description: r##"Checks for all instances of `x + _` where `x` is of type
23368`String`, but only if [`string_add_assign`](#string_add_assign) does *not*
23369match."##,
23370 default_severity: Severity::Allow,
23371 warn_since: None,
23372 deny_since: None,
23373 },
23374 Lint {
23375 label: "clippy::string_add_assign",
23376 description: r##"Checks for string appends of the form `x = x + y` (without
23377`let`!)."##,
23378 default_severity: Severity::Allow,
23379 warn_since: None,
23380 deny_since: None,
23381 },
23382 Lint {
23383 label: "clippy::string_extend_chars",
23384 description: r##"Checks for the use of `.extend(s.chars())` where s is a
23385`&str` or `String`."##,
23386 default_severity: Severity::Allow,
23387 warn_since: None,
23388 deny_since: None,
23389 },
23390 Lint {
23391 label: "clippy::string_from_utf8_as_bytes",
23392 description: r##"Check if the string is transformed to byte array and casted back to string."##,
23393 default_severity: Severity::Allow,
23394 warn_since: None,
23395 deny_since: None,
23396 },
23397 Lint {
23398 label: "clippy::string_lit_as_bytes",
23399 description: r##"Checks for the `as_bytes` method called on string literals
23400that contain only ASCII characters."##,
23401 default_severity: Severity::Allow,
23402 warn_since: None,
23403 deny_since: None,
23404 },
23405 Lint {
23406 label: "clippy::string_lit_chars_any",
23407 description: r##"Checks for `<string_lit>.chars().any(|i| i == c)`."##,
23408 default_severity: Severity::Allow,
23409 warn_since: None,
23410 deny_since: None,
23411 },
23412 Lint {
23413 label: "clippy::string_slice",
23414 description: r##"Checks for slice operations on strings"##,
23415 default_severity: Severity::Allow,
23416 warn_since: None,
23417 deny_since: None,
23418 },
23419 Lint {
23420 label: "clippy::string_to_string",
23421 description: r##"This lint checks for `.to_string()` method calls on values of type `String`."##,
23422 default_severity: Severity::Allow,
23423 warn_since: None,
23424 deny_since: None,
23425 },
23426 Lint {
23427 label: "clippy::strlen_on_c_strings",
23428 description: r##"Checks for usage of `libc::strlen` on a `CString` or `CStr` value,
23429and suggest calling `as_bytes().len()` or `to_bytes().len()` respectively instead."##,
23430 default_severity: Severity::Allow,
23431 warn_since: None,
23432 deny_since: None,
23433 },
23434 Lint {
23435 label: "clippy::struct_excessive_bools",
23436 description: r##"Checks for excessive
23437use of bools in structs."##,
23438 default_severity: Severity::Allow,
23439 warn_since: None,
23440 deny_since: None,
23441 },
23442 Lint {
23443 label: "clippy::struct_field_names",
23444 description: r##"Detects struct fields that are prefixed or suffixed
23445by the same characters or the name of the struct itself."##,
23446 default_severity: Severity::Allow,
23447 warn_since: None,
23448 deny_since: None,
23449 },
23450 Lint {
23451 label: "clippy::suboptimal_flops",
23452 description: r##"Looks for floating-point expressions that
23453can be expressed using built-in methods to improve both
23454accuracy and performance."##,
23455 default_severity: Severity::Allow,
23456 warn_since: None,
23457 deny_since: None,
23458 },
23459 Lint {
23460 label: "clippy::suspicious_arithmetic_impl",
23461 description: r##"Lints for suspicious operations in impls of arithmetic operators, e.g.
23462subtracting elements in an Add impl."##,
23463 default_severity: Severity::Allow,
23464 warn_since: None,
23465 deny_since: None,
23466 },
23467 Lint {
23468 label: "clippy::suspicious_assignment_formatting",
23469 description: r##"Checks for usage of the non-existent `=*`, `=!` and `=-`
23470operators."##,
23471 default_severity: Severity::Allow,
23472 warn_since: None,
23473 deny_since: None,
23474 },
23475 Lint {
23476 label: "clippy::suspicious_command_arg_space",
23477 description: r##"Checks for `Command::arg()` invocations that look like they
23478should be multiple arguments instead, such as `arg(-t ext2)`."##,
23479 default_severity: Severity::Allow,
23480 warn_since: None,
23481 deny_since: None,
23482 },
23483 Lint {
23484 label: "clippy::suspicious_doc_comments",
23485 description: r##"Detects the use of outer doc comments (`///`, `/**`) followed by a bang (`!`): `///!`"##,
23486 default_severity: Severity::Allow,
23487 warn_since: None,
23488 deny_since: None,
23489 },
23490 Lint {
23491 label: "clippy::suspicious_else_formatting",
23492 description: r##"Checks for formatting of `else`. It lints if the `else`
23493is followed immediately by a newline or the `else` seems to be missing."##,
23494 default_severity: Severity::Allow,
23495 warn_since: None,
23496 deny_since: None,
23497 },
23498 Lint {
23499 label: "clippy::suspicious_map",
23500 description: r##"Checks for calls to `map` followed by a `count`."##,
23501 default_severity: Severity::Allow,
23502 warn_since: None,
23503 deny_since: None,
23504 },
23505 Lint {
23506 label: "clippy::suspicious_op_assign_impl",
23507 description: r##"Lints for suspicious operations in impls of OpAssign, e.g.
23508subtracting elements in an AddAssign impl."##,
23509 default_severity: Severity::Allow,
23510 warn_since: None,
23511 deny_since: None,
23512 },
23513 Lint {
23514 label: "clippy::suspicious_open_options",
23515 description: r##"Checks for the suspicious use of `OpenOptions::create()`
23516without an explicit `OpenOptions::truncate()`."##,
23517 default_severity: Severity::Allow,
23518 warn_since: None,
23519 deny_since: None,
23520 },
23521 Lint {
23522 label: "clippy::suspicious_operation_groupings",
23523 description: r##"Checks for unlikely usages of binary operators that are almost
23524certainly typos and/or copy/paste errors, given the other usages
23525of binary operators nearby."##,
23526 default_severity: Severity::Allow,
23527 warn_since: None,
23528 deny_since: None,
23529 },
23530 Lint {
23531 label: "clippy::suspicious_splitn",
23532 description: r##"Checks for calls to [`splitn`]
23533(https://doc.rust-lang.org/std/primitive.str.html#method.splitn) and
23534related functions with either zero or one splits."##,
23535 default_severity: Severity::Allow,
23536 warn_since: None,
23537 deny_since: None,
23538 },
23539 Lint {
23540 label: "clippy::suspicious_to_owned",
23541 description: r##"Checks for the usage of `_.to_owned()`, on a `Cow<'_, _>`."##,
23542 default_severity: Severity::Allow,
23543 warn_since: None,
23544 deny_since: None,
23545 },
23546 Lint {
23547 label: "clippy::suspicious_unary_op_formatting",
23548 description: r##"Checks the formatting of a unary operator on the right hand side
23549of a binary operator. It lints if there is no space between the binary and unary operators,
23550but there is a space between the unary and its operand."##,
23551 default_severity: Severity::Allow,
23552 warn_since: None,
23553 deny_since: None,
23554 },
23555 Lint {
23556 label: "clippy::suspicious_xor_used_as_pow",
23557 description: r##"Warns for a Bitwise XOR (`^`) operator being probably confused as a powering. It will not trigger if any of the numbers are not in decimal."##,
23558 default_severity: Severity::Allow,
23559 warn_since: None,
23560 deny_since: None,
23561 },
23562 Lint {
23563 label: "clippy::swap_ptr_to_ref",
23564 description: r##"Checks for calls to `core::mem::swap` where either parameter is derived from a pointer"##,
23565 default_severity: Severity::Allow,
23566 warn_since: None,
23567 deny_since: None,
23568 },
23569 Lint {
23570 label: "clippy::tabs_in_doc_comments",
23571 description: r##"Checks doc comments for usage of tab characters."##,
23572 default_severity: Severity::Allow,
23573 warn_since: None,
23574 deny_since: None,
23575 },
23576 Lint {
23577 label: "clippy::temporary_assignment",
23578 description: r##"Checks for construction of a structure or tuple just to
23579assign a value in it."##,
23580 default_severity: Severity::Allow,
23581 warn_since: None,
23582 deny_since: None,
23583 },
23584 Lint {
23585 label: "clippy::test_attr_in_doctest",
23586 description: r##"Checks for `#[test]` in doctests unless they are marked with
23587either `ignore`, `no_run` or `compile_fail`."##,
23588 default_severity: Severity::Allow,
23589 warn_since: None,
23590 deny_since: None,
23591 },
23592 Lint {
23593 label: "clippy::tests_outside_test_module",
23594 description: r##"Triggers when a testing function (marked with the `#[test]` attribute) isn't inside a testing module
23595(marked with `#[cfg(test)]`)."##,
23596 default_severity: Severity::Allow,
23597 warn_since: None,
23598 deny_since: None,
23599 },
23600 Lint {
23601 label: "clippy::to_digit_is_some",
23602 description: r##"Checks for `.to_digit(..).is_some()` on `char`s."##,
23603 default_severity: Severity::Allow,
23604 warn_since: None,
23605 deny_since: None,
23606 },
23607 Lint {
23608 label: "clippy::to_string_in_format_args",
23609 description: r##"Checks for [`ToString::to_string`](https://doc.rust-lang.org/std/string/trait.ToString.html#tymethod.to_string)
23610applied to a type that implements [`Display`](https://doc.rust-lang.org/std/fmt/trait.Display.html)
23611in a macro that does formatting."##,
23612 default_severity: Severity::Allow,
23613 warn_since: None,
23614 deny_since: None,
23615 },
23616 Lint {
23617 label: "clippy::to_string_trait_impl",
23618 description: r##"Checks for direct implementations of `ToString`."##,
23619 default_severity: Severity::Allow,
23620 warn_since: None,
23621 deny_since: None,
23622 },
23623 Lint {
23624 label: "clippy::todo",
23625 description: r##"Checks for usage of `todo!`."##,
23626 default_severity: Severity::Allow,
23627 warn_since: None,
23628 deny_since: None,
23629 },
23630 Lint {
23631 label: "clippy::too_long_first_doc_paragraph",
23632 description: r##"Checks if the first line in the documentation of items listed in module page is too long."##,
23633 default_severity: Severity::Allow,
23634 warn_since: None,
23635 deny_since: None,
23636 },
23637 Lint {
23638 label: "clippy::too_many_arguments",
23639 description: r##"Checks for functions with too many parameters."##,
23640 default_severity: Severity::Allow,
23641 warn_since: None,
23642 deny_since: None,
23643 },
23644 Lint {
23645 label: "clippy::too_many_lines",
23646 description: r##"Checks for functions with a large amount of lines."##,
23647 default_severity: Severity::Allow,
23648 warn_since: None,
23649 deny_since: None,
23650 },
23651 Lint {
23652 label: "clippy::toplevel_ref_arg",
23653 description: r##"Checks for function arguments and let bindings denoted as
23654`ref`."##,
23655 default_severity: Severity::Allow,
23656 warn_since: None,
23657 deny_since: None,
23658 },
23659 Lint {
23660 label: "clippy::trailing_empty_array",
23661 description: r##"Displays a warning when a struct with a trailing zero-sized array is declared without a `repr` attribute."##,
23662 default_severity: Severity::Allow,
23663 warn_since: None,
23664 deny_since: None,
23665 },
23666 Lint {
23667 label: "clippy::trait_duplication_in_bounds",
23668 description: r##"Checks for cases where generics or trait objects are being used and multiple
23669syntax specifications for trait bounds are used simultaneously."##,
23670 default_severity: Severity::Allow,
23671 warn_since: None,
23672 deny_since: None,
23673 },
23674 Lint {
23675 label: "clippy::transmute_bytes_to_str",
23676 description: r##"Checks for transmutes from a `&[u8]` to a `&str`."##,
23677 default_severity: Severity::Allow,
23678 warn_since: None,
23679 deny_since: None,
23680 },
23681 Lint {
23682 label: "clippy::transmute_float_to_int",
23683 description: r##"Checks for transmutes from a float to an integer."##,
23684 default_severity: Severity::Allow,
23685 warn_since: None,
23686 deny_since: None,
23687 },
23688 Lint {
23689 label: "clippy::transmute_int_to_bool",
23690 description: r##"Checks for transmutes from an integer to a `bool`."##,
23691 default_severity: Severity::Allow,
23692 warn_since: None,
23693 deny_since: None,
23694 },
23695 Lint {
23696 label: "clippy::transmute_int_to_char",
23697 description: r##"Checks for transmutes from an integer to a `char`."##,
23698 default_severity: Severity::Allow,
23699 warn_since: None,
23700 deny_since: None,
23701 },
23702 Lint {
23703 label: "clippy::transmute_int_to_float",
23704 description: r##"Checks for transmutes from an integer to a float."##,
23705 default_severity: Severity::Allow,
23706 warn_since: None,
23707 deny_since: None,
23708 },
23709 Lint {
23710 label: "clippy::transmute_int_to_non_zero",
23711 description: r##"Checks for transmutes from `T` to `NonZero<T>`, and suggests the `new_unchecked`
23712method instead."##,
23713 default_severity: Severity::Allow,
23714 warn_since: None,
23715 deny_since: None,
23716 },
23717 Lint {
23718 label: "clippy::transmute_null_to_fn",
23719 description: r##"Checks for null function pointer creation through transmute."##,
23720 default_severity: Severity::Allow,
23721 warn_since: None,
23722 deny_since: None,
23723 },
23724 Lint {
23725 label: "clippy::transmute_num_to_bytes",
23726 description: r##"Checks for transmutes from a number to an array of `u8`"##,
23727 default_severity: Severity::Allow,
23728 warn_since: None,
23729 deny_since: None,
23730 },
23731 Lint {
23732 label: "clippy::transmute_ptr_to_ptr",
23733 description: r##"Checks for transmutes from a pointer to a pointer, or
23734from a reference to a reference."##,
23735 default_severity: Severity::Allow,
23736 warn_since: None,
23737 deny_since: None,
23738 },
23739 Lint {
23740 label: "clippy::transmute_ptr_to_ref",
23741 description: r##"Checks for transmutes from a pointer to a reference."##,
23742 default_severity: Severity::Allow,
23743 warn_since: None,
23744 deny_since: None,
23745 },
23746 Lint {
23747 label: "clippy::transmute_undefined_repr",
23748 description: r##"Checks for transmutes between types which do not have a representation defined relative to
23749each other."##,
23750 default_severity: Severity::Allow,
23751 warn_since: None,
23752 deny_since: None,
23753 },
23754 Lint {
23755 label: "clippy::transmutes_expressible_as_ptr_casts",
23756 description: r##"Checks for transmutes that could be a pointer cast."##,
23757 default_severity: Severity::Allow,
23758 warn_since: None,
23759 deny_since: None,
23760 },
23761 Lint {
23762 label: "clippy::transmuting_null",
23763 description: r##"Checks for transmute calls which would receive a null pointer."##,
23764 default_severity: Severity::Allow,
23765 warn_since: None,
23766 deny_since: None,
23767 },
23768 Lint {
23769 label: "clippy::trim_split_whitespace",
23770 description: r##"Warns about calling `str::trim` (or variants) before `str::split_whitespace`."##,
23771 default_severity: Severity::Allow,
23772 warn_since: None,
23773 deny_since: None,
23774 },
23775 Lint {
23776 label: "clippy::trivial_regex",
23777 description: r##"Checks for trivial [regex](https://crates.io/crates/regex)
23778creation (with `Regex::new`, `RegexBuilder::new`, or `RegexSet::new`)."##,
23779 default_severity: Severity::Allow,
23780 warn_since: None,
23781 deny_since: None,
23782 },
23783 Lint {
23784 label: "clippy::trivially_copy_pass_by_ref",
23785 description: r##"Checks for functions taking arguments by reference, where
23786the argument type is `Copy` and small enough to be more efficient to always
23787pass by value."##,
23788 default_severity: Severity::Allow,
23789 warn_since: None,
23790 deny_since: None,
23791 },
23792 Lint {
23793 label: "clippy::try_err",
23794 description: r##"Checks for usage of `Err(x)?`."##,
23795 default_severity: Severity::Allow,
23796 warn_since: None,
23797 deny_since: None,
23798 },
23799 Lint {
23800 label: "clippy::tuple_array_conversions",
23801 description: r##"Checks for tuple<=>array conversions that are not done with `.into()`."##,
23802 default_severity: Severity::Allow,
23803 warn_since: None,
23804 deny_since: None,
23805 },
23806 Lint {
23807 label: "clippy::type_complexity",
23808 description: r##"Checks for types used in structs, parameters and `let`
23809declarations above a certain complexity threshold."##,
23810 default_severity: Severity::Allow,
23811 warn_since: None,
23812 deny_since: None,
23813 },
23814 Lint {
23815 label: "clippy::type_id_on_box",
23816 description: r##"Looks for calls to `.type_id()` on a `Box<dyn _>`."##,
23817 default_severity: Severity::Allow,
23818 warn_since: None,
23819 deny_since: None,
23820 },
23821 Lint {
23822 label: "clippy::type_repetition_in_bounds",
23823 description: r##"This lint warns about unnecessary type repetitions in trait bounds"##,
23824 default_severity: Severity::Allow,
23825 warn_since: None,
23826 deny_since: None,
23827 },
23828 Lint {
23829 label: "clippy::unchecked_duration_subtraction",
23830 description: r##"Lints subtraction between an `Instant` and a `Duration`."##,
23831 default_severity: Severity::Allow,
23832 warn_since: None,
23833 deny_since: None,
23834 },
23835 Lint {
23836 label: "clippy::unconditional_recursion",
23837 description: r##"Checks that there isn't an infinite recursion in trait
23838implementations."##,
23839 default_severity: Severity::Allow,
23840 warn_since: None,
23841 deny_since: None,
23842 },
23843 Lint {
23844 label: "clippy::undocumented_unsafe_blocks",
23845 description: r##"Checks for `unsafe` blocks and impls without a `// SAFETY: ` comment
23846explaining why the unsafe operations performed inside
23847the block are safe.
23848
23849Note the comment must appear on the line(s) preceding the unsafe block
23850with nothing appearing in between. The following is ok:
23851```rust
23852foo(
23853 // SAFETY:
23854 // This is a valid safety comment
23855 unsafe { *x }
23856)
23857```
23858But neither of these are:
23859```rust
23860// SAFETY:
23861// This is not a valid safety comment
23862foo(
23863 /* SAFETY: Neither is this */ unsafe { *x },
23864);
23865```"##,
23866 default_severity: Severity::Allow,
23867 warn_since: None,
23868 deny_since: None,
23869 },
23870 Lint {
23871 label: "clippy::unicode_not_nfc",
23872 description: r##"Checks for string literals that contain Unicode in a form
23873that is not equal to its
23874[NFC-recomposition](http://www.unicode.org/reports/tr15/#Norm_Forms)."##,
23875 default_severity: Severity::Allow,
23876 warn_since: None,
23877 deny_since: None,
23878 },
23879 Lint {
23880 label: "clippy::unimplemented",
23881 description: r##"Checks for usage of `unimplemented!`."##,
23882 default_severity: Severity::Allow,
23883 warn_since: None,
23884 deny_since: None,
23885 },
23886 Lint {
23887 label: "clippy::uninhabited_references",
23888 description: r##"It detects references to uninhabited types, such as `!` and
23889warns when those are either dereferenced or returned from a function."##,
23890 default_severity: Severity::Allow,
23891 warn_since: None,
23892 deny_since: None,
23893 },
23894 Lint {
23895 label: "clippy::uninit_assumed_init",
23896 description: r##"Checks for `MaybeUninit::uninit().assume_init()`."##,
23897 default_severity: Severity::Allow,
23898 warn_since: None,
23899 deny_since: None,
23900 },
23901 Lint {
23902 label: "clippy::uninit_vec",
23903 description: r##"Checks for `set_len()` call that creates `Vec` with uninitialized elements.
23904This is commonly caused by calling `set_len()` right after allocating or
23905reserving a buffer with `new()`, `default()`, `with_capacity()`, or `reserve()`."##,
23906 default_severity: Severity::Allow,
23907 warn_since: None,
23908 deny_since: None,
23909 },
23910 Lint {
23911 label: "clippy::uninlined_format_args",
23912 description: r##"Detect when a variable is not inlined in a format string,
23913and suggests to inline it."##,
23914 default_severity: Severity::Allow,
23915 warn_since: None,
23916 deny_since: None,
23917 },
23918 Lint {
23919 label: "clippy::unit_arg",
23920 description: r##"Checks for passing a unit value as an argument to a function without using a
23921unit literal (`()`)."##,
23922 default_severity: Severity::Allow,
23923 warn_since: None,
23924 deny_since: None,
23925 },
23926 Lint {
23927 label: "clippy::unit_cmp",
23928 description: r##"Checks for comparisons to unit. This includes all binary
23929comparisons (like `==` and `<`) and asserts."##,
23930 default_severity: Severity::Allow,
23931 warn_since: None,
23932 deny_since: None,
23933 },
23934 Lint {
23935 label: "clippy::unit_hash",
23936 description: r##"Detects `().hash(_)`."##,
23937 default_severity: Severity::Allow,
23938 warn_since: None,
23939 deny_since: None,
23940 },
23941 Lint {
23942 label: "clippy::unit_return_expecting_ord",
23943 description: r##"Checks for functions that expect closures of type
23944Fn(...) -> Ord where the implemented closure returns the unit type.
23945The lint also suggests to remove the semi-colon at the end of the statement if present."##,
23946 default_severity: Severity::Allow,
23947 warn_since: None,
23948 deny_since: None,
23949 },
23950 Lint {
23951 label: "clippy::unnecessary_box_returns",
23952 description: r##"Checks for a return type containing a `Box<T>` where `T` implements `Sized`
23953
23954The lint ignores `Box<T>` where `T` is larger than `unnecessary_box_size`,
23955as returning a large `T` directly may be detrimental to performance."##,
23956 default_severity: Severity::Allow,
23957 warn_since: None,
23958 deny_since: None,
23959 },
23960 Lint {
23961 label: "clippy::unnecessary_cast",
23962 description: r##"Checks for casts to the same type, casts of int literals to integer
23963types, casts of float literals to float types, and casts between raw
23964pointers that don't change type or constness."##,
23965 default_severity: Severity::Allow,
23966 warn_since: None,
23967 deny_since: None,
23968 },
23969 Lint {
23970 label: "clippy::unnecessary_clippy_cfg",
23971 description: r##"Checks for `#[cfg_attr(clippy, allow(clippy::lint))]`
23972and suggests to replace it with `#[allow(clippy::lint)]`."##,
23973 default_severity: Severity::Allow,
23974 warn_since: None,
23975 deny_since: None,
23976 },
23977 Lint {
23978 label: "clippy::unnecessary_fallible_conversions",
23979 description: r##"Checks for calls to `TryInto::try_into` and `TryFrom::try_from` when their infallible counterparts
23980could be used."##,
23981 default_severity: Severity::Allow,
23982 warn_since: None,
23983 deny_since: None,
23984 },
23985 Lint {
23986 label: "clippy::unnecessary_filter_map",
23987 description: r##"Checks for `filter_map` calls that could be replaced by `filter` or `map`.
23988More specifically it checks if the closure provided is only performing one of the
23989filter or map operations and suggests the appropriate option."##,
23990 default_severity: Severity::Allow,
23991 warn_since: None,
23992 deny_since: None,
23993 },
23994 Lint {
23995 label: "clippy::unnecessary_find_map",
23996 description: r##"Checks for `find_map` calls that could be replaced by `find` or `map`. More
23997specifically it checks if the closure provided is only performing one of the
23998find or map operations and suggests the appropriate option."##,
23999 default_severity: Severity::Allow,
24000 warn_since: None,
24001 deny_since: None,
24002 },
24003 Lint {
24004 label: "clippy::unnecessary_first_then_check",
24005 description: r##"Checks the usage of `.first().is_some()` or `.first().is_none()` to check if a slice is
24006empty."##,
24007 default_severity: Severity::Allow,
24008 warn_since: None,
24009 deny_since: None,
24010 },
24011 Lint {
24012 label: "clippy::unnecessary_fold",
24013 description: r##"Checks for usage of `fold` when a more succinct alternative exists.
24014Specifically, this checks for `fold`s which could be replaced by `any`, `all`,
24015`sum` or `product`."##,
24016 default_severity: Severity::Allow,
24017 warn_since: None,
24018 deny_since: None,
24019 },
24020 Lint {
24021 label: "clippy::unnecessary_get_then_check",
24022 description: r##"Checks the usage of `.get().is_some()` or `.get().is_none()` on std map types."##,
24023 default_severity: Severity::Allow,
24024 warn_since: None,
24025 deny_since: None,
24026 },
24027 Lint {
24028 label: "clippy::unnecessary_join",
24029 description: r##"Checks for usage of `.collect::<Vec<String>>().join()` on iterators."##,
24030 default_severity: Severity::Allow,
24031 warn_since: None,
24032 deny_since: None,
24033 },
24034 Lint {
24035 label: "clippy::unnecessary_lazy_evaluations",
24036 description: r##"As the counterpart to `or_fun_call`, this lint looks for unnecessary
24037lazily evaluated closures on `Option` and `Result`.
24038
24039This lint suggests changing the following functions, when eager evaluation results in
24040simpler code:
24041 - `unwrap_or_else` to `unwrap_or`
24042 - `and_then` to `and`
24043 - `or_else` to `or`
24044 - `get_or_insert_with` to `get_or_insert`
24045 - `ok_or_else` to `ok_or`
24046 - `then` to `then_some` (for msrv >= 1.62.0)"##,
24047 default_severity: Severity::Allow,
24048 warn_since: None,
24049 deny_since: None,
24050 },
24051 Lint {
24052 label: "clippy::unnecessary_literal_unwrap",
24053 description: r##"Checks for `.unwrap()` related calls on `Result`s and `Option`s that are constructed."##,
24054 default_severity: Severity::Allow,
24055 warn_since: None,
24056 deny_since: None,
24057 },
24058 Lint {
24059 label: "clippy::unnecessary_map_on_constructor",
24060 description: r##"Suggests removing the use of a `map()` (or `map_err()`) method when an `Option` or `Result`
24061is being constructed."##,
24062 default_severity: Severity::Allow,
24063 warn_since: None,
24064 deny_since: None,
24065 },
24066 Lint {
24067 label: "clippy::unnecessary_min_or_max",
24068 description: r##"Checks for unnecessary calls to `min()` or `max()` in the following cases
24069- Either both side is constant
24070- One side is clearly larger than the other, like i32::MIN and an i32 variable"##,
24071 default_severity: Severity::Allow,
24072 warn_since: None,
24073 deny_since: None,
24074 },
24075 Lint {
24076 label: "clippy::unnecessary_mut_passed",
24077 description: r##"Detects passing a mutable reference to a function that only
24078requires an immutable reference."##,
24079 default_severity: Severity::Allow,
24080 warn_since: None,
24081 deny_since: None,
24082 },
24083 Lint {
24084 label: "clippy::unnecessary_operation",
24085 description: r##"Checks for expression statements that can be reduced to a
24086sub-expression."##,
24087 default_severity: Severity::Allow,
24088 warn_since: None,
24089 deny_since: None,
24090 },
24091 Lint {
24092 label: "clippy::unnecessary_owned_empty_strings",
24093 description: r##"Detects cases of owned empty strings being passed as an argument to a function expecting `&str`"##,
24094 default_severity: Severity::Allow,
24095 warn_since: None,
24096 deny_since: None,
24097 },
24098 Lint {
24099 label: "clippy::unnecessary_result_map_or_else",
24100 description: r##"Checks for usage of `.map_or_else()` map closure for `Result` type."##,
24101 default_severity: Severity::Allow,
24102 warn_since: None,
24103 deny_since: None,
24104 },
24105 Lint {
24106 label: "clippy::unnecessary_safety_comment",
24107 description: r##"Checks for `// SAFETY: ` comments on safe code."##,
24108 default_severity: Severity::Allow,
24109 warn_since: None,
24110 deny_since: None,
24111 },
24112 Lint {
24113 label: "clippy::unnecessary_safety_doc",
24114 description: r##"Checks for the doc comments of publicly visible
24115safe functions and traits and warns if there is a `# Safety` section."##,
24116 default_severity: Severity::Allow,
24117 warn_since: None,
24118 deny_since: None,
24119 },
24120 Lint {
24121 label: "clippy::unnecessary_self_imports",
24122 description: r##"Checks for imports ending in `::{self}`."##,
24123 default_severity: Severity::Allow,
24124 warn_since: None,
24125 deny_since: None,
24126 },
24127 Lint {
24128 label: "clippy::unnecessary_sort_by",
24129 description: r##"Checks for usage of `Vec::sort_by` passing in a closure
24130which compares the two arguments, either directly or indirectly."##,
24131 default_severity: Severity::Allow,
24132 warn_since: None,
24133 deny_since: None,
24134 },
24135 Lint {
24136 label: "clippy::unnecessary_struct_initialization",
24137 description: r##"Checks for initialization of an identical `struct` from another instance
24138of the type, either by copying a base without setting any field or by
24139moving all fields individually."##,
24140 default_severity: Severity::Allow,
24141 warn_since: None,
24142 deny_since: None,
24143 },
24144 Lint {
24145 label: "clippy::unnecessary_to_owned",
24146 description: r##"Checks for unnecessary calls to [`ToOwned::to_owned`](https://doc.rust-lang.org/std/borrow/trait.ToOwned.html#tymethod.to_owned)
24147and other `to_owned`-like functions."##,
24148 default_severity: Severity::Allow,
24149 warn_since: None,
24150 deny_since: None,
24151 },
24152 Lint {
24153 label: "clippy::unnecessary_unwrap",
24154 description: r##"Checks for calls of `unwrap[_err]()` that cannot fail."##,
24155 default_severity: Severity::Allow,
24156 warn_since: None,
24157 deny_since: None,
24158 },
24159 Lint {
24160 label: "clippy::unnecessary_wraps",
24161 description: r##"Checks for private functions that only return `Ok` or `Some`."##,
24162 default_severity: Severity::Allow,
24163 warn_since: None,
24164 deny_since: None,
24165 },
24166 Lint {
24167 label: "clippy::unneeded_field_pattern",
24168 description: r##"Checks for structure field patterns bound to wildcards."##,
24169 default_severity: Severity::Allow,
24170 warn_since: None,
24171 deny_since: None,
24172 },
24173 Lint {
24174 label: "clippy::unneeded_wildcard_pattern",
24175 description: r##"Checks for tuple patterns with a wildcard
24176pattern (`_`) is next to a rest pattern (`..`).
24177
24178_NOTE_: While `_, ..` means there is at least one element left, `..`
24179means there are 0 or more elements left. This can make a difference
24180when refactoring, but shouldn't result in errors in the refactored code,
24181since the wildcard pattern isn't used anyway."##,
24182 default_severity: Severity::Allow,
24183 warn_since: None,
24184 deny_since: None,
24185 },
24186 Lint {
24187 label: "clippy::unnested_or_patterns",
24188 description: r##"Checks for unnested or-patterns, e.g., `Some(0) | Some(2)` and
24189suggests replacing the pattern with a nested one, `Some(0 | 2)`.
24190
24191Another way to think of this is that it rewrites patterns in
24192*disjunctive normal form (DNF)* into *conjunctive normal form (CNF)*."##,
24193 default_severity: Severity::Allow,
24194 warn_since: None,
24195 deny_since: None,
24196 },
24197 Lint {
24198 label: "clippy::unreachable",
24199 description: r##"Checks for usage of `unreachable!`."##,
24200 default_severity: Severity::Allow,
24201 warn_since: None,
24202 deny_since: None,
24203 },
24204 Lint {
24205 label: "clippy::unreadable_literal",
24206 description: r##"Warns if a long integral or floating-point constant does
24207not contain underscores."##,
24208 default_severity: Severity::Allow,
24209 warn_since: None,
24210 deny_since: None,
24211 },
24212 Lint {
24213 label: "clippy::unsafe_derive_deserialize",
24214 description: r##"Checks for deriving `serde::Deserialize` on a type that
24215has methods using `unsafe`."##,
24216 default_severity: Severity::Allow,
24217 warn_since: None,
24218 deny_since: None,
24219 },
24220 Lint {
24221 label: "clippy::unsafe_removed_from_name",
24222 description: r##"Checks for imports that remove unsafe from an item's
24223name."##,
24224 default_severity: Severity::Allow,
24225 warn_since: None,
24226 deny_since: None,
24227 },
24228 Lint {
24229 label: "clippy::unsafe_vector_initialization",
24230 description: r##"Nothing. This lint has been deprecated"##,
24231 default_severity: Severity::Allow,
24232 warn_since: None,
24233 deny_since: None,
24234 },
24235 Lint {
24236 label: "clippy::unseparated_literal_suffix",
24237 description: r##"Warns if literal suffixes are not separated by an
24238underscore.
24239To enforce unseparated literal suffix style,
24240see the `separated_literal_suffix` lint."##,
24241 default_severity: Severity::Allow,
24242 warn_since: None,
24243 deny_since: None,
24244 },
24245 Lint {
24246 label: "clippy::unsound_collection_transmute",
24247 description: r##"Checks for transmutes between collections whose
24248types have different ABI, size or alignment."##,
24249 default_severity: Severity::Allow,
24250 warn_since: None,
24251 deny_since: None,
24252 },
24253 Lint {
24254 label: "clippy::unstable_as_mut_slice",
24255 description: r##"Nothing. This lint has been deprecated"##,
24256 default_severity: Severity::Allow,
24257 warn_since: None,
24258 deny_since: None,
24259 },
24260 Lint {
24261 label: "clippy::unstable_as_slice",
24262 description: r##"Nothing. This lint has been deprecated"##,
24263 default_severity: Severity::Allow,
24264 warn_since: None,
24265 deny_since: None,
24266 },
24267 Lint {
24268 label: "clippy::unused_async",
24269 description: r##"Checks for functions that are declared `async` but have no `.await`s inside of them."##,
24270 default_severity: Severity::Allow,
24271 warn_since: None,
24272 deny_since: None,
24273 },
24274 Lint {
24275 label: "clippy::unused_collect",
24276 description: r##"Nothing. This lint has been deprecated"##,
24277 default_severity: Severity::Allow,
24278 warn_since: None,
24279 deny_since: None,
24280 },
24281 Lint {
24282 label: "clippy::unused_enumerate_index",
24283 description: r##"Checks for uses of the `enumerate` method where the index is unused (`_`)"##,
24284 default_severity: Severity::Allow,
24285 warn_since: None,
24286 deny_since: None,
24287 },
24288 Lint {
24289 label: "clippy::unused_format_specs",
24290 description: r##"Detects [formatting parameters] that have no effect on the output of
24291`format!()`, `println!()` or similar macros."##,
24292 default_severity: Severity::Allow,
24293 warn_since: None,
24294 deny_since: None,
24295 },
24296 Lint {
24297 label: "clippy::unused_io_amount",
24298 description: r##"Checks for unused written/read amount."##,
24299 default_severity: Severity::Allow,
24300 warn_since: None,
24301 deny_since: None,
24302 },
24303 Lint {
24304 label: "clippy::unused_peekable",
24305 description: r##"Checks for the creation of a `peekable` iterator that is never `.peek()`ed"##,
24306 default_severity: Severity::Allow,
24307 warn_since: None,
24308 deny_since: None,
24309 },
24310 Lint {
24311 label: "clippy::unused_result_ok",
24312 description: r##"Checks for calls to `Result::ok()` without using the returned `Option`."##,
24313 default_severity: Severity::Allow,
24314 warn_since: None,
24315 deny_since: None,
24316 },
24317 Lint {
24318 label: "clippy::unused_rounding",
24319 description: r##"Detects cases where a whole-number literal float is being rounded, using
24320the `floor`, `ceil`, or `round` methods."##,
24321 default_severity: Severity::Allow,
24322 warn_since: None,
24323 deny_since: None,
24324 },
24325 Lint {
24326 label: "clippy::unused_self",
24327 description: r##"Checks methods that contain a `self` argument but don't use it"##,
24328 default_severity: Severity::Allow,
24329 warn_since: None,
24330 deny_since: None,
24331 },
24332 Lint {
24333 label: "clippy::unused_trait_names",
24334 description: r##"Checks for `use Trait` where the Trait is only used for its methods and not referenced by a path directly."##,
24335 default_severity: Severity::Allow,
24336 warn_since: None,
24337 deny_since: None,
24338 },
24339 Lint {
24340 label: "clippy::unused_unit",
24341 description: r##"Checks for unit (`()`) expressions that can be removed."##,
24342 default_severity: Severity::Allow,
24343 warn_since: None,
24344 deny_since: None,
24345 },
24346 Lint {
24347 label: "clippy::unusual_byte_groupings",
24348 description: r##"Warns if hexadecimal or binary literals are not grouped
24349by nibble or byte."##,
24350 default_severity: Severity::Allow,
24351 warn_since: None,
24352 deny_since: None,
24353 },
24354 Lint {
24355 label: "clippy::unwrap_in_result",
24356 description: r##"Checks for functions of type `Result` that contain `expect()` or `unwrap()`"##,
24357 default_severity: Severity::Allow,
24358 warn_since: None,
24359 deny_since: None,
24360 },
24361 Lint {
24362 label: "clippy::unwrap_or_default",
24363 description: r##"Checks for usages of the following functions with an argument that constructs a default value
24364(e.g., `Default::default` or `String::new`):
24365- `unwrap_or`
24366- `unwrap_or_else`
24367- `or_insert`
24368- `or_insert_with`"##,
24369 default_severity: Severity::Allow,
24370 warn_since: None,
24371 deny_since: None,
24372 },
24373 Lint {
24374 label: "clippy::unwrap_used",
24375 description: r##"Checks for `.unwrap()` or `.unwrap_err()` calls on `Result`s and `.unwrap()` call on `Option`s."##,
24376 default_severity: Severity::Allow,
24377 warn_since: None,
24378 deny_since: None,
24379 },
24380 Lint {
24381 label: "clippy::upper_case_acronyms",
24382 description: r##"Checks for fully capitalized names and optionally names containing a capitalized acronym."##,
24383 default_severity: Severity::Allow,
24384 warn_since: None,
24385 deny_since: None,
24386 },
24387 Lint {
24388 label: "clippy::use_debug",
24389 description: r##"Checks for usage of `Debug` formatting. The purpose of this
24390lint is to catch debugging remnants."##,
24391 default_severity: Severity::Allow,
24392 warn_since: None,
24393 deny_since: None,
24394 },
24395 Lint {
24396 label: "clippy::use_self",
24397 description: r##"Checks for unnecessary repetition of structure name when a
24398replacement with `Self` is applicable."##,
24399 default_severity: Severity::Allow,
24400 warn_since: None,
24401 deny_since: None,
24402 },
24403 Lint {
24404 label: "clippy::used_underscore_binding",
24405 description: r##"Checks for the use of bindings with a single leading
24406underscore."##,
24407 default_severity: Severity::Allow,
24408 warn_since: None,
24409 deny_since: None,
24410 },
24411 Lint {
24412 label: "clippy::used_underscore_items",
24413 description: r##"Checks for the use of item with a single leading
24414underscore."##,
24415 default_severity: Severity::Allow,
24416 warn_since: None,
24417 deny_since: None,
24418 },
24419 Lint {
24420 label: "clippy::useless_asref",
24421 description: r##"Checks for usage of `.as_ref()` or `.as_mut()` where the
24422types before and after the call are the same."##,
24423 default_severity: Severity::Allow,
24424 warn_since: None,
24425 deny_since: None,
24426 },
24427 Lint {
24428 label: "clippy::useless_attribute",
24429 description: r##"Checks for `extern crate` and `use` items annotated with
24430lint attributes.
24431
24432This lint permits lint attributes for lints emitted on the items themself.
24433For `use` items these lints are:
24434* ambiguous_glob_reexports
24435* dead_code
24436* deprecated
24437* hidden_glob_reexports
24438* unreachable_pub
24439* unused
24440* unused_braces
24441* unused_import_braces
24442* clippy::disallowed_types
24443* clippy::enum_glob_use
24444* clippy::macro_use_imports
24445* clippy::module_name_repetitions
24446* clippy::redundant_pub_crate
24447* clippy::single_component_path_imports
24448* clippy::unsafe_removed_from_name
24449* clippy::wildcard_imports
24450
24451For `extern crate` items these lints are:
24452* `unused_imports` on items with `#[macro_use]`"##,
24453 default_severity: Severity::Allow,
24454 warn_since: None,
24455 deny_since: None,
24456 },
24457 Lint {
24458 label: "clippy::useless_conversion",
24459 description: r##"Checks for `Into`, `TryInto`, `From`, `TryFrom`, or `IntoIter` calls
24460which uselessly convert to the same type."##,
24461 default_severity: Severity::Allow,
24462 warn_since: None,
24463 deny_since: None,
24464 },
24465 Lint {
24466 label: "clippy::useless_format",
24467 description: r##"Checks for the use of `format!(string literal with no
24468argument)` and `format!({}, foo)` where `foo` is a string."##,
24469 default_severity: Severity::Allow,
24470 warn_since: None,
24471 deny_since: None,
24472 },
24473 Lint {
24474 label: "clippy::useless_let_if_seq",
24475 description: r##"Checks for variable declarations immediately followed by a
24476conditional affectation."##,
24477 default_severity: Severity::Allow,
24478 warn_since: None,
24479 deny_since: None,
24480 },
24481 Lint {
24482 label: "clippy::useless_transmute",
24483 description: r##"Checks for transmutes to the original type of the object
24484and transmutes that could be a cast."##,
24485 default_severity: Severity::Allow,
24486 warn_since: None,
24487 deny_since: None,
24488 },
24489 Lint {
24490 label: "clippy::useless_vec",
24491 description: r##"Checks for usage of `vec![..]` when using `[..]` would
24492be possible."##,
24493 default_severity: Severity::Allow,
24494 warn_since: None,
24495 deny_since: None,
24496 },
24497 Lint {
24498 label: "clippy::vec_box",
24499 description: r##"Checks for usage of `Vec<Box<T>>` where T: Sized anywhere in the code.
24500Check the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##,
24501 default_severity: Severity::Allow,
24502 warn_since: None,
24503 deny_since: None,
24504 },
24505 Lint {
24506 label: "clippy::vec_init_then_push",
24507 description: r##"Checks for calls to `push` immediately after creating a new `Vec`.
24508
24509If the `Vec` is created using `with_capacity` this will only lint if the capacity is a
24510constant and the number of pushes is greater than or equal to the initial capacity.
24511
24512If the `Vec` is extended after the initial sequence of pushes and it was default initialized
24513then this will only lint after there were at least four pushes. This number may change in
24514the future."##,
24515 default_severity: Severity::Allow,
24516 warn_since: None,
24517 deny_since: None,
24518 },
24519 Lint {
24520 label: "clippy::vec_resize_to_zero",
24521 description: r##"Finds occurrences of `Vec::resize(0, an_int)`"##,
24522 default_severity: Severity::Allow,
24523 warn_since: None,
24524 deny_since: None,
24525 },
24526 Lint {
24527 label: "clippy::verbose_bit_mask",
24528 description: r##"Checks for bit masks that can be replaced by a call
24529to `trailing_zeros`"##,
24530 default_severity: Severity::Allow,
24531 warn_since: None,
24532 deny_since: None,
24533 },
24534 Lint {
24535 label: "clippy::verbose_file_reads",
24536 description: r##"Checks for usage of File::read_to_end and File::read_to_string."##,
24537 default_severity: Severity::Allow,
24538 warn_since: None,
24539 deny_since: None,
24540 },
24541 Lint {
24542 label: "clippy::waker_clone_wake",
24543 description: r##"Checks for usage of `waker.clone().wake()`"##,
24544 default_severity: Severity::Allow,
24545 warn_since: None,
24546 deny_since: None,
24547 },
24548 Lint {
24549 label: "clippy::while_float",
24550 description: r##"Checks for while loops comparing floating point values."##,
24551 default_severity: Severity::Allow,
24552 warn_since: None,
24553 deny_since: None,
24554 },
24555 Lint {
24556 label: "clippy::while_immutable_condition",
24557 description: r##"Checks whether variables used within while loop condition
24558can be (and are) mutated in the body."##,
24559 default_severity: Severity::Allow,
24560 warn_since: None,
24561 deny_since: None,
24562 },
24563 Lint {
24564 label: "clippy::while_let_loop",
24565 description: r##"Detects `loop + match` combinations that are easier
24566written as a `while let` loop."##,
24567 default_severity: Severity::Allow,
24568 warn_since: None,
24569 deny_since: None,
24570 },
24571 Lint {
24572 label: "clippy::while_let_on_iterator",
24573 description: r##"Checks for `while let` expressions on iterators."##,
24574 default_severity: Severity::Allow,
24575 warn_since: None,
24576 deny_since: None,
24577 },
24578 Lint {
24579 label: "clippy::wildcard_dependencies",
24580 description: r##"Checks for wildcard dependencies in the `Cargo.toml`."##,
24581 default_severity: Severity::Allow,
24582 warn_since: None,
24583 deny_since: None,
24584 },
24585 Lint {
24586 label: "clippy::wildcard_enum_match_arm",
24587 description: r##"Checks for wildcard enum matches using `_`."##,
24588 default_severity: Severity::Allow,
24589 warn_since: None,
24590 deny_since: None,
24591 },
24592 Lint {
24593 label: "clippy::wildcard_imports",
24594 description: r##"Checks for wildcard imports `use _::*`."##,
24595 default_severity: Severity::Allow,
24596 warn_since: None,
24597 deny_since: None,
24598 },
24599 Lint {
24600 label: "clippy::wildcard_in_or_patterns",
24601 description: r##"Checks for wildcard pattern used with others patterns in same match arm."##,
24602 default_severity: Severity::Allow,
24603 warn_since: None,
24604 deny_since: None,
24605 },
24606 Lint {
24607 label: "clippy::write_literal",
24608 description: r##"This lint warns about the use of literals as `write!`/`writeln!` args."##,
24609 default_severity: Severity::Allow,
24610 warn_since: None,
24611 deny_since: None,
24612 },
24613 Lint {
24614 label: "clippy::write_with_newline",
24615 description: r##"This lint warns when you use `write!()` with a format
24616string that
24617ends in a newline."##,
24618 default_severity: Severity::Allow,
24619 warn_since: None,
24620 deny_since: None,
24621 },
24622 Lint {
24623 label: "clippy::writeln_empty_string",
24624 description: r##"This lint warns when you use `writeln!(buf, )` to
24625print a newline."##,
24626 default_severity: Severity::Allow,
24627 warn_since: None,
24628 deny_since: None,
24629 },
24630 Lint {
24631 label: "clippy::wrong_pub_self_convention",
24632 description: r##"Nothing. This lint has been deprecated"##,
24633 default_severity: Severity::Allow,
24634 warn_since: None,
24635 deny_since: None,
24636 },
24637 Lint {
24638 label: "clippy::wrong_self_convention",
24639 description: r##"Checks for methods with certain name prefixes or suffixes, and which
24640do not adhere to standard conventions regarding how `self` is taken.
24641The actual rules are:
24642
24643|Prefix |Postfix |`self` taken | `self` type |
24644|-------|------------|-------------------------------|--------------|
24645|`as_` | none |`&self` or `&mut self` | any |
24646|`from_`| none | none | any |
24647|`into_`| none |`self` | any |
24648|`is_` | none |`&mut self` or `&self` or none | any |
24649|`to_` | `_mut` |`&mut self` | any |
24650|`to_` | not `_mut` |`self` | `Copy` |
24651|`to_` | not `_mut` |`&self` | not `Copy` |
24652
24653Note: Clippy doesn't trigger methods with `to_` prefix in:
24654- Traits definition.
24655Clippy can not tell if a type that implements a trait is `Copy` or not.
24656- Traits implementation, when `&self` is taken.
24657The method signature is controlled by the trait and often `&self` is required for all types that implement the trait
24658(see e.g. the `std::string::ToString` trait).
24659
24660Clippy allows `Pin<&Self>` and `Pin<&mut Self>` if `&self` and `&mut self` is required.
24661
24662Please find more info here:
24663https://rust-lang.github.io/api-guidelines/naming.html#ad-hoc-conversions-follow-as_-to_-into_-conventions-c-conv"##,
24664 default_severity: Severity::Allow,
24665 warn_since: None,
24666 deny_since: None,
24667 },
24668 Lint {
24669 label: "clippy::wrong_transmute",
24670 description: r##"Checks for transmutes that can't ever be correct on any
24671architecture."##,
24672 default_severity: Severity::Allow,
24673 warn_since: None,
24674 deny_since: None,
24675 },
24676 Lint {
24677 label: "clippy::zero_divided_by_zero",
24678 description: r##"Checks for `0.0 / 0.0`."##,
24679 default_severity: Severity::Allow,
24680 warn_since: None,
24681 deny_since: None,
24682 },
24683 Lint {
24684 label: "clippy::zero_prefixed_literal",
24685 description: r##"Warns if an integral constant literal starts with `0`."##,
24686 default_severity: Severity::Allow,
24687 warn_since: None,
24688 deny_since: None,
24689 },
24690 Lint {
24691 label: "clippy::zero_ptr",
24692 description: r##"Catch casts from `0` to some pointer type"##,
24693 default_severity: Severity::Allow,
24694 warn_since: None,
24695 deny_since: None,
24696 },
24697 Lint {
24698 label: "clippy::zero_repeat_side_effects",
24699 description: r##"Checks for array or vec initializations which call a function or method,
24700but which have a repeat count of zero."##,
24701 default_severity: Severity::Allow,
24702 warn_since: None,
24703 deny_since: None,
24704 },
24705 Lint {
24706 label: "clippy::zero_sized_map_values",
24707 description: r##"Checks for maps with zero-sized value types anywhere in the code."##,
24708 default_severity: Severity::Allow,
24709 warn_since: None,
24710 deny_since: None,
24711 },
24712 Lint {
24713 label: "clippy::zombie_processes",
24714 description: r##"Looks for code that spawns a process but never calls `wait()` on the child."##,
24715 default_severity: Severity::Allow,
24716 warn_since: None,
24717 deny_since: None,
24718 },
24719 Lint {
24720 label: "clippy::zst_offset",
24721 description: r##"Checks for `offset(_)`, `wrapping_`{`add`, `sub`}, etc. on raw pointers to
24722zero-sized types"##,
24723 default_severity: Severity::Allow,
24724 warn_since: None,
24725 deny_since: None,
24726 },
24727];
24728pub const CLIPPY_LINT_GROUPS: &[LintGroup] = &[
24729 LintGroup {
24730 lint: Lint {
24731 label: "clippy::cargo",
24732 description: r##"lint group for: clippy::cargo_common_metadata, clippy::multiple_crate_versions, clippy::negative_feature_names, clippy::redundant_feature_names, clippy::wildcard_dependencies"##,
24733 default_severity: Severity::Allow,
24734 warn_since: None,
24735 deny_since: None,
24736 },
24737 children: &[
24738 "clippy::cargo_common_metadata",
24739 "clippy::multiple_crate_versions",
24740 "clippy::negative_feature_names",
24741 "clippy::redundant_feature_names",
24742 "clippy::wildcard_dependencies",
24743 ],
24744 },
24745 LintGroup {
24746 lint: Lint {
24747 label: "clippy::complexity",
24748 description: r##"lint group for: clippy::bind_instead_of_map, clippy::bool_comparison, clippy::borrow_deref_ref, clippy::borrowed_box, clippy::bytes_count_to_len, clippy::char_lit_as_u8, clippy::clone_on_copy, clippy::crosspointer_transmute, clippy::default_constructed_unit_structs, clippy::deprecated_cfg_attr, clippy::deref_addrof, clippy::derivable_impls, clippy::diverging_sub_expression, clippy::double_comparisons, clippy::double_parens, clippy::duration_subsec, clippy::excessive_nesting, clippy::explicit_auto_deref, clippy::explicit_counter_loop, clippy::explicit_write, clippy::extra_unused_lifetimes, clippy::extra_unused_type_parameters, clippy::filter_map_identity, clippy::filter_next, clippy::flat_map_identity, clippy::get_last_with_len, clippy::identity_op, clippy::implied_bounds_in_impls, clippy::inspect_for_each, clippy::int_plus_one, clippy::iter_count, clippy::iter_kv_map, clippy::let_with_type_underscore, clippy::manual_c_str_literals, clippy::manual_clamp, clippy::manual_div_ceil, clippy::manual_filter, clippy::manual_filter_map, clippy::manual_find, clippy::manual_find_map, clippy::manual_flatten, clippy::manual_hash_one, clippy::manual_inspect, clippy::manual_is_power_of_two, clippy::manual_main_separator_str, clippy::manual_range_patterns, clippy::manual_rem_euclid, clippy::manual_slice_size_calculation, clippy::manual_split_once, clippy::manual_strip, clippy::manual_swap, clippy::manual_unwrap_or, clippy::map_flatten, clippy::map_identity, clippy::match_as_ref, clippy::match_single_binding, clippy::needless_arbitrary_self_type, clippy::needless_bool, clippy::needless_bool_assign, clippy::needless_borrowed_reference, clippy::needless_if, clippy::needless_lifetimes, clippy::needless_match, clippy::needless_option_as_deref, clippy::needless_option_take, clippy::needless_question_mark, clippy::needless_splitn, clippy::needless_update, clippy::neg_cmp_op_on_partial_ord, clippy::no_effect, clippy::nonminimal_bool, clippy::only_used_in_recursion, clippy::option_as_ref_deref, clippy::option_filter_map, clippy::option_map_unit_fn, clippy::or_then_unwrap, clippy::partialeq_ne_impl, clippy::precedence, clippy::ptr_offset_with_cast, clippy::range_zip_with_len, clippy::redundant_as_str, clippy::redundant_async_block, clippy::redundant_at_rest_pattern, clippy::redundant_closure_call, clippy::redundant_guards, clippy::redundant_slicing, clippy::repeat_once, clippy::reserve_after_initialization, clippy::result_filter_map, clippy::result_map_unit_fn, clippy::search_is_some, clippy::seek_from_current, clippy::seek_to_start_instead_of_rewind, clippy::short_circuit_statement, clippy::single_element_loop, clippy::skip_while_next, clippy::string_from_utf8_as_bytes, clippy::strlen_on_c_strings, clippy::temporary_assignment, clippy::too_many_arguments, clippy::transmute_bytes_to_str, clippy::transmute_float_to_int, clippy::transmute_int_to_bool, clippy::transmute_int_to_char, clippy::transmute_int_to_float, clippy::transmute_int_to_non_zero, clippy::transmute_num_to_bytes, clippy::transmute_ptr_to_ref, clippy::transmutes_expressible_as_ptr_casts, clippy::type_complexity, clippy::unit_arg, clippy::unnecessary_cast, clippy::unnecessary_filter_map, clippy::unnecessary_find_map, clippy::unnecessary_first_then_check, clippy::unnecessary_literal_unwrap, clippy::unnecessary_map_on_constructor, clippy::unnecessary_min_or_max, clippy::unnecessary_operation, clippy::unnecessary_sort_by, clippy::unnecessary_unwrap, clippy::unneeded_wildcard_pattern, clippy::unused_format_specs, clippy::useless_asref, clippy::useless_conversion, clippy::useless_format, clippy::useless_transmute, clippy::vec_box, clippy::while_let_loop, clippy::wildcard_in_or_patterns, clippy::zero_divided_by_zero, clippy::zero_prefixed_literal"##,
24749 default_severity: Severity::Allow,
24750 warn_since: None,
24751 deny_since: None,
24752 },
24753 children: &[
24754 "clippy::bind_instead_of_map",
24755 "clippy::bool_comparison",
24756 "clippy::borrow_deref_ref",
24757 "clippy::borrowed_box",
24758 "clippy::bytes_count_to_len",
24759 "clippy::char_lit_as_u8",
24760 "clippy::clone_on_copy",
24761 "clippy::crosspointer_transmute",
24762 "clippy::default_constructed_unit_structs",
24763 "clippy::deprecated_cfg_attr",
24764 "clippy::deref_addrof",
24765 "clippy::derivable_impls",
24766 "clippy::diverging_sub_expression",
24767 "clippy::double_comparisons",
24768 "clippy::double_parens",
24769 "clippy::duration_subsec",
24770 "clippy::excessive_nesting",
24771 "clippy::explicit_auto_deref",
24772 "clippy::explicit_counter_loop",
24773 "clippy::explicit_write",
24774 "clippy::extra_unused_lifetimes",
24775 "clippy::extra_unused_type_parameters",
24776 "clippy::filter_map_identity",
24777 "clippy::filter_next",
24778 "clippy::flat_map_identity",
24779 "clippy::get_last_with_len",
24780 "clippy::identity_op",
24781 "clippy::implied_bounds_in_impls",
24782 "clippy::inspect_for_each",
24783 "clippy::int_plus_one",
24784 "clippy::iter_count",
24785 "clippy::iter_kv_map",
24786 "clippy::let_with_type_underscore",
24787 "clippy::manual_c_str_literals",
24788 "clippy::manual_clamp",
24789 "clippy::manual_div_ceil",
24790 "clippy::manual_filter",
24791 "clippy::manual_filter_map",
24792 "clippy::manual_find",
24793 "clippy::manual_find_map",
24794 "clippy::manual_flatten",
24795 "clippy::manual_hash_one",
24796 "clippy::manual_inspect",
24797 "clippy::manual_is_power_of_two",
24798 "clippy::manual_main_separator_str",
24799 "clippy::manual_range_patterns",
24800 "clippy::manual_rem_euclid",
24801 "clippy::manual_slice_size_calculation",
24802 "clippy::manual_split_once",
24803 "clippy::manual_strip",
24804 "clippy::manual_swap",
24805 "clippy::manual_unwrap_or",
24806 "clippy::map_flatten",
24807 "clippy::map_identity",
24808 "clippy::match_as_ref",
24809 "clippy::match_single_binding",
24810 "clippy::needless_arbitrary_self_type",
24811 "clippy::needless_bool",
24812 "clippy::needless_bool_assign",
24813 "clippy::needless_borrowed_reference",
24814 "clippy::needless_if",
24815 "clippy::needless_lifetimes",
24816 "clippy::needless_match",
24817 "clippy::needless_option_as_deref",
24818 "clippy::needless_option_take",
24819 "clippy::needless_question_mark",
24820 "clippy::needless_splitn",
24821 "clippy::needless_update",
24822 "clippy::neg_cmp_op_on_partial_ord",
24823 "clippy::no_effect",
24824 "clippy::nonminimal_bool",
24825 "clippy::only_used_in_recursion",
24826 "clippy::option_as_ref_deref",
24827 "clippy::option_filter_map",
24828 "clippy::option_map_unit_fn",
24829 "clippy::or_then_unwrap",
24830 "clippy::partialeq_ne_impl",
24831 "clippy::precedence",
24832 "clippy::ptr_offset_with_cast",
24833 "clippy::range_zip_with_len",
24834 "clippy::redundant_as_str",
24835 "clippy::redundant_async_block",
24836 "clippy::redundant_at_rest_pattern",
24837 "clippy::redundant_closure_call",
24838 "clippy::redundant_guards",
24839 "clippy::redundant_slicing",
24840 "clippy::repeat_once",
24841 "clippy::reserve_after_initialization",
24842 "clippy::result_filter_map",
24843 "clippy::result_map_unit_fn",
24844 "clippy::search_is_some",
24845 "clippy::seek_from_current",
24846 "clippy::seek_to_start_instead_of_rewind",
24847 "clippy::short_circuit_statement",
24848 "clippy::single_element_loop",
24849 "clippy::skip_while_next",
24850 "clippy::string_from_utf8_as_bytes",
24851 "clippy::strlen_on_c_strings",
24852 "clippy::temporary_assignment",
24853 "clippy::too_many_arguments",
24854 "clippy::transmute_bytes_to_str",
24855 "clippy::transmute_float_to_int",
24856 "clippy::transmute_int_to_bool",
24857 "clippy::transmute_int_to_char",
24858 "clippy::transmute_int_to_float",
24859 "clippy::transmute_int_to_non_zero",
24860 "clippy::transmute_num_to_bytes",
24861 "clippy::transmute_ptr_to_ref",
24862 "clippy::transmutes_expressible_as_ptr_casts",
24863 "clippy::type_complexity",
24864 "clippy::unit_arg",
24865 "clippy::unnecessary_cast",
24866 "clippy::unnecessary_filter_map",
24867 "clippy::unnecessary_find_map",
24868 "clippy::unnecessary_first_then_check",
24869 "clippy::unnecessary_literal_unwrap",
24870 "clippy::unnecessary_map_on_constructor",
24871 "clippy::unnecessary_min_or_max",
24872 "clippy::unnecessary_operation",
24873 "clippy::unnecessary_sort_by",
24874 "clippy::unnecessary_unwrap",
24875 "clippy::unneeded_wildcard_pattern",
24876 "clippy::unused_format_specs",
24877 "clippy::useless_asref",
24878 "clippy::useless_conversion",
24879 "clippy::useless_format",
24880 "clippy::useless_transmute",
24881 "clippy::vec_box",
24882 "clippy::while_let_loop",
24883 "clippy::wildcard_in_or_patterns",
24884 "clippy::zero_divided_by_zero",
24885 "clippy::zero_prefixed_literal",
24886 ],
24887 },
24888 LintGroup {
24889 lint: Lint {
24890 label: "clippy::correctness",
24891 description: r##"lint group for: clippy::absurd_extreme_comparisons, clippy::almost_swapped, clippy::approx_constant, clippy::async_yields_async, clippy::bad_bit_mask, clippy::cast_slice_different_sizes, clippy::deprecated_semver, clippy::derive_ord_xor_partial_ord, clippy::derived_hash_with_manual_eq, clippy::eager_transmute, clippy::enum_clike_unportable_variant, clippy::eq_op, clippy::erasing_op, clippy::fn_address_comparisons, clippy::if_let_mutex, clippy::ifs_same_cond, clippy::impl_hash_borrow_with_str_and_bytes, clippy::impossible_comparisons, clippy::ineffective_bit_mask, clippy::infinite_iter, clippy::inherent_to_string_shadow_display, clippy::inline_fn_without_body, clippy::invalid_null_ptr_usage, clippy::invalid_regex, clippy::inverted_saturating_sub, clippy::invisible_characters, clippy::iter_next_loop, clippy::iter_skip_zero, clippy::iterator_step_by_zero, clippy::let_underscore_lock, clippy::lint_groups_priority, clippy::match_str_case_mismatch, clippy::mem_replace_with_uninit, clippy::min_max, clippy::mistyped_literal_suffixes, clippy::modulo_one, clippy::mut_from_ref, clippy::never_loop, clippy::non_octal_unix_permissions, clippy::nonsensical_open_options, clippy::not_unsafe_ptr_arg_deref, clippy::option_env_unwrap, clippy::out_of_bounds_indexing, clippy::overly_complex_bool_expr, clippy::panicking_overflow_checks, clippy::panicking_unwrap, clippy::possible_missing_comma, clippy::read_line_without_trim, clippy::recursive_format_impl, clippy::redundant_comparisons, clippy::redundant_locals, clippy::reversed_empty_ranges, clippy::self_assignment, clippy::serde_api_misuse, clippy::size_of_in_element_count, clippy::suspicious_splitn, clippy::transmute_null_to_fn, clippy::transmuting_null, clippy::uninit_assumed_init, clippy::uninit_vec, clippy::unit_cmp, clippy::unit_hash, clippy::unit_return_expecting_ord, clippy::unsound_collection_transmute, clippy::unused_io_amount, clippy::useless_attribute, clippy::vec_resize_to_zero, clippy::while_immutable_condition, clippy::wrong_transmute, clippy::zst_offset"##,
24892 default_severity: Severity::Allow,
24893 warn_since: None,
24894 deny_since: None,
24895 },
24896 children: &[
24897 "clippy::absurd_extreme_comparisons",
24898 "clippy::almost_swapped",
24899 "clippy::approx_constant",
24900 "clippy::async_yields_async",
24901 "clippy::bad_bit_mask",
24902 "clippy::cast_slice_different_sizes",
24903 "clippy::deprecated_semver",
24904 "clippy::derive_ord_xor_partial_ord",
24905 "clippy::derived_hash_with_manual_eq",
24906 "clippy::eager_transmute",
24907 "clippy::enum_clike_unportable_variant",
24908 "clippy::eq_op",
24909 "clippy::erasing_op",
24910 "clippy::fn_address_comparisons",
24911 "clippy::if_let_mutex",
24912 "clippy::ifs_same_cond",
24913 "clippy::impl_hash_borrow_with_str_and_bytes",
24914 "clippy::impossible_comparisons",
24915 "clippy::ineffective_bit_mask",
24916 "clippy::infinite_iter",
24917 "clippy::inherent_to_string_shadow_display",
24918 "clippy::inline_fn_without_body",
24919 "clippy::invalid_null_ptr_usage",
24920 "clippy::invalid_regex",
24921 "clippy::inverted_saturating_sub",
24922 "clippy::invisible_characters",
24923 "clippy::iter_next_loop",
24924 "clippy::iter_skip_zero",
24925 "clippy::iterator_step_by_zero",
24926 "clippy::let_underscore_lock",
24927 "clippy::lint_groups_priority",
24928 "clippy::match_str_case_mismatch",
24929 "clippy::mem_replace_with_uninit",
24930 "clippy::min_max",
24931 "clippy::mistyped_literal_suffixes",
24932 "clippy::modulo_one",
24933 "clippy::mut_from_ref",
24934 "clippy::never_loop",
24935 "clippy::non_octal_unix_permissions",
24936 "clippy::nonsensical_open_options",
24937 "clippy::not_unsafe_ptr_arg_deref",
24938 "clippy::option_env_unwrap",
24939 "clippy::out_of_bounds_indexing",
24940 "clippy::overly_complex_bool_expr",
24941 "clippy::panicking_overflow_checks",
24942 "clippy::panicking_unwrap",
24943 "clippy::possible_missing_comma",
24944 "clippy::read_line_without_trim",
24945 "clippy::recursive_format_impl",
24946 "clippy::redundant_comparisons",
24947 "clippy::redundant_locals",
24948 "clippy::reversed_empty_ranges",
24949 "clippy::self_assignment",
24950 "clippy::serde_api_misuse",
24951 "clippy::size_of_in_element_count",
24952 "clippy::suspicious_splitn",
24953 "clippy::transmute_null_to_fn",
24954 "clippy::transmuting_null",
24955 "clippy::uninit_assumed_init",
24956 "clippy::uninit_vec",
24957 "clippy::unit_cmp",
24958 "clippy::unit_hash",
24959 "clippy::unit_return_expecting_ord",
24960 "clippy::unsound_collection_transmute",
24961 "clippy::unused_io_amount",
24962 "clippy::useless_attribute",
24963 "clippy::vec_resize_to_zero",
24964 "clippy::while_immutable_condition",
24965 "clippy::wrong_transmute",
24966 "clippy::zst_offset",
24967 ],
24968 },
24969 LintGroup {
24970 lint: Lint {
24971 label: "clippy::deprecated",
24972 description: r##"lint group for: clippy::assign_ops, clippy::extend_from_slice, clippy::misaligned_transmute, clippy::pub_enum_variant_names, clippy::range_step_by_zero, clippy::regex_macro, clippy::replace_consts, clippy::should_assert_eq, clippy::unsafe_vector_initialization, clippy::unstable_as_mut_slice, clippy::unstable_as_slice, clippy::unused_collect, clippy::wrong_pub_self_convention"##,
24973 default_severity: Severity::Allow,
24974 warn_since: None,
24975 deny_since: None,
24976 },
24977 children: &[
24978 "clippy::assign_ops",
24979 "clippy::extend_from_slice",
24980 "clippy::misaligned_transmute",
24981 "clippy::pub_enum_variant_names",
24982 "clippy::range_step_by_zero",
24983 "clippy::regex_macro",
24984 "clippy::replace_consts",
24985 "clippy::should_assert_eq",
24986 "clippy::unsafe_vector_initialization",
24987 "clippy::unstable_as_mut_slice",
24988 "clippy::unstable_as_slice",
24989 "clippy::unused_collect",
24990 "clippy::wrong_pub_self_convention",
24991 ],
24992 },
24993 LintGroup {
24994 lint: Lint {
24995 label: "clippy::nursery",
24996 description: r##"lint group for: clippy::as_ptr_cast_mut, clippy::branches_sharing_code, clippy::clear_with_drain, clippy::cognitive_complexity, clippy::collection_is_never_read, clippy::debug_assert_with_mut_call, clippy::derive_partial_eq_without_eq, clippy::equatable_if_let, clippy::fallible_impl_from, clippy::future_not_send, clippy::imprecise_flops, clippy::iter_on_empty_collections, clippy::iter_on_single_items, clippy::iter_with_drain, clippy::large_stack_frames, clippy::missing_const_for_fn, clippy::mutex_integer, clippy::needless_collect, clippy::needless_pass_by_ref_mut, clippy::non_send_fields_in_send_ty, clippy::nonstandard_macro_braces, clippy::option_if_let_else, clippy::or_fun_call, clippy::path_buf_push_overwrite, clippy::read_zero_byte_vec, clippy::redundant_clone, clippy::redundant_pub_crate, clippy::set_contains_or_insert, clippy::significant_drop_in_scrutinee, clippy::significant_drop_tightening, clippy::string_lit_as_bytes, clippy::suboptimal_flops, clippy::suspicious_operation_groupings, clippy::trailing_empty_array, clippy::trait_duplication_in_bounds, clippy::transmute_undefined_repr, clippy::trivial_regex, clippy::tuple_array_conversions, clippy::type_repetition_in_bounds, clippy::uninhabited_references, clippy::unnecessary_struct_initialization, clippy::unused_peekable, clippy::unused_rounding, clippy::use_self, clippy::useless_let_if_seq, clippy::while_float"##,
24997 default_severity: Severity::Allow,
24998 warn_since: None,
24999 deny_since: None,
25000 },
25001 children: &[
25002 "clippy::as_ptr_cast_mut",
25003 "clippy::branches_sharing_code",
25004 "clippy::clear_with_drain",
25005 "clippy::cognitive_complexity",
25006 "clippy::collection_is_never_read",
25007 "clippy::debug_assert_with_mut_call",
25008 "clippy::derive_partial_eq_without_eq",
25009 "clippy::equatable_if_let",
25010 "clippy::fallible_impl_from",
25011 "clippy::future_not_send",
25012 "clippy::imprecise_flops",
25013 "clippy::iter_on_empty_collections",
25014 "clippy::iter_on_single_items",
25015 "clippy::iter_with_drain",
25016 "clippy::large_stack_frames",
25017 "clippy::missing_const_for_fn",
25018 "clippy::mutex_integer",
25019 "clippy::needless_collect",
25020 "clippy::needless_pass_by_ref_mut",
25021 "clippy::non_send_fields_in_send_ty",
25022 "clippy::nonstandard_macro_braces",
25023 "clippy::option_if_let_else",
25024 "clippy::or_fun_call",
25025 "clippy::path_buf_push_overwrite",
25026 "clippy::read_zero_byte_vec",
25027 "clippy::redundant_clone",
25028 "clippy::redundant_pub_crate",
25029 "clippy::set_contains_or_insert",
25030 "clippy::significant_drop_in_scrutinee",
25031 "clippy::significant_drop_tightening",
25032 "clippy::string_lit_as_bytes",
25033 "clippy::suboptimal_flops",
25034 "clippy::suspicious_operation_groupings",
25035 "clippy::trailing_empty_array",
25036 "clippy::trait_duplication_in_bounds",
25037 "clippy::transmute_undefined_repr",
25038 "clippy::trivial_regex",
25039 "clippy::tuple_array_conversions",
25040 "clippy::type_repetition_in_bounds",
25041 "clippy::uninhabited_references",
25042 "clippy::unnecessary_struct_initialization",
25043 "clippy::unused_peekable",
25044 "clippy::unused_rounding",
25045 "clippy::use_self",
25046 "clippy::useless_let_if_seq",
25047 "clippy::while_float",
25048 ],
25049 },
25050 LintGroup {
25051 lint: Lint {
25052 label: "clippy::pedantic",
25053 description: r##"lint group for: clippy::assigning_clones, clippy::bool_to_int_with_if, clippy::borrow_as_ptr, clippy::case_sensitive_file_extension_comparisons, clippy::cast_lossless, clippy::cast_possible_truncation, clippy::cast_possible_wrap, clippy::cast_precision_loss, clippy::cast_ptr_alignment, clippy::cast_sign_loss, clippy::checked_conversions, clippy::cloned_instead_of_copied, clippy::copy_iterator, clippy::default_trait_access, clippy::doc_link_with_quotes, clippy::doc_markdown, clippy::empty_enum, clippy::enum_glob_use, clippy::expl_impl_clone_on_copy, clippy::explicit_deref_methods, clippy::explicit_into_iter_loop, clippy::explicit_iter_loop, clippy::filter_map_next, clippy::flat_map_option, clippy::float_cmp, clippy::fn_params_excessive_bools, clippy::from_iter_instead_of_collect, clippy::if_not_else, clippy::ignored_unit_patterns, clippy::implicit_clone, clippy::implicit_hasher, clippy::inconsistent_struct_constructor, clippy::index_refutable_slice, clippy::inefficient_to_string, clippy::inline_always, clippy::into_iter_without_iter, clippy::invalid_upcast_comparisons, clippy::items_after_statements, clippy::iter_filter_is_ok, clippy::iter_filter_is_some, clippy::iter_not_returning_iterator, clippy::iter_without_into_iter, clippy::large_digit_groups, clippy::large_futures, clippy::large_stack_arrays, clippy::large_types_passed_by_value, clippy::linkedlist, clippy::macro_use_imports, clippy::manual_assert, clippy::manual_instant_elapsed, clippy::manual_is_variant_and, clippy::manual_let_else, clippy::manual_ok_or, clippy::manual_string_new, clippy::many_single_char_names, clippy::map_unwrap_or, clippy::match_bool, clippy::match_on_vec_items, clippy::match_same_arms, clippy::match_wild_err_arm, clippy::match_wildcard_for_single_variants, clippy::maybe_infinite_iter, clippy::mismatching_type_param_order, clippy::missing_errors_doc, clippy::missing_fields_in_debug, clippy::missing_panics_doc, clippy::module_name_repetitions, clippy::must_use_candidate, clippy::mut_mut, clippy::naive_bytecount, clippy::needless_bitwise_bool, clippy::needless_continue, clippy::needless_for_each, clippy::needless_pass_by_value, clippy::needless_raw_string_hashes, clippy::no_effect_underscore_binding, clippy::no_mangle_with_rust_abi, clippy::option_as_ref_cloned, clippy::option_option, clippy::ptr_as_ptr, clippy::ptr_cast_constness, clippy::pub_underscore_fields, clippy::range_minus_one, clippy::range_plus_one, clippy::redundant_closure_for_method_calls, clippy::redundant_else, clippy::ref_as_ptr, clippy::ref_binding_to_reference, clippy::ref_option, clippy::ref_option_ref, clippy::return_self_not_must_use, clippy::same_functions_in_if_condition, clippy::semicolon_if_nothing_returned, clippy::should_panic_without_expect, clippy::similar_names, clippy::single_char_pattern, clippy::single_match_else, clippy::stable_sort_primitive, clippy::str_split_at_newline, clippy::string_add_assign, clippy::struct_excessive_bools, clippy::struct_field_names, clippy::too_many_lines, clippy::transmute_ptr_to_ptr, clippy::trivially_copy_pass_by_ref, clippy::unchecked_duration_subtraction, clippy::unicode_not_nfc, clippy::uninlined_format_args, clippy::unnecessary_box_returns, clippy::unnecessary_join, clippy::unnecessary_wraps, clippy::unnested_or_patterns, clippy::unreadable_literal, clippy::unsafe_derive_deserialize, clippy::unused_async, clippy::unused_self, clippy::used_underscore_binding, clippy::used_underscore_items, clippy::verbose_bit_mask, clippy::wildcard_imports, clippy::zero_sized_map_values"##,
25054 default_severity: Severity::Allow,
25055 warn_since: None,
25056 deny_since: None,
25057 },
25058 children: &[
25059 "clippy::assigning_clones",
25060 "clippy::bool_to_int_with_if",
25061 "clippy::borrow_as_ptr",
25062 "clippy::case_sensitive_file_extension_comparisons",
25063 "clippy::cast_lossless",
25064 "clippy::cast_possible_truncation",
25065 "clippy::cast_possible_wrap",
25066 "clippy::cast_precision_loss",
25067 "clippy::cast_ptr_alignment",
25068 "clippy::cast_sign_loss",
25069 "clippy::checked_conversions",
25070 "clippy::cloned_instead_of_copied",
25071 "clippy::copy_iterator",
25072 "clippy::default_trait_access",
25073 "clippy::doc_link_with_quotes",
25074 "clippy::doc_markdown",
25075 "clippy::empty_enum",
25076 "clippy::enum_glob_use",
25077 "clippy::expl_impl_clone_on_copy",
25078 "clippy::explicit_deref_methods",
25079 "clippy::explicit_into_iter_loop",
25080 "clippy::explicit_iter_loop",
25081 "clippy::filter_map_next",
25082 "clippy::flat_map_option",
25083 "clippy::float_cmp",
25084 "clippy::fn_params_excessive_bools",
25085 "clippy::from_iter_instead_of_collect",
25086 "clippy::if_not_else",
25087 "clippy::ignored_unit_patterns",
25088 "clippy::implicit_clone",
25089 "clippy::implicit_hasher",
25090 "clippy::inconsistent_struct_constructor",
25091 "clippy::index_refutable_slice",
25092 "clippy::inefficient_to_string",
25093 "clippy::inline_always",
25094 "clippy::into_iter_without_iter",
25095 "clippy::invalid_upcast_comparisons",
25096 "clippy::items_after_statements",
25097 "clippy::iter_filter_is_ok",
25098 "clippy::iter_filter_is_some",
25099 "clippy::iter_not_returning_iterator",
25100 "clippy::iter_without_into_iter",
25101 "clippy::large_digit_groups",
25102 "clippy::large_futures",
25103 "clippy::large_stack_arrays",
25104 "clippy::large_types_passed_by_value",
25105 "clippy::linkedlist",
25106 "clippy::macro_use_imports",
25107 "clippy::manual_assert",
25108 "clippy::manual_instant_elapsed",
25109 "clippy::manual_is_variant_and",
25110 "clippy::manual_let_else",
25111 "clippy::manual_ok_or",
25112 "clippy::manual_string_new",
25113 "clippy::many_single_char_names",
25114 "clippy::map_unwrap_or",
25115 "clippy::match_bool",
25116 "clippy::match_on_vec_items",
25117 "clippy::match_same_arms",
25118 "clippy::match_wild_err_arm",
25119 "clippy::match_wildcard_for_single_variants",
25120 "clippy::maybe_infinite_iter",
25121 "clippy::mismatching_type_param_order",
25122 "clippy::missing_errors_doc",
25123 "clippy::missing_fields_in_debug",
25124 "clippy::missing_panics_doc",
25125 "clippy::module_name_repetitions",
25126 "clippy::must_use_candidate",
25127 "clippy::mut_mut",
25128 "clippy::naive_bytecount",
25129 "clippy::needless_bitwise_bool",
25130 "clippy::needless_continue",
25131 "clippy::needless_for_each",
25132 "clippy::needless_pass_by_value",
25133 "clippy::needless_raw_string_hashes",
25134 "clippy::no_effect_underscore_binding",
25135 "clippy::no_mangle_with_rust_abi",
25136 "clippy::option_as_ref_cloned",
25137 "clippy::option_option",
25138 "clippy::ptr_as_ptr",
25139 "clippy::ptr_cast_constness",
25140 "clippy::pub_underscore_fields",
25141 "clippy::range_minus_one",
25142 "clippy::range_plus_one",
25143 "clippy::redundant_closure_for_method_calls",
25144 "clippy::redundant_else",
25145 "clippy::ref_as_ptr",
25146 "clippy::ref_binding_to_reference",
25147 "clippy::ref_option",
25148 "clippy::ref_option_ref",
25149 "clippy::return_self_not_must_use",
25150 "clippy::same_functions_in_if_condition",
25151 "clippy::semicolon_if_nothing_returned",
25152 "clippy::should_panic_without_expect",
25153 "clippy::similar_names",
25154 "clippy::single_char_pattern",
25155 "clippy::single_match_else",
25156 "clippy::stable_sort_primitive",
25157 "clippy::str_split_at_newline",
25158 "clippy::string_add_assign",
25159 "clippy::struct_excessive_bools",
25160 "clippy::struct_field_names",
25161 "clippy::too_many_lines",
25162 "clippy::transmute_ptr_to_ptr",
25163 "clippy::trivially_copy_pass_by_ref",
25164 "clippy::unchecked_duration_subtraction",
25165 "clippy::unicode_not_nfc",
25166 "clippy::uninlined_format_args",
25167 "clippy::unnecessary_box_returns",
25168 "clippy::unnecessary_join",
25169 "clippy::unnecessary_wraps",
25170 "clippy::unnested_or_patterns",
25171 "clippy::unreadable_literal",
25172 "clippy::unsafe_derive_deserialize",
25173 "clippy::unused_async",
25174 "clippy::unused_self",
25175 "clippy::used_underscore_binding",
25176 "clippy::used_underscore_items",
25177 "clippy::verbose_bit_mask",
25178 "clippy::wildcard_imports",
25179 "clippy::zero_sized_map_values",
25180 ],
25181 },
25182 LintGroup {
25183 lint: Lint {
25184 label: "clippy::perf",
25185 description: r##"lint group for: clippy::box_collection, clippy::boxed_local, clippy::cmp_owned, clippy::collapsible_str_replace, clippy::drain_collect, clippy::expect_fun_call, clippy::extend_with_drain, clippy::format_collect, clippy::format_in_format_args, clippy::iter_overeager_cloned, clippy::large_const_arrays, clippy::large_enum_variant, clippy::manual_memcpy, clippy::manual_retain, clippy::manual_str_repeat, clippy::manual_try_fold, clippy::map_entry, clippy::missing_const_for_thread_local, clippy::missing_spin_loop, clippy::readonly_write_lock, clippy::redundant_allocation, clippy::result_large_err, clippy::slow_vector_initialization, clippy::to_string_in_format_args, clippy::unnecessary_to_owned, clippy::useless_vec, clippy::vec_init_then_push, clippy::waker_clone_wake"##,
25186 default_severity: Severity::Allow,
25187 warn_since: None,
25188 deny_since: None,
25189 },
25190 children: &[
25191 "clippy::box_collection",
25192 "clippy::boxed_local",
25193 "clippy::cmp_owned",
25194 "clippy::collapsible_str_replace",
25195 "clippy::drain_collect",
25196 "clippy::expect_fun_call",
25197 "clippy::extend_with_drain",
25198 "clippy::format_collect",
25199 "clippy::format_in_format_args",
25200 "clippy::iter_overeager_cloned",
25201 "clippy::large_const_arrays",
25202 "clippy::large_enum_variant",
25203 "clippy::manual_memcpy",
25204 "clippy::manual_retain",
25205 "clippy::manual_str_repeat",
25206 "clippy::manual_try_fold",
25207 "clippy::map_entry",
25208 "clippy::missing_const_for_thread_local",
25209 "clippy::missing_spin_loop",
25210 "clippy::readonly_write_lock",
25211 "clippy::redundant_allocation",
25212 "clippy::result_large_err",
25213 "clippy::slow_vector_initialization",
25214 "clippy::to_string_in_format_args",
25215 "clippy::unnecessary_to_owned",
25216 "clippy::useless_vec",
25217 "clippy::vec_init_then_push",
25218 "clippy::waker_clone_wake",
25219 ],
25220 },
25221 LintGroup {
25222 lint: Lint {
25223 label: "clippy::restriction",
25224 description: r##"lint group for: clippy::absolute_paths, clippy::alloc_instead_of_core, clippy::allow_attributes, clippy::allow_attributes_without_reason, clippy::arithmetic_side_effects, clippy::as_conversions, clippy::as_underscore, clippy::assertions_on_result_states, clippy::big_endian_bytes, clippy::cfg_not_test, clippy::clone_on_ref_ptr, clippy::create_dir, clippy::dbg_macro, clippy::decimal_literal_representation, clippy::default_numeric_fallback, clippy::default_union_representation, clippy::deref_by_slicing, clippy::disallowed_script_idents, clippy::else_if_without_else, clippy::empty_drop, clippy::empty_enum_variants_with_brackets, clippy::empty_structs_with_brackets, clippy::error_impl_error, clippy::exhaustive_enums, clippy::exhaustive_structs, clippy::exit, clippy::expect_used, clippy::field_scoped_visibility_modifiers, clippy::filetype_is_file, clippy::float_arithmetic, clippy::float_cmp_const, clippy::fn_to_numeric_cast_any, clippy::format_push_string, clippy::get_unwrap, clippy::host_endian_bytes, clippy::if_then_some_else_none, clippy::impl_trait_in_params, clippy::implicit_return, clippy::indexing_slicing, clippy::infinite_loop, clippy::inline_asm_x86_att_syntax, clippy::inline_asm_x86_intel_syntax, clippy::integer_division, clippy::integer_division_remainder_used, clippy::iter_over_hash_type, clippy::large_include_file, clippy::let_underscore_must_use, clippy::let_underscore_untyped, clippy::little_endian_bytes, clippy::lossy_float_literal, clippy::map_err_ignore, clippy::mem_forget, clippy::min_ident_chars, clippy::missing_assert_message, clippy::missing_asserts_for_indexing, clippy::missing_docs_in_private_items, clippy::missing_inline_in_public_items, clippy::missing_trait_methods, clippy::mixed_read_write_in_expression, clippy::mod_module_files, clippy::modulo_arithmetic, clippy::multiple_inherent_impl, clippy::multiple_unsafe_ops_per_block, clippy::mutex_atomic, clippy::needless_raw_strings, clippy::non_ascii_literal, clippy::non_zero_suggestions, clippy::panic, clippy::panic_in_result_fn, clippy::partial_pub_fields, clippy::pathbuf_init_then_push, clippy::pattern_type_mismatch, clippy::print_stderr, clippy::print_stdout, clippy::pub_use, clippy::pub_with_shorthand, clippy::pub_without_shorthand, clippy::question_mark_used, clippy::rc_buffer, clippy::rc_mutex, clippy::redundant_type_annotations, clippy::ref_patterns, clippy::renamed_function_params, clippy::rest_pat_in_fully_bound_structs, clippy::same_name_method, clippy::self_named_module_files, clippy::semicolon_inside_block, clippy::semicolon_outside_block, clippy::separated_literal_suffix, clippy::shadow_reuse, clippy::shadow_same, clippy::shadow_unrelated, clippy::single_call_fn, clippy::single_char_lifetime_names, clippy::std_instead_of_alloc, clippy::std_instead_of_core, clippy::str_to_string, clippy::string_add, clippy::string_lit_chars_any, clippy::string_slice, clippy::string_to_string, clippy::suspicious_xor_used_as_pow, clippy::tests_outside_test_module, clippy::todo, clippy::try_err, clippy::undocumented_unsafe_blocks, clippy::unimplemented, clippy::unnecessary_safety_comment, clippy::unnecessary_safety_doc, clippy::unnecessary_self_imports, clippy::unneeded_field_pattern, clippy::unreachable, clippy::unseparated_literal_suffix, clippy::unused_result_ok, clippy::unused_trait_names, clippy::unwrap_in_result, clippy::unwrap_used, clippy::use_debug, clippy::verbose_file_reads, clippy::wildcard_enum_match_arm"##,
25225 default_severity: Severity::Allow,
25226 warn_since: None,
25227 deny_since: None,
25228 },
25229 children: &[
25230 "clippy::absolute_paths",
25231 "clippy::alloc_instead_of_core",
25232 "clippy::allow_attributes",
25233 "clippy::allow_attributes_without_reason",
25234 "clippy::arithmetic_side_effects",
25235 "clippy::as_conversions",
25236 "clippy::as_underscore",
25237 "clippy::assertions_on_result_states",
25238 "clippy::big_endian_bytes",
25239 "clippy::cfg_not_test",
25240 "clippy::clone_on_ref_ptr",
25241 "clippy::create_dir",
25242 "clippy::dbg_macro",
25243 "clippy::decimal_literal_representation",
25244 "clippy::default_numeric_fallback",
25245 "clippy::default_union_representation",
25246 "clippy::deref_by_slicing",
25247 "clippy::disallowed_script_idents",
25248 "clippy::else_if_without_else",
25249 "clippy::empty_drop",
25250 "clippy::empty_enum_variants_with_brackets",
25251 "clippy::empty_structs_with_brackets",
25252 "clippy::error_impl_error",
25253 "clippy::exhaustive_enums",
25254 "clippy::exhaustive_structs",
25255 "clippy::exit",
25256 "clippy::expect_used",
25257 "clippy::field_scoped_visibility_modifiers",
25258 "clippy::filetype_is_file",
25259 "clippy::float_arithmetic",
25260 "clippy::float_cmp_const",
25261 "clippy::fn_to_numeric_cast_any",
25262 "clippy::format_push_string",
25263 "clippy::get_unwrap",
25264 "clippy::host_endian_bytes",
25265 "clippy::if_then_some_else_none",
25266 "clippy::impl_trait_in_params",
25267 "clippy::implicit_return",
25268 "clippy::indexing_slicing",
25269 "clippy::infinite_loop",
25270 "clippy::inline_asm_x86_att_syntax",
25271 "clippy::inline_asm_x86_intel_syntax",
25272 "clippy::integer_division",
25273 "clippy::integer_division_remainder_used",
25274 "clippy::iter_over_hash_type",
25275 "clippy::large_include_file",
25276 "clippy::let_underscore_must_use",
25277 "clippy::let_underscore_untyped",
25278 "clippy::little_endian_bytes",
25279 "clippy::lossy_float_literal",
25280 "clippy::map_err_ignore",
25281 "clippy::mem_forget",
25282 "clippy::min_ident_chars",
25283 "clippy::missing_assert_message",
25284 "clippy::missing_asserts_for_indexing",
25285 "clippy::missing_docs_in_private_items",
25286 "clippy::missing_inline_in_public_items",
25287 "clippy::missing_trait_methods",
25288 "clippy::mixed_read_write_in_expression",
25289 "clippy::mod_module_files",
25290 "clippy::modulo_arithmetic",
25291 "clippy::multiple_inherent_impl",
25292 "clippy::multiple_unsafe_ops_per_block",
25293 "clippy::mutex_atomic",
25294 "clippy::needless_raw_strings",
25295 "clippy::non_ascii_literal",
25296 "clippy::non_zero_suggestions",
25297 "clippy::panic",
25298 "clippy::panic_in_result_fn",
25299 "clippy::partial_pub_fields",
25300 "clippy::pathbuf_init_then_push",
25301 "clippy::pattern_type_mismatch",
25302 "clippy::print_stderr",
25303 "clippy::print_stdout",
25304 "clippy::pub_use",
25305 "clippy::pub_with_shorthand",
25306 "clippy::pub_without_shorthand",
25307 "clippy::question_mark_used",
25308 "clippy::rc_buffer",
25309 "clippy::rc_mutex",
25310 "clippy::redundant_type_annotations",
25311 "clippy::ref_patterns",
25312 "clippy::renamed_function_params",
25313 "clippy::rest_pat_in_fully_bound_structs",
25314 "clippy::same_name_method",
25315 "clippy::self_named_module_files",
25316 "clippy::semicolon_inside_block",
25317 "clippy::semicolon_outside_block",
25318 "clippy::separated_literal_suffix",
25319 "clippy::shadow_reuse",
25320 "clippy::shadow_same",
25321 "clippy::shadow_unrelated",
25322 "clippy::single_call_fn",
25323 "clippy::single_char_lifetime_names",
25324 "clippy::std_instead_of_alloc",
25325 "clippy::std_instead_of_core",
25326 "clippy::str_to_string",
25327 "clippy::string_add",
25328 "clippy::string_lit_chars_any",
25329 "clippy::string_slice",
25330 "clippy::string_to_string",
25331 "clippy::suspicious_xor_used_as_pow",
25332 "clippy::tests_outside_test_module",
25333 "clippy::todo",
25334 "clippy::try_err",
25335 "clippy::undocumented_unsafe_blocks",
25336 "clippy::unimplemented",
25337 "clippy::unnecessary_safety_comment",
25338 "clippy::unnecessary_safety_doc",
25339 "clippy::unnecessary_self_imports",
25340 "clippy::unneeded_field_pattern",
25341 "clippy::unreachable",
25342 "clippy::unseparated_literal_suffix",
25343 "clippy::unused_result_ok",
25344 "clippy::unused_trait_names",
25345 "clippy::unwrap_in_result",
25346 "clippy::unwrap_used",
25347 "clippy::use_debug",
25348 "clippy::verbose_file_reads",
25349 "clippy::wildcard_enum_match_arm",
25350 ],
25351 },
25352 LintGroup {
25353 lint: Lint {
25354 label: "clippy::style",
25355 description: r##"lint group for: clippy::assertions_on_constants, clippy::assign_op_pattern, clippy::blocks_in_conditions, clippy::bool_assert_comparison, clippy::borrow_interior_mutable_const, clippy::box_default, clippy::builtin_type_shadow, clippy::byte_char_slices, clippy::bytes_nth, clippy::chars_last_cmp, clippy::chars_next_cmp, clippy::cmp_null, clippy::collapsible_else_if, clippy::collapsible_if, clippy::collapsible_match, clippy::comparison_chain, clippy::comparison_to_empty, clippy::declare_interior_mutable_const, clippy::default_instead_of_iter_empty, clippy::disallowed_macros, clippy::disallowed_methods, clippy::disallowed_names, clippy::disallowed_types, clippy::doc_lazy_continuation, clippy::double_must_use, clippy::double_neg, clippy::duplicate_underscore_argument, clippy::enum_variant_names, clippy::err_expect, clippy::excessive_precision, clippy::field_reassign_with_default, clippy::filter_map_bool_then, clippy::fn_to_numeric_cast, clippy::fn_to_numeric_cast_with_truncation, clippy::for_kv_map, clippy::from_over_into, clippy::from_str_radix_10, clippy::get_first, clippy::if_same_then_else, clippy::implicit_saturating_add, clippy::implicit_saturating_sub, clippy::inconsistent_digit_grouping, clippy::infallible_destructuring_match, clippy::inherent_to_string, clippy::init_numbered_fields, clippy::into_iter_on_ref, clippy::is_digit_ascii_radix, clippy::items_after_test_module, clippy::iter_cloned_collect, clippy::iter_next_slice, clippy::iter_nth, clippy::iter_nth_zero, clippy::iter_skip_next, clippy::just_underscores_and_digits, clippy::legacy_numeric_constants, clippy::len_without_is_empty, clippy::len_zero, clippy::let_and_return, clippy::let_unit_value, clippy::main_recursion, clippy::manual_async_fn, clippy::manual_bits, clippy::manual_is_ascii_check, clippy::manual_is_finite, clippy::manual_is_infinite, clippy::manual_map, clippy::manual_next_back, clippy::manual_non_exhaustive, clippy::manual_pattern_char_comparison, clippy::manual_range_contains, clippy::manual_rotate, clippy::manual_saturating_arithmetic, clippy::manual_while_let_some, clippy::map_clone, clippy::map_collect_result_unit, clippy::match_like_matches_macro, clippy::match_overlapping_arm, clippy::match_ref_pats, clippy::match_result_ok, clippy::mem_replace_option_with_none, clippy::mem_replace_with_default, clippy::missing_enforced_import_renames, clippy::missing_safety_doc, clippy::mixed_attributes_style, clippy::mixed_case_hex_literals, clippy::module_inception, clippy::must_use_unit, clippy::mut_mutex_lock, clippy::needless_borrow, clippy::needless_borrows_for_generic_args, clippy::needless_doctest_main, clippy::needless_else, clippy::needless_late_init, clippy::needless_parens_on_range_literals, clippy::needless_pub_self, clippy::needless_range_loop, clippy::needless_return, clippy::needless_return_with_question_mark, clippy::neg_multiply, clippy::new_ret_no_self, clippy::new_without_default, clippy::non_minimal_cfg, clippy::obfuscated_if_else, clippy::ok_expect, clippy::op_ref, clippy::option_map_or_err_ok, clippy::option_map_or_none, clippy::partialeq_to_none, clippy::print_literal, clippy::print_with_newline, clippy::println_empty_string, clippy::ptr_arg, clippy::ptr_eq, clippy::question_mark, clippy::redundant_closure, clippy::redundant_field_names, clippy::redundant_pattern, clippy::redundant_pattern_matching, clippy::redundant_static_lifetimes, clippy::result_map_or_into_option, clippy::result_unit_err, clippy::same_item_push, clippy::self_named_constructors, clippy::should_implement_trait, clippy::single_char_add_str, clippy::single_component_path_imports, clippy::single_match, clippy::string_extend_chars, clippy::tabs_in_doc_comments, clippy::to_digit_is_some, clippy::to_string_trait_impl, clippy::too_long_first_doc_paragraph, clippy::toplevel_ref_arg, clippy::trim_split_whitespace, clippy::unnecessary_fallible_conversions, clippy::unnecessary_fold, clippy::unnecessary_lazy_evaluations, clippy::unnecessary_mut_passed, clippy::unnecessary_owned_empty_strings, clippy::unsafe_removed_from_name, clippy::unused_enumerate_index, clippy::unused_unit, clippy::unusual_byte_groupings, clippy::unwrap_or_default, clippy::upper_case_acronyms, clippy::while_let_on_iterator, clippy::write_literal, clippy::write_with_newline, clippy::writeln_empty_string, clippy::wrong_self_convention, clippy::zero_ptr"##,
25356 default_severity: Severity::Allow,
25357 warn_since: None,
25358 deny_since: None,
25359 },
25360 children: &[
25361 "clippy::assertions_on_constants",
25362 "clippy::assign_op_pattern",
25363 "clippy::blocks_in_conditions",
25364 "clippy::bool_assert_comparison",
25365 "clippy::borrow_interior_mutable_const",
25366 "clippy::box_default",
25367 "clippy::builtin_type_shadow",
25368 "clippy::byte_char_slices",
25369 "clippy::bytes_nth",
25370 "clippy::chars_last_cmp",
25371 "clippy::chars_next_cmp",
25372 "clippy::cmp_null",
25373 "clippy::collapsible_else_if",
25374 "clippy::collapsible_if",
25375 "clippy::collapsible_match",
25376 "clippy::comparison_chain",
25377 "clippy::comparison_to_empty",
25378 "clippy::declare_interior_mutable_const",
25379 "clippy::default_instead_of_iter_empty",
25380 "clippy::disallowed_macros",
25381 "clippy::disallowed_methods",
25382 "clippy::disallowed_names",
25383 "clippy::disallowed_types",
25384 "clippy::doc_lazy_continuation",
25385 "clippy::double_must_use",
25386 "clippy::double_neg",
25387 "clippy::duplicate_underscore_argument",
25388 "clippy::enum_variant_names",
25389 "clippy::err_expect",
25390 "clippy::excessive_precision",
25391 "clippy::field_reassign_with_default",
25392 "clippy::filter_map_bool_then",
25393 "clippy::fn_to_numeric_cast",
25394 "clippy::fn_to_numeric_cast_with_truncation",
25395 "clippy::for_kv_map",
25396 "clippy::from_over_into",
25397 "clippy::from_str_radix_10",
25398 "clippy::get_first",
25399 "clippy::if_same_then_else",
25400 "clippy::implicit_saturating_add",
25401 "clippy::implicit_saturating_sub",
25402 "clippy::inconsistent_digit_grouping",
25403 "clippy::infallible_destructuring_match",
25404 "clippy::inherent_to_string",
25405 "clippy::init_numbered_fields",
25406 "clippy::into_iter_on_ref",
25407 "clippy::is_digit_ascii_radix",
25408 "clippy::items_after_test_module",
25409 "clippy::iter_cloned_collect",
25410 "clippy::iter_next_slice",
25411 "clippy::iter_nth",
25412 "clippy::iter_nth_zero",
25413 "clippy::iter_skip_next",
25414 "clippy::just_underscores_and_digits",
25415 "clippy::legacy_numeric_constants",
25416 "clippy::len_without_is_empty",
25417 "clippy::len_zero",
25418 "clippy::let_and_return",
25419 "clippy::let_unit_value",
25420 "clippy::main_recursion",
25421 "clippy::manual_async_fn",
25422 "clippy::manual_bits",
25423 "clippy::manual_is_ascii_check",
25424 "clippy::manual_is_finite",
25425 "clippy::manual_is_infinite",
25426 "clippy::manual_map",
25427 "clippy::manual_next_back",
25428 "clippy::manual_non_exhaustive",
25429 "clippy::manual_pattern_char_comparison",
25430 "clippy::manual_range_contains",
25431 "clippy::manual_rotate",
25432 "clippy::manual_saturating_arithmetic",
25433 "clippy::manual_while_let_some",
25434 "clippy::map_clone",
25435 "clippy::map_collect_result_unit",
25436 "clippy::match_like_matches_macro",
25437 "clippy::match_overlapping_arm",
25438 "clippy::match_ref_pats",
25439 "clippy::match_result_ok",
25440 "clippy::mem_replace_option_with_none",
25441 "clippy::mem_replace_with_default",
25442 "clippy::missing_enforced_import_renames",
25443 "clippy::missing_safety_doc",
25444 "clippy::mixed_attributes_style",
25445 "clippy::mixed_case_hex_literals",
25446 "clippy::module_inception",
25447 "clippy::must_use_unit",
25448 "clippy::mut_mutex_lock",
25449 "clippy::needless_borrow",
25450 "clippy::needless_borrows_for_generic_args",
25451 "clippy::needless_doctest_main",
25452 "clippy::needless_else",
25453 "clippy::needless_late_init",
25454 "clippy::needless_parens_on_range_literals",
25455 "clippy::needless_pub_self",
25456 "clippy::needless_range_loop",
25457 "clippy::needless_return",
25458 "clippy::needless_return_with_question_mark",
25459 "clippy::neg_multiply",
25460 "clippy::new_ret_no_self",
25461 "clippy::new_without_default",
25462 "clippy::non_minimal_cfg",
25463 "clippy::obfuscated_if_else",
25464 "clippy::ok_expect",
25465 "clippy::op_ref",
25466 "clippy::option_map_or_err_ok",
25467 "clippy::option_map_or_none",
25468 "clippy::partialeq_to_none",
25469 "clippy::print_literal",
25470 "clippy::print_with_newline",
25471 "clippy::println_empty_string",
25472 "clippy::ptr_arg",
25473 "clippy::ptr_eq",
25474 "clippy::question_mark",
25475 "clippy::redundant_closure",
25476 "clippy::redundant_field_names",
25477 "clippy::redundant_pattern",
25478 "clippy::redundant_pattern_matching",
25479 "clippy::redundant_static_lifetimes",
25480 "clippy::result_map_or_into_option",
25481 "clippy::result_unit_err",
25482 "clippy::same_item_push",
25483 "clippy::self_named_constructors",
25484 "clippy::should_implement_trait",
25485 "clippy::single_char_add_str",
25486 "clippy::single_component_path_imports",
25487 "clippy::single_match",
25488 "clippy::string_extend_chars",
25489 "clippy::tabs_in_doc_comments",
25490 "clippy::to_digit_is_some",
25491 "clippy::to_string_trait_impl",
25492 "clippy::too_long_first_doc_paragraph",
25493 "clippy::toplevel_ref_arg",
25494 "clippy::trim_split_whitespace",
25495 "clippy::unnecessary_fallible_conversions",
25496 "clippy::unnecessary_fold",
25497 "clippy::unnecessary_lazy_evaluations",
25498 "clippy::unnecessary_mut_passed",
25499 "clippy::unnecessary_owned_empty_strings",
25500 "clippy::unsafe_removed_from_name",
25501 "clippy::unused_enumerate_index",
25502 "clippy::unused_unit",
25503 "clippy::unusual_byte_groupings",
25504 "clippy::unwrap_or_default",
25505 "clippy::upper_case_acronyms",
25506 "clippy::while_let_on_iterator",
25507 "clippy::write_literal",
25508 "clippy::write_with_newline",
25509 "clippy::writeln_empty_string",
25510 "clippy::wrong_self_convention",
25511 "clippy::zero_ptr",
25512 ],
25513 },
25514 LintGroup {
25515 lint: Lint {
25516 label: "clippy::suspicious",
25517 description: r##"lint group for: clippy::almost_complete_range, clippy::arc_with_non_send_sync, clippy::await_holding_invalid_type, clippy::await_holding_lock, clippy::await_holding_refcell_ref, clippy::blanket_clippy_restriction_lints, clippy::cast_abs_to_unsigned, clippy::cast_enum_constructor, clippy::cast_enum_truncation, clippy::cast_nan_to_int, clippy::cast_slice_from_raw_parts, clippy::const_is_empty, clippy::crate_in_macro_def, clippy::deprecated_clippy_cfg_attr, clippy::drop_non_drop, clippy::duplicate_mod, clippy::duplicated_attributes, clippy::empty_docs, clippy::empty_line_after_doc_comments, clippy::empty_line_after_outer_attr, clippy::empty_loop, clippy::float_equality_without_abs, clippy::forget_non_drop, clippy::four_forward_slashes, clippy::from_raw_with_void_ptr, clippy::incompatible_msrv, clippy::ineffective_open_options, clippy::iter_out_of_bounds, clippy::join_absolute_paths, clippy::let_underscore_future, clippy::lines_filter_map_ok, clippy::macro_metavars_in_unsafe, clippy::manual_unwrap_or_default, clippy::misnamed_getters, clippy::misrefactored_assign_op, clippy::missing_transmute_annotations, clippy::multi_assignments, clippy::multiple_bound_locations, clippy::mut_range_bound, clippy::mutable_key_type, clippy::needless_character_iteration, clippy::needless_maybe_sized, clippy::no_effect_replace, clippy::non_canonical_clone_impl, clippy::non_canonical_partial_ord_impl, clippy::octal_escapes, clippy::path_ends_with_ext, clippy::permissions_set_readonly_false, clippy::pointers_in_nomem_asm_block, clippy::print_in_format_impl, clippy::rc_clone_in_vec_init, clippy::repeat_vec_with_capacity, clippy::single_range_in_vec_init, clippy::size_of_ref, clippy::suspicious_arithmetic_impl, clippy::suspicious_assignment_formatting, clippy::suspicious_command_arg_space, clippy::suspicious_doc_comments, clippy::suspicious_else_formatting, clippy::suspicious_map, clippy::suspicious_op_assign_impl, clippy::suspicious_open_options, clippy::suspicious_to_owned, clippy::suspicious_unary_op_formatting, clippy::swap_ptr_to_ref, clippy::test_attr_in_doctest, clippy::type_id_on_box, clippy::unconditional_recursion, clippy::unnecessary_clippy_cfg, clippy::unnecessary_get_then_check, clippy::unnecessary_result_map_or_else, clippy::zero_repeat_side_effects, clippy::zombie_processes"##,
25518 default_severity: Severity::Allow,
25519 warn_since: None,
25520 deny_since: None,
25521 },
25522 children: &[
25523 "clippy::almost_complete_range",
25524 "clippy::arc_with_non_send_sync",
25525 "clippy::await_holding_invalid_type",
25526 "clippy::await_holding_lock",
25527 "clippy::await_holding_refcell_ref",
25528 "clippy::blanket_clippy_restriction_lints",
25529 "clippy::cast_abs_to_unsigned",
25530 "clippy::cast_enum_constructor",
25531 "clippy::cast_enum_truncation",
25532 "clippy::cast_nan_to_int",
25533 "clippy::cast_slice_from_raw_parts",
25534 "clippy::const_is_empty",
25535 "clippy::crate_in_macro_def",
25536 "clippy::deprecated_clippy_cfg_attr",
25537 "clippy::drop_non_drop",
25538 "clippy::duplicate_mod",
25539 "clippy::duplicated_attributes",
25540 "clippy::empty_docs",
25541 "clippy::empty_line_after_doc_comments",
25542 "clippy::empty_line_after_outer_attr",
25543 "clippy::empty_loop",
25544 "clippy::float_equality_without_abs",
25545 "clippy::forget_non_drop",
25546 "clippy::four_forward_slashes",
25547 "clippy::from_raw_with_void_ptr",
25548 "clippy::incompatible_msrv",
25549 "clippy::ineffective_open_options",
25550 "clippy::iter_out_of_bounds",
25551 "clippy::join_absolute_paths",
25552 "clippy::let_underscore_future",
25553 "clippy::lines_filter_map_ok",
25554 "clippy::macro_metavars_in_unsafe",
25555 "clippy::manual_unwrap_or_default",
25556 "clippy::misnamed_getters",
25557 "clippy::misrefactored_assign_op",
25558 "clippy::missing_transmute_annotations",
25559 "clippy::multi_assignments",
25560 "clippy::multiple_bound_locations",
25561 "clippy::mut_range_bound",
25562 "clippy::mutable_key_type",
25563 "clippy::needless_character_iteration",
25564 "clippy::needless_maybe_sized",
25565 "clippy::no_effect_replace",
25566 "clippy::non_canonical_clone_impl",
25567 "clippy::non_canonical_partial_ord_impl",
25568 "clippy::octal_escapes",
25569 "clippy::path_ends_with_ext",
25570 "clippy::permissions_set_readonly_false",
25571 "clippy::pointers_in_nomem_asm_block",
25572 "clippy::print_in_format_impl",
25573 "clippy::rc_clone_in_vec_init",
25574 "clippy::repeat_vec_with_capacity",
25575 "clippy::single_range_in_vec_init",
25576 "clippy::size_of_ref",
25577 "clippy::suspicious_arithmetic_impl",
25578 "clippy::suspicious_assignment_formatting",
25579 "clippy::suspicious_command_arg_space",
25580 "clippy::suspicious_doc_comments",
25581 "clippy::suspicious_else_formatting",
25582 "clippy::suspicious_map",
25583 "clippy::suspicious_op_assign_impl",
25584 "clippy::suspicious_open_options",
25585 "clippy::suspicious_to_owned",
25586 "clippy::suspicious_unary_op_formatting",
25587 "clippy::swap_ptr_to_ref",
25588 "clippy::test_attr_in_doctest",
25589 "clippy::type_id_on_box",
25590 "clippy::unconditional_recursion",
25591 "clippy::unnecessary_clippy_cfg",
25592 "clippy::unnecessary_get_then_check",
25593 "clippy::unnecessary_result_map_or_else",
25594 "clippy::zero_repeat_side_effects",
25595 "clippy::zombie_processes",
25596 ],
25597 },
25598];