Revert "pre-expansion gate trait_alias."
This reverts commit 2d182b82ce
.
This commit is contained in:
parent
56d7bb2133
commit
803616a73d
3 changed files with 10 additions and 19 deletions
|
@ -446,6 +446,15 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
|
|||
"auto traits are experimental and possibly buggy");
|
||||
}
|
||||
|
||||
ast::ItemKind::TraitAlias(..) => {
|
||||
gate_feature_post!(
|
||||
&self,
|
||||
trait_alias,
|
||||
i.span,
|
||||
"trait aliases are experimental"
|
||||
);
|
||||
}
|
||||
|
||||
ast::ItemKind::MacroDef(ast::MacroDef { legacy: false, .. }) => {
|
||||
let msg = "`macro` is experimental";
|
||||
gate_feature_post!(&self, decl_macro, i.span, msg);
|
||||
|
|
|
@ -1,13 +1,4 @@
|
|||
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() {}
|
||||
|
|
|
@ -7,15 +7,6 @@ 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[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
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue