File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,10 @@ fn main() {
2
2
super let a = 1 ;
3
3
//~^ ERROR `super let` is experimental
4
4
}
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;
8
8
= help: add `#![feature(super_let)]` to the crate attributes to enable
9
9
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10
10
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
12
22
13
23
For more information about this error, try `rustc --explain E0658`.
You can’t perform that action at this time.
0 commit comments