@@ -525,63 +525,73 @@ declare_features! (
525
525
) ;
526
526
527
527
declare_features ! (
528
- ( accepted, associated_types, "1.0.0" , None , None ) ,
529
- // Allows overloading augmented assignment operations like `a += b`.
530
- ( accepted, augmented_assignments, "1.8.0" , Some ( 28235 ) , None ) ,
531
- // Allows empty structs and enum variants with braces.
532
- ( accepted, braced_empty_structs, "1.8.0" , Some ( 29720 ) , None ) ,
533
- // Allows indexing into constant arrays.
534
- ( accepted, const_indexing, "1.26.0" , Some ( 29947 ) , None ) ,
535
- ( accepted, default_type_params, "1.0.0" , None , None ) ,
536
- ( accepted, globs, "1.0.0" , None , None ) ,
537
- ( accepted, if_let, "1.0.0" , None , None ) ,
538
528
// A temporary feature gate used to enable parser extensions needed
539
529
// to bootstrap fix for #5723.
540
530
( accepted, issue_5723_bootstrap, "1.0.0" , None , None ) ,
531
+ // These are used to test this portion of the compiler,
532
+ // they don't actually mean anything.
533
+ ( accepted, test_accepted_feature, "1.0.0" , None , None ) ,
534
+
535
+ // Allows using associated `type`s in `trait`s.
536
+ ( accepted, associated_types, "1.0.0" , None , None ) ,
537
+ // Allows using assigning a default type to type parameters in algebraic data type definitions.
538
+ ( accepted, default_type_params, "1.0.0" , None , None ) ,
539
+ // FIXME: explain `globs`.
540
+ ( accepted, globs, "1.0.0" , None , None ) ,
541
+ // Allows `macro_rules!` items.
541
542
( accepted, macro_rules, "1.0.0" , None , None ) ,
542
- // Allows using `#![no_std]`.
543
- ( accepted, no_std, "1.6.0" , None , None ) ,
543
+ // Allows use of `&foo[a..b]` as a slicing syntax.
544
544
( accepted, slicing_syntax, "1.0.0" , None , None ) ,
545
+ // Allows struct variants `Foo { baz: u8, .. }` in enums (RFC 418).
545
546
( accepted, struct_variant, "1.0.0" , None , None ) ,
546
- // These are used to test this portion of the compiler, they don't actually
547
- // mean anything.
548
- ( accepted, test_accepted_feature, "1.0.0" , None , None ) ,
547
+ // Allows indexing tuples.
549
548
( accepted, tuple_indexing, "1.0.0" , None , None ) ,
550
- // Allows macros to appear in the type position.
551
- ( accepted, type_macros, "1.13.0" , Some ( 27245 ) , None ) ,
549
+ // Allows the use of `if let` expressions.
550
+ ( accepted, if_let, "1.0.0" , None , None ) ,
551
+ // Allows the use of `while let` expressions.
552
552
( accepted, while_let, "1.0.0" , None , None ) ,
553
+ // Allows using `#![no_std]`.
554
+ ( accepted, no_std, "1.6.0" , None , None ) ,
555
+ // Allows overloading augmented assignment operations like `a += b`.
556
+ ( accepted, augmented_assignments, "1.8.0" , Some ( 28235 ) , None ) ,
557
+ // Allows empty structs and enum variants with braces.
558
+ ( accepted, braced_empty_structs, "1.8.0" , Some ( 29720 ) , None ) ,
553
559
// Allows `#[deprecated]` attribute.
554
560
( accepted, deprecated, "1.9.0" , Some ( 29935 ) , None ) ,
555
- // `expr?`
561
+ // Allows macros to appear in the type position.
562
+ ( accepted, type_macros, "1.13.0" , Some ( 27245 ) , None ) ,
563
+ // Allows use of the postfix `?` operator in expressions.
556
564
( accepted, question_mark, "1.13.0" , Some ( 31436 ) , None ) ,
557
565
// Allows `..` in tuple (struct) patterns.
558
566
( accepted, dotdot_in_tuple_patterns, "1.14.0" , Some ( 33627 ) , None ) ,
567
+ // Allows some increased flexibility in the name resolution rules,
568
+ // especially around globs and shadowing (RFC 1560).
559
569
( accepted, item_like_imports, "1.15.0" , Some ( 35120 ) , None ) ,
560
570
// Allows using `Self` and associated types in struct expressions and patterns.
561
571
( accepted, more_struct_aliases, "1.16.0" , Some ( 37544 ) , None ) ,
562
- // elide `'static` lifetimes in `static`s and `const`s.
572
+ // Allows elision of `'static` lifetimes in `static`s and `const`s.
563
573
( accepted, static_in_const, "1.17.0" , Some ( 35897 ) , None ) ,
564
574
// Allows field shorthands (`x` meaning `x: x`) in struct literal expressions.
565
575
( accepted, field_init_shorthand, "1.17.0" , Some ( 37340 ) , None ) ,
566
576
// Allows the definition recursive static items.
567
577
( accepted, static_recursion, "1.17.0" , Some ( 29719 ) , None ) ,
568
- // `pub(restricted)` visibilities (RFC 1422)
578
+ // Allows `pub(restricted)` visibilities (RFC 1422).
569
579
( accepted, pub_restricted, "1.18.0" , Some ( 32409 ) , None ) ,
570
- // `#![windows_subsystem]`
580
+ // Allows `#![windows_subsystem]`.
571
581
( accepted, windows_subsystem, "1.18.0" , Some ( 37499 ) , None ) ,
572
582
// Allows `break {expr}` with a value inside `loop`s.
573
583
( accepted, loop_break_value, "1.19.0" , Some ( 37339 ) , None ) ,
574
- // Permits numeric fields in struct expressions and patterns.
584
+ // Allows numeric fields in struct expressions and patterns.
575
585
( accepted, relaxed_adts, "1.19.0" , Some ( 35626 ) , None ) ,
576
- // Coerces non capturing closures to function pointers.
586
+ // Allows coercing non capturing closures to function pointers.
577
587
( accepted, closure_to_fn_coercion, "1.19.0" , Some ( 39817 ) , None ) ,
578
588
// Allows attributes on struct literal fields.
579
589
( accepted, struct_field_attributes, "1.20.0" , Some ( 38814 ) , None ) ,
580
590
// Allows the definition of associated constants in `trait` or `impl` blocks.
581
591
( accepted, associated_consts, "1.20.0" , Some ( 29646 ) , None ) ,
582
- // Usage of the `compile_error!` macro.
592
+ // Allows usage of the `compile_error!` macro.
583
593
( accepted, compile_error, "1.20.0" , Some ( 40872 ) , None ) ,
584
- // See rust-lang/rfcs#1414. Allows code like `let x: &'static u32 = &42` to work.
594
+ // Allows code like `let x: &'static u32 = &42` to work (RFC 1414) .
585
595
( accepted, rvalue_static_promotion, "1.21.0" , Some ( 38865 ) , None ) ,
586
596
// Allows `Drop` types in constants (RFC 1440).
587
597
( accepted, drop_types_in_const, "1.22.0" , Some ( 33156 ) , None ) ,
@@ -592,24 +602,27 @@ declare_features! (
592
602
( accepted, repr_align, "1.25.0" , Some ( 33626 ) , None ) ,
593
603
// Allows '|' at beginning of match arms (RFC 1925).
594
604
( accepted, match_beginning_vert, "1.25.0" , Some ( 44101 ) , None ) ,
595
- // Nested groups in `use` (RFC 2128)
605
+ // Allows nested groups in `use` items (RFC 2128).
596
606
( accepted, use_nested_groups, "1.25.0" , Some ( 44494 ) , None ) ,
597
- // `a..=b` and `..=b`
607
+ // Allows indexing into constant arrays.
608
+ ( accepted, const_indexing, "1.26.0" , Some ( 29947 ) , None ) ,
609
+ // Allows using `a..=b` and `..=b` as inclusive range syntaxes.
598
610
( accepted, inclusive_range_syntax, "1.26.0" , Some ( 28237 ) , None ) ,
599
611
// Allows `..=` in patterns (RFC 1192).
600
612
( accepted, dotdoteq_in_patterns, "1.26.0" , Some ( 28237 ) , None ) ,
601
- // Termination trait in main (RFC 1937)
613
+ // Allows `fn main()` with return types which implements `Termination` (RFC 1937).
602
614
( accepted, termination_trait, "1.26.0" , Some ( 43301 ) , None ) ,
603
- // `Copy`/` Clone` closures (RFC 2132).
615
+ // Allows implementing ` Clone` for closures where possible (RFC 2132).
604
616
( accepted, clone_closures, "1.26.0" , Some ( 44490 ) , None ) ,
617
+ // Allows implementing `Copy` for closures where possible (RFC 2132).
605
618
( accepted, copy_closures, "1.26.0" , Some ( 44490 ) , None ) ,
606
619
// Allows `impl Trait` in function arguments.
607
620
( accepted, universal_impl_trait, "1.26.0" , Some ( 34511 ) , None ) ,
608
621
// Allows `impl Trait` in function return types.
609
622
( accepted, conservative_impl_trait, "1.26.0" , Some ( 34511 ) , None ) ,
610
- // The ` i128` type
623
+ // Allows using the `u128` and ` i128` types.
611
624
( accepted, i128_type, "1.26.0" , Some ( 35118 ) , None ) ,
612
- // Default match binding modes (RFC 2005)
625
+ // Allows default match binding modes (RFC 2005).
613
626
( accepted, match_default_bindings, "1.26.0" , Some ( 42640 ) , None ) ,
614
627
// Allows `'_` placeholder lifetimes.
615
628
( accepted, underscore_lifetimes, "1.26.0" , Some ( 44524 ) , None ) ,
@@ -619,21 +632,21 @@ declare_features! (
619
632
( accepted, cfg_target_feature, "1.27.0" , Some ( 29717 ) , None ) ,
620
633
// Allows `#[target_feature(...)]`.
621
634
( accepted, target_feature, "1.27.0" , None , None ) ,
622
- // Trait object syntax with `dyn` prefix
635
+ // Allows using `dyn Trait` as a syntax for trait objects.
623
636
( accepted, dyn_trait, "1.27.0" , Some ( 44662 ) , None ) ,
624
637
// Allows `#[must_use]` on functions, and introduces must-use operators (RFC 1940).
625
638
( accepted, fn_must_use, "1.27.0" , Some ( 43302 ) , None ) ,
626
639
// Allows use of the `:lifetime` macro fragment specifier.
627
640
( accepted, macro_lifetime_matcher, "1.27.0" , Some ( 34303 ) , None ) ,
628
- // Termination trait in tests (RFC 1937)
641
+ // Allows `#[test]` functions where the return type implements `Termination` (RFC 1937).
629
642
( accepted, termination_trait_test, "1.27.0" , Some ( 48854 ) , None ) ,
630
- // The `#[global_allocator]` attribute
643
+ // Allows the `#[global_allocator]` attribute.
631
644
( accepted, global_allocator, "1.28.0" , Some ( 27389 ) , None ) ,
632
645
// Allows `#[repr(transparent)]` attribute on newtype structs.
633
646
( accepted, repr_transparent, "1.28.0" , Some ( 43036 ) , None ) ,
634
- // Procedural macros in `proc-macro` crates
647
+ // Allows procedural macros in `proc-macro` crates.
635
648
( accepted, proc_macro, "1.29.0" , Some ( 38356 ) , None ) ,
636
- // `foo.rs` as an alternative to `foo/mod.rs`
649
+ // Allows `foo.rs` as an alternative to `foo/mod.rs`.
637
650
( accepted, non_modrs_mods, "1.30.0" , Some ( 44660 ) , None ) ,
638
651
// Allows use of the `:vis` macro fragment specifier
639
652
( accepted, macro_vis_matcher, "1.30.0" , Some ( 41022 ) , None ) ,
@@ -642,47 +655,50 @@ declare_features! (
642
655
( accepted, use_extern_macros, "1.30.0" , Some ( 35896 ) , None ) ,
643
656
// Allows keywords to be escaped for use as identifiers.
644
657
( accepted, raw_identifiers, "1.30.0" , Some ( 48589 ) , None ) ,
645
- // Attributes scoped to tools.
658
+ // Allows attributes scoped to tools.
646
659
( accepted, tool_attributes, "1.30.0" , Some ( 44690 ) , None ) ,
647
660
// Allows multi-segment paths in attributes and derives.
648
661
( accepted, proc_macro_path_invoc, "1.30.0" , Some ( 38356 ) , None ) ,
649
662
// Allows all literals in attribute lists and values of key-value pairs.
650
663
( accepted, attr_literals, "1.30.0" , Some ( 34981 ) , None ) ,
651
- // Infer outlives requirements (RFC 2093).
664
+ // Allows inferring outlives requirements (RFC 2093).
652
665
( accepted, infer_outlives_requirements, "1.30.0" , Some ( 44493 ) , None ) ,
666
+ // Allows annotating functions conforming to `fn(&PanicInfo) -> !` with `#[panic_handler]`.
667
+ // This defines the behavior of panics.
653
668
( accepted, panic_handler, "1.30.0" , Some ( 44489 ) , None ) ,
654
- // Used to preserve symbols (see llvm.used).
669
+ // Allows `#[used]` to preserve symbols (see llvm.used).
655
670
( accepted, used, "1.30.0" , Some ( 40289 ) , None ) ,
656
- // `crate` in paths
671
+ // Allows `crate` in paths.
657
672
( accepted, crate_in_paths, "1.30.0" , Some ( 45477 ) , None ) ,
658
- // Resolve absolute paths as paths from other crates.
673
+ // Allows resolving absolute paths as paths from other crates.
659
674
( accepted, extern_absolute_paths, "1.30.0" , Some ( 44660 ) , None ) ,
660
- // Access to crate names passed via `--extern` through prelude.
675
+ // Allows access to crate names passed via `--extern` through prelude.
661
676
( accepted, extern_prelude, "1.30.0" , Some ( 44660 ) , None ) ,
662
- // Parentheses in patterns
677
+ // Allows parentheses in patterns.
663
678
( accepted, pattern_parentheses, "1.31.0" , Some ( 51087 ) , None ) ,
664
679
// Allows the definition of `const fn` functions.
665
680
( accepted, min_const_fn, "1.31.0" , Some ( 53555 ) , None ) ,
666
- // Scoped lints
681
+ // Allows scoped lints.
667
682
( accepted, tool_lints, "1.31.0" , Some ( 44690 ) , None ) ,
668
- // `impl<I:Iterator> Iterator for &mut Iterator`
669
- // `impl Debug for Foo<'_>`
683
+ // Allows lifetime elision in `impl` headers. For example:
684
+ // + `impl<I:Iterator> Iterator for &mut Iterator`
685
+ // + `impl Debug for Foo<'_>`
670
686
( accepted, impl_header_lifetime_elision, "1.31.0" , Some ( 15872 ) , None ) ,
671
- // `extern crate foo as bar;` puts `bar` into extern prelude.
687
+ // Allows `extern crate foo as bar;`. This puts `bar` into extern prelude.
672
688
( accepted, extern_crate_item_prelude, "1.31.0" , Some ( 55599 ) , None ) ,
673
689
// Allows use of the `:literal` macro fragment specifier (RFC 1576).
674
690
( accepted, macro_literal_matcher, "1.32.0" , Some ( 35625 ) , None ) ,
675
- // Use `?` as the Kleene "at most one" operator.
691
+ // Allows use of `?` as the Kleene "at most one" operator in macros .
676
692
( accepted, macro_at_most_once_rep, "1.32.0" , Some ( 48075 ) , None ) ,
677
- // `Self` struct constructor (RFC 2302)
693
+ // Allows `Self` struct constructor (RFC 2302).
678
694
( accepted, self_struct_ctor, "1.32.0" , Some ( 51994 ) , None ) ,
679
- // `Self` in type definitions (RFC 2300)
695
+ // Allows `Self` in type definitions (RFC 2300).
680
696
( accepted, self_in_typedefs, "1.32.0" , Some ( 49303 ) , None ) ,
681
697
// Allows `use x::y;` to search `x` in the current scope.
682
698
( accepted, uniform_paths, "1.32.0" , Some ( 53130 ) , None ) ,
683
- // Integer match exhaustiveness checking (RFC 2591)
699
+ // Allows integer match exhaustiveness checking (RFC 2591).
684
700
( accepted, exhaustive_integer_patterns, "1.33.0" , Some ( 50907 ) , None ) ,
685
- // `use path as _;` and `extern crate c as _;`
701
+ // Allows `use path as _;` and `extern crate c as _;`.
686
702
( accepted, underscore_imports, "1.33.0" , Some ( 48216 ) , None ) ,
687
703
// Allows `#[repr(packed(N))]` attribute on structs.
688
704
( accepted, repr_packed, "1.33.0" , Some ( 33158 ) , None ) ,
@@ -694,15 +710,16 @@ declare_features! (
694
710
// As long as control flow is not implemented in const eval, `&&` and `||` may not be used
695
711
// at the same time as let bindings.
696
712
( accepted, const_let, "1.33.0" , Some ( 48821 ) , None ) ,
697
- // `#[cfg_attr(predicate, multiple, attributes, here)]`
713
+ // Allows `#[cfg_attr(predicate, multiple, attributes, here)]`.
698
714
( accepted, cfg_attr_multi, "1.33.0" , Some ( 54881 ) , None ) ,
699
- // Top level or-patterns (`p | q`) in `if let` and `while let`.
715
+ // Allows top level or-patterns (`p | q`) in `if let` and `while let`.
700
716
( accepted, if_while_or_patterns, "1.33.0" , Some ( 48215 ) , None ) ,
701
717
// Allows `cfg(target_vendor = "...")`.
702
718
( accepted, cfg_target_vendor, "1.33.0" , Some ( 29718 ) , None ) ,
703
- // `extern crate self as foo;` puts local crate root into extern prelude under name `foo`.
719
+ // Allows `extern crate self as foo;`.
720
+ // This puts local crate root into extern prelude under name `foo`.
704
721
( accepted, extern_crate_self, "1.34.0" , Some ( 56409 ) , None ) ,
705
- // support for arbitrary delimited token streams in non-macro attributes
722
+ // Allows arbitrary delimited token streams in non-macro attributes.
706
723
( accepted, unrestricted_attribute_tokens, "1.34.0" , Some ( 55208 ) , None ) ,
707
724
) ;
708
725
0 commit comments