diff options
| author | bors <bors@rust-lang.org> | 2018-09-25 20:02:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-25 20:02:14 +0000 |
| commit | 4141a4079e3e6b2c4ac104fed042a9b7241467eb (patch) | |
| tree | fac6b20ad1dc438736aa960ea174dbaa3883d075 /src/libsyntax | |
| parent | 31789a658bb6b6c78da1f2b99a5f169e4e8b983b (diff) | |
| parent | 16cf404f9853e716a216be32d05f5215ff821c00 (diff) | |
| download | rust-4141a4079e3e6b2c4ac104fed042a9b7241467eb.tar.gz rust-4141a4079e3e6b2c4ac104fed042a9b7241467eb.zip | |
Auto merge of #53542 - alexreg:impl-trait-in-bindings, r=cramertj
`impl trait` in bindings (feature: impl-trait-existential-types) This PR enables `impl Trait` syntax (opaque types) to be used in bindings, e.g. * `let foo: impl Clone = 1;` * `static foo: impl Clone = 2;` * `const foo: impl Clone = 3;` This is part of [RFC 2071](https://github.com/rust-lang/rfcs/blob/master/text/2071-impl-trait-existential-types.md) ([tracking issue](https://github.com/rust-lang/rust/issues/34511)), but exists behind the separate feature gate `impl_trait_in_bindings`. CC @cramertj @oli-obk @eddyb @Centril @varkor
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 43cb811ed0b..2faa38fd9f8 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -497,7 +497,7 @@ declare_features! ( // Allows `Self` in type definitions (active, self_in_typedefs, "1.30.0", Some(49303), None), - // unsized rvalues at arguments and parameters + // Allows unsized rvalues at arguments and parameters (active, unsized_locals, "1.30.0", Some(48055), None), // #![test_runner] @@ -508,13 +508,16 @@ declare_features! ( (active, custom_inner_attributes, "1.30.0", Some(38356), None), // Self struct constructor (RFC 2302) - (active, self_struct_ctor, "1.31.0", Some(51994), None), + (active, self_struct_ctor, "1.30.0", Some(51994), None), // allow mixing of bind-by-move in patterns and references to // those identifiers in guards, *if* we are using MIR-borrowck // (aka NLL). Essentially this means you need to be on // edition:2018 or later. (active, bind_by_move_pattern_guards, "1.30.0", Some(15287), None), + + // Allows `impl Trait` in bindings (`let`, `const`, `static`) + (active, impl_trait_in_bindings, "1.30.0", Some(34511), None), ); declare_features! ( |
