File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,10 @@ fn main() {
22 super let a = 1 ;
33 //~^ ERROR `super let` is experimental
44}
5+
6+ // Check that it also isn't accepted in cfg'd out code.
7+ #[ cfg( any( ) ) ]
8+ fn a ( ) {
9+ super let a = 1 ;
10+ //~^ ERROR `super let` is experimental
11+ }
Original file line number Diff line number Diff line change @@ -8,6 +8,16 @@ LL | super let a = 1;
88 = help: add `#![feature(super_let)]` to the crate attributes to enable
99 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010
11- error: aborting due to 1 previous error
11+ error[E0658]: `super let` is experimental
12+ --> $DIR/feature-gate-super-let.rs:9:5
13+ |
14+ LL | super let a = 1;
15+ | ^^^^^
16+ |
17+ = note: see issue #139076 <https://github.com/rust-lang/rust/issues/139076> for more information
18+ = help: add `#![feature(super_let)]` to the crate attributes to enable
19+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
20+
21+ error: aborting due to 2 previous errors
1222
1323For more information about this error, try `rustc --explain E0658`.
You can’t perform that action at this time.
0 commit comments