Skip to content

Commit

Permalink
Rollup merge of rust-lang#60354 - Centril:cleanup-declare-features-ac…
Browse files Browse the repository at this point in the history
…cepted, r=oli-obk

Cleanup declare_features! for 'accepted' with a uniform style + sort them

r? @oli-obk

cc rust-lang#60362
cc rust-lang#60361
  • Loading branch information
Centril authored Apr 30, 2019
2 parents 0b0b948 + 68a02ac commit 8000d44
Showing 1 changed file with 73 additions and 56 deletions.
129 changes: 73 additions & 56 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,63 +533,73 @@ declare_features! (
);

declare_features! (
(accepted, associated_types, "1.0.0", None, None),
// Allows overloading augmented assignment operations like `a += b`.
(accepted, augmented_assignments, "1.8.0", Some(28235), None),
// Allows empty structs and enum variants with braces.
(accepted, braced_empty_structs, "1.8.0", Some(29720), None),
// Allows indexing into constant arrays.
(accepted, const_indexing, "1.26.0", Some(29947), None),
(accepted, default_type_params, "1.0.0", None, None),
(accepted, globs, "1.0.0", None, None),
(accepted, if_let, "1.0.0", None, None),
// A temporary feature gate used to enable parser extensions needed
// to bootstrap fix for #5723.
(accepted, issue_5723_bootstrap, "1.0.0", None, None),
// These are used to test this portion of the compiler,
// they don't actually mean anything.
(accepted, test_accepted_feature, "1.0.0", None, None),

// Allows using associated `type`s in `trait`s.
(accepted, associated_types, "1.0.0", None, None),
// Allows using assigning a default type to type parameters in algebraic data type definitions.
(accepted, default_type_params, "1.0.0", None, None),
// FIXME: explain `globs`.
(accepted, globs, "1.0.0", None, None),
// Allows `macro_rules!` items.
(accepted, macro_rules, "1.0.0", None, None),
// Allows using `#![no_std]`.
(accepted, no_std, "1.6.0", None, None),
// Allows use of `&foo[a..b]` as a slicing syntax.
(accepted, slicing_syntax, "1.0.0", None, None),
// Allows struct variants `Foo { baz: u8, .. }` in enums (RFC 418).
(accepted, struct_variant, "1.0.0", None, None),
// These are used to test this portion of the compiler, they don't actually
// mean anything.
(accepted, test_accepted_feature, "1.0.0", None, None),
// Allows indexing tuples.
(accepted, tuple_indexing, "1.0.0", None, None),
// Allows macros to appear in the type position.
(accepted, type_macros, "1.13.0", Some(27245), None),
// Allows the use of `if let` expressions.
(accepted, if_let, "1.0.0", None, None),
// Allows the use of `while let` expressions.
(accepted, while_let, "1.0.0", None, None),
// Allows using `#![no_std]`.
(accepted, no_std, "1.6.0", None, None),
// Allows overloading augmented assignment operations like `a += b`.
(accepted, augmented_assignments, "1.8.0", Some(28235), None),
// Allows empty structs and enum variants with braces.
(accepted, braced_empty_structs, "1.8.0", Some(29720), None),
// Allows `#[deprecated]` attribute.
(accepted, deprecated, "1.9.0", Some(29935), None),
// `expr?`
// Allows macros to appear in the type position.
(accepted, type_macros, "1.13.0", Some(27245), None),
// Allows use of the postfix `?` operator in expressions.
(accepted, question_mark, "1.13.0", Some(31436), None),
// Allows `..` in tuple (struct) patterns.
(accepted, dotdot_in_tuple_patterns, "1.14.0", Some(33627), None),
// Allows some increased flexibility in the name resolution rules,
// especially around globs and shadowing (RFC 1560).
(accepted, item_like_imports, "1.15.0", Some(35120), None),
// Allows using `Self` and associated types in struct expressions and patterns.
(accepted, more_struct_aliases, "1.16.0", Some(37544), None),
// elide `'static` lifetimes in `static`s and `const`s.
// Allows elision of `'static` lifetimes in `static`s and `const`s.
(accepted, static_in_const, "1.17.0", Some(35897), None),
// Allows field shorthands (`x` meaning `x: x`) in struct literal expressions.
(accepted, field_init_shorthand, "1.17.0", Some(37340), None),
// Allows the definition recursive static items.
(accepted, static_recursion, "1.17.0", Some(29719), None),
// `pub(restricted)` visibilities (RFC 1422)
// Allows `pub(restricted)` visibilities (RFC 1422).
(accepted, pub_restricted, "1.18.0", Some(32409), None),
// `#![windows_subsystem]`
// Allows `#![windows_subsystem]`.
(accepted, windows_subsystem, "1.18.0", Some(37499), None),
// Allows `break {expr}` with a value inside `loop`s.
(accepted, loop_break_value, "1.19.0", Some(37339), None),
// Permits numeric fields in struct expressions and patterns.
// Allows numeric fields in struct expressions and patterns.
(accepted, relaxed_adts, "1.19.0", Some(35626), None),
// Coerces non capturing closures to function pointers.
// Allows coercing non capturing closures to function pointers.
(accepted, closure_to_fn_coercion, "1.19.0", Some(39817), None),
// Allows attributes on struct literal fields.
(accepted, struct_field_attributes, "1.20.0", Some(38814), None),
// Allows the definition of associated constants in `trait` or `impl` blocks.
(accepted, associated_consts, "1.20.0", Some(29646), None),
// Usage of the `compile_error!` macro.
// Allows usage of the `compile_error!` macro.
(accepted, compile_error, "1.20.0", Some(40872), None),
// See rust-lang/rfcs#1414. Allows code like `let x: &'static u32 = &42` to work.
// Allows code like `let x: &'static u32 = &42` to work (RFC 1414).
(accepted, rvalue_static_promotion, "1.21.0", Some(38865), None),
// Allows `Drop` types in constants (RFC 1440).
(accepted, drop_types_in_const, "1.22.0", Some(33156), None),
Expand All @@ -600,24 +610,27 @@ declare_features! (
(accepted, repr_align, "1.25.0", Some(33626), None),
// Allows '|' at beginning of match arms (RFC 1925).
(accepted, match_beginning_vert, "1.25.0", Some(44101), None),
// Nested groups in `use` (RFC 2128)
// Allows nested groups in `use` items (RFC 2128).
(accepted, use_nested_groups, "1.25.0", Some(44494), None),
// `a..=b` and `..=b`
// Allows indexing into constant arrays.
(accepted, const_indexing, "1.26.0", Some(29947), None),
// Allows using `a..=b` and `..=b` as inclusive range syntaxes.
(accepted, inclusive_range_syntax, "1.26.0", Some(28237), None),
// Allows `..=` in patterns (RFC 1192).
(accepted, dotdoteq_in_patterns, "1.26.0", Some(28237), None),
// Termination trait in main (RFC 1937)
// Allows `fn main()` with return types which implements `Termination` (RFC 1937).
(accepted, termination_trait, "1.26.0", Some(43301), None),
// `Copy`/`Clone` closures (RFC 2132).
// Allows implementing `Clone` for closures where possible (RFC 2132).
(accepted, clone_closures, "1.26.0", Some(44490), None),
// Allows implementing `Copy` for closures where possible (RFC 2132).
(accepted, copy_closures, "1.26.0", Some(44490), None),
// Allows `impl Trait` in function arguments.
(accepted, universal_impl_trait, "1.26.0", Some(34511), None),
// Allows `impl Trait` in function return types.
(accepted, conservative_impl_trait, "1.26.0", Some(34511), None),
// The `i128` type
// Allows using the `u128` and `i128` types.
(accepted, i128_type, "1.26.0", Some(35118), None),
// Default match binding modes (RFC 2005)
// Allows default match binding modes (RFC 2005).
(accepted, match_default_bindings, "1.26.0", Some(42640), None),
// Allows `'_` placeholder lifetimes.
(accepted, underscore_lifetimes, "1.26.0", Some(44524), None),
Expand All @@ -627,21 +640,21 @@ declare_features! (
(accepted, cfg_target_feature, "1.27.0", Some(29717), None),
// Allows `#[target_feature(...)]`.
(accepted, target_feature, "1.27.0", None, None),
// Trait object syntax with `dyn` prefix
// Allows using `dyn Trait` as a syntax for trait objects.
(accepted, dyn_trait, "1.27.0", Some(44662), None),
// Allows `#[must_use]` on functions, and introduces must-use operators (RFC 1940).
(accepted, fn_must_use, "1.27.0", Some(43302), None),
// Allows use of the `:lifetime` macro fragment specifier.
(accepted, macro_lifetime_matcher, "1.27.0", Some(34303), None),
// Termination trait in tests (RFC 1937)
// Allows `#[test]` functions where the return type implements `Termination` (RFC 1937).
(accepted, termination_trait_test, "1.27.0", Some(48854), None),
// The `#[global_allocator]` attribute
// Allows the `#[global_allocator]` attribute.
(accepted, global_allocator, "1.28.0", Some(27389), None),
// Allows `#[repr(transparent)]` attribute on newtype structs.
(accepted, repr_transparent, "1.28.0", Some(43036), None),
// Procedural macros in `proc-macro` crates
// Allows procedural macros in `proc-macro` crates.
(accepted, proc_macro, "1.29.0", Some(38356), None),
// `foo.rs` as an alternative to `foo/mod.rs`
// Allows `foo.rs` as an alternative to `foo/mod.rs`.
(accepted, non_modrs_mods, "1.30.0", Some(44660), None),
// Allows use of the `:vis` macro fragment specifier
(accepted, macro_vis_matcher, "1.30.0", Some(41022), None),
Expand All @@ -650,47 +663,50 @@ declare_features! (
(accepted, use_extern_macros, "1.30.0", Some(35896), None),
// Allows keywords to be escaped for use as identifiers.
(accepted, raw_identifiers, "1.30.0", Some(48589), None),
// Attributes scoped to tools.
// Allows attributes scoped to tools.
(accepted, tool_attributes, "1.30.0", Some(44690), None),
// Allows multi-segment paths in attributes and derives.
(accepted, proc_macro_path_invoc, "1.30.0", Some(38356), None),
// Allows all literals in attribute lists and values of key-value pairs.
(accepted, attr_literals, "1.30.0", Some(34981), None),
// Infer outlives requirements (RFC 2093).
// Allows inferring outlives requirements (RFC 2093).
(accepted, infer_outlives_requirements, "1.30.0", Some(44493), None),
// Allows annotating functions conforming to `fn(&PanicInfo) -> !` with `#[panic_handler]`.
// This defines the behavior of panics.
(accepted, panic_handler, "1.30.0", Some(44489), None),
// Used to preserve symbols (see llvm.used).
// Allows `#[used]` to preserve symbols (see llvm.used).
(accepted, used, "1.30.0", Some(40289), None),
// `crate` in paths
// Allows `crate` in paths.
(accepted, crate_in_paths, "1.30.0", Some(45477), None),
// Resolve absolute paths as paths from other crates.
// Allows resolving absolute paths as paths from other crates.
(accepted, extern_absolute_paths, "1.30.0", Some(44660), None),
// Access to crate names passed via `--extern` through prelude.
// Allows access to crate names passed via `--extern` through prelude.
(accepted, extern_prelude, "1.30.0", Some(44660), None),
// Parentheses in patterns
// Allows parentheses in patterns.
(accepted, pattern_parentheses, "1.31.0", Some(51087), None),
// Allows the definition of `const fn` functions.
(accepted, min_const_fn, "1.31.0", Some(53555), None),
// Scoped lints
// Allows scoped lints.
(accepted, tool_lints, "1.31.0", Some(44690), None),
// `impl<I:Iterator> Iterator for &mut Iterator`
// `impl Debug for Foo<'_>`
// Allows lifetime elision in `impl` headers. For example:
// + `impl<I:Iterator> Iterator for &mut Iterator`
// + `impl Debug for Foo<'_>`
(accepted, impl_header_lifetime_elision, "1.31.0", Some(15872), None),
// `extern crate foo as bar;` puts `bar` into extern prelude.
// Allows `extern crate foo as bar;`. This puts `bar` into extern prelude.
(accepted, extern_crate_item_prelude, "1.31.0", Some(55599), None),
// Allows use of the `:literal` macro fragment specifier (RFC 1576).
(accepted, macro_literal_matcher, "1.32.0", Some(35625), None),
// Use `?` as the Kleene "at most one" operator.
// Allows use of `?` as the Kleene "at most one" operator in macros.
(accepted, macro_at_most_once_rep, "1.32.0", Some(48075), None),
// `Self` struct constructor (RFC 2302)
// Allows `Self` struct constructor (RFC 2302).
(accepted, self_struct_ctor, "1.32.0", Some(51994), None),
// `Self` in type definitions (RFC 2300)
// Allows `Self` in type definitions (RFC 2300).
(accepted, self_in_typedefs, "1.32.0", Some(49303), None),
// Allows `use x::y;` to search `x` in the current scope.
(accepted, uniform_paths, "1.32.0", Some(53130), None),
// Integer match exhaustiveness checking (RFC 2591)
// Allows integer match exhaustiveness checking (RFC 2591).
(accepted, exhaustive_integer_patterns, "1.33.0", Some(50907), None),
// `use path as _;` and `extern crate c as _;`
// Allows `use path as _;` and `extern crate c as _;`.
(accepted, underscore_imports, "1.33.0", Some(48216), None),
// Allows `#[repr(packed(N))]` attribute on structs.
(accepted, repr_packed, "1.33.0", Some(33158), None),
Expand All @@ -702,15 +718,16 @@ declare_features! (
// As long as control flow is not implemented in const eval, `&&` and `||` may not be used
// at the same time as let bindings.
(accepted, const_let, "1.33.0", Some(48821), None),
// `#[cfg_attr(predicate, multiple, attributes, here)]`
// Allows `#[cfg_attr(predicate, multiple, attributes, here)]`.
(accepted, cfg_attr_multi, "1.33.0", Some(54881), None),
// Top level or-patterns (`p | q`) in `if let` and `while let`.
// Allows top level or-patterns (`p | q`) in `if let` and `while let`.
(accepted, if_while_or_patterns, "1.33.0", Some(48215), None),
// Allows `cfg(target_vendor = "...")`.
(accepted, cfg_target_vendor, "1.33.0", Some(29718), None),
// `extern crate self as foo;` puts local crate root into extern prelude under name `foo`.
// Allows `extern crate self as foo;`.
// This puts local crate root into extern prelude under name `foo`.
(accepted, extern_crate_self, "1.34.0", Some(56409), None),
// support for arbitrary delimited token streams in non-macro attributes
// Allows arbitrary delimited token streams in non-macro attributes.
(accepted, unrestricted_attribute_tokens, "1.34.0", Some(55208), None),
);

Expand Down

0 comments on commit 8000d44

Please sign in to comment.