diff options
| author | bors <bors@rust-lang.org> | 2019-08-03 02:21:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-03 02:21:23 +0000 |
| commit | d7270712cb446aad0817040bbca73a8d024f67b0 (patch) | |
| tree | 22cf18615b2177381934d771fc3710e6fd04c257 /src/libsyntax_pos | |
| parent | d9bd4b289f07956819c59704d88d9eed61af3a6d (diff) | |
| parent | fbd7e0cf0e31ab612343311a61fe4f58a76a1698 (diff) | |
| download | rust-d7270712cb446aad0817040bbca73a8d024f67b0.tar.gz rust-d7270712cb446aad0817040bbca73a8d024f67b0.zip | |
Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centril
Change opaque type syntax from `existential type` to type alias `impl Trait` This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature. The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC. This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063. r? @Centril
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/hygiene.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax_pos/symbol.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index f83979b9e9b..f91a2291544 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -744,9 +744,9 @@ pub enum DesugaringKind { QuestionMark, TryBlock, /// Desugaring of an `impl Trait` in return type position - /// to an `existential type Foo: Trait;` and replacing the + /// to an `type Foo = impl Trait;` and replacing the /// `impl Trait` with `Foo`. - ExistentialType, + OpaqueTy, Async, Await, ForLoop, @@ -761,7 +761,7 @@ impl DesugaringKind { DesugaringKind::Await => "`await` expression", DesugaringKind::QuestionMark => "operator `?`", DesugaringKind::TryBlock => "`try` block", - DesugaringKind::ExistentialType => "`existential type`", + DesugaringKind::OpaqueTy => "`impl Trait`", DesugaringKind::ForLoop => "`for` loop", } } diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index 476368e8351..12c4ba059fe 100644 --- a/src/libsyntax_pos/symbol.rs +++ b/src/libsyntax_pos/symbol.rs @@ -98,7 +98,6 @@ symbols! { Auto: "auto", Catch: "catch", Default: "default", - Existential: "existential", Union: "union", } @@ -680,6 +679,7 @@ symbols! { tuple_indexing, Ty, ty, + type_alias_impl_trait, TyCtxt, TyKind, type_alias_enum_variants, |
