pre-expansion gate trait_alias.

This commit is contained in:
Mazdak Farrokhzad 2019-09-21 17:40:50 +02:00
parent 2e64bb2d37
commit 2d182b82ce
5 changed files with 24 additions and 10 deletions

View file

@ -1,4 +1,13 @@
trait Foo = Default;
//~^ ERROR trait aliases are experimental
macro_rules! accept_item {
($i:item) => {}
}
accept_item! {
trait Foo = Ord + Eq;
//~^ ERROR trait aliases are experimental
}
fn main() {}

View file

@ -7,6 +7,15 @@ LL | trait Foo = Default;
= note: for more information, see https://github.com/rust-lang/rust/issues/41517
= help: add `#![feature(trait_alias)]` to the crate attributes to enable
error: aborting due to previous error
error[E0658]: trait aliases are experimental
--> $DIR/feature-gate-trait-alias.rs:9:5
|
LL | trait Foo = Ord + Eq;
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/41517
= help: add `#![feature(trait_alias)]` to the crate attributes to enable
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.