forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#116393 - compiler-errors:auto-bad, r=WaffleLapkin Emit feature gate *warning* for `auto` traits pre-expansion Auto traits were introduced before we were more careful about not stabilizing new syntax pre-expansion. This is a more conservative step in the general direction we want to go in https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Removal.20of.20.60auto.20trait.60.20syntax. Fixes rust-lang#116121
- Loading branch information
Showing
5 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// check-pass | ||
|
||
#[cfg(FALSE)] | ||
auto trait Foo {} | ||
//~^ WARN `auto` traits are unstable | ||
//~| WARN unstable syntax can change at any point in the future, causing a hard error! | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
warning: `auto` traits are unstable | ||
--> $DIR/pre-cfg.rs:4:1 | ||
| | ||
LL | auto trait Foo {} | ||
| ^^^^ | ||
| | ||
= note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information | ||
= help: add `#![feature(auto_traits)]` to the crate attributes to enable | ||
= warning: unstable syntax can change at any point in the future, causing a hard error! | ||
= note: for more information, see issue #65860 <https://github.com/rust-lang/rust/issues/65860> | ||
|
||
warning: 1 warning emitted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters