Switch existential_type to type_alias_impl_trait
This commit is contained in:
parent
435236b887
commit
87738fe834
7 changed files with 52 additions and 61 deletions
|
|
@ -1,17 +0,0 @@
|
|||
// Check that existential types must be ungated to use the `existential` keyword
|
||||
|
||||
existential type Foo: std::fmt::Debug; //~ ERROR existential types are unstable
|
||||
|
||||
trait Bar {
|
||||
type Baa: std::fmt::Debug;
|
||||
fn define() -> Self::Baa;
|
||||
}
|
||||
|
||||
impl Bar for () {
|
||||
existential type Baa: std::fmt::Debug; //~ ERROR existential types are unstable
|
||||
fn define() -> Self::Baa { 0 }
|
||||
}
|
||||
|
||||
fn define() -> Foo { 0 }
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
error[E0658]: existential types are unstable
|
||||
--> $DIR/feature-gate-existential-type.rs:3:1
|
||||
|
|
||||
LL | existential type Foo: std::fmt::Debug;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
|
||||
= help: add `#![feature(existential_type)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: existential types are unstable
|
||||
--> $DIR/feature-gate-existential-type.rs:11:5
|
||||
|
|
||||
LL | existential type Baa: std::fmt::Debug;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
|
||||
= help: add `#![feature(existential_type)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
type Foo = impl std::fmt::Debug; //~ ERROR existential types are unstable
|
||||
|
||||
trait Bar {
|
||||
type Baa: std::fmt::Debug;
|
||||
fn define() -> Self::Baa;
|
||||
}
|
||||
|
||||
impl Bar for () {
|
||||
type Baa = impl std::fmt::Debug; //~ ERROR existential types are unstable
|
||||
fn define() -> Self::Baa { 0 }
|
||||
}
|
||||
|
||||
fn define() -> Foo { 0 }
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
error[E0658]: existential types are unstable
|
||||
--> $DIR/feature-gate-type_alias_impl_trait.rs:1:1
|
||||
|
|
||||
LL | type Foo = impl std::fmt::Debug;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
|
||||
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: existential types are unstable
|
||||
--> $DIR/feature-gate-type_alias_impl_trait.rs:9:5
|
||||
|
|
||||
LL | type Baa = impl std::fmt::Debug;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
|
||||
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue