File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 11const X : i32 = #[ allow ( dead_code) ] 8 ;
22//~^ ERROR attributes on expressions are experimental
33
4+ const Y : i32 =
5+ /// foo
6+ //~^ ERROR attributes on expressions are experimental
7+ 8 ;
8+
9+ const Z : i32 = {
10+ //! foo
11+ //~^ ERROR attributes on expressions are experimental
12+ 8
13+ } ;
14+
415fn main ( ) { }
Original file line number Diff line number Diff line change @@ -8,6 +8,28 @@ LL | const X: i32 = #[allow(dead_code)] 8;
88 = help: add `#![feature(stmt_expr_attributes)]` 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]: attributes on expressions are experimental
12+ --> $DIR/feature-gate-stmt_expr_attributes.rs:5:5
13+ |
14+ LL | /// foo
15+ | ^^^^^^^
16+ |
17+ = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
18+ = help: add `#![feature(stmt_expr_attributes)]` 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+ = help: `///` is for documentation comments. For a plain comment, use `//`.
21+
22+ error[E0658]: attributes on expressions are experimental
23+ --> $DIR/feature-gate-stmt_expr_attributes.rs:10:5
24+ |
25+ LL | //! foo
26+ | ^^^^^^^
27+ |
28+ = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
29+ = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
30+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
31+ = help: `///` is for documentation comments. For a plain comment, use `//`.
32+
33+ error: aborting due to 3 previous errors
1234
1335For more information about this error, try `rustc --explain E0658`.
You can’t perform that action at this time.
0 commit comments