mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 13:40:15 +03:00
Update a test's diagnostics
This commit is contained in:
@@ -8,15 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(const_fn)]
|
||||
|
||||
const fn x() {
|
||||
let t = true;
|
||||
//~^ ERROR let bindings in constant functions are unstable
|
||||
//~| ERROR statements in constant functions are unstable
|
||||
let x = || t;
|
||||
//~^ ERROR let bindings in constant functions are unstable
|
||||
//~| ERROR statements in constant functions are unstable
|
||||
let x = || t; //~ ERROR function pointers in const fn are unstable
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -1,35 +1,8 @@
|
||||
error[E0658]: let bindings in constant functions are unstable (see issue #48821)
|
||||
--> $DIR/issue-37550.rs:14:13
|
||||
error: function pointers in const fn are unstable
|
||||
--> $DIR/issue-37550.rs:13:9
|
||||
|
|
||||
LL | let t = true;
|
||||
| ^^^^
|
||||
|
|
||||
= help: add #![feature(const_let)] to the crate attributes to enable
|
||||
LL | let x = || t; //~ ERROR function pointers in const fn are unstable
|
||||
| ^
|
||||
|
||||
error[E0658]: statements in constant functions are unstable (see issue #48821)
|
||||
--> $DIR/issue-37550.rs:14:13
|
||||
|
|
||||
LL | let t = true;
|
||||
| ^^^^
|
||||
|
|
||||
= help: add #![feature(const_let)] to the crate attributes to enable
|
||||
error: aborting due to previous error
|
||||
|
||||
error[E0658]: let bindings in constant functions are unstable (see issue #48821)
|
||||
--> $DIR/issue-37550.rs:17:13
|
||||
|
|
||||
LL | let x = || t;
|
||||
| ^^^^
|
||||
|
|
||||
= help: add #![feature(const_let)] to the crate attributes to enable
|
||||
|
||||
error[E0658]: statements in constant functions are unstable (see issue #48821)
|
||||
--> $DIR/issue-37550.rs:17:13
|
||||
|
|
||||
LL | let x = || t;
|
||||
| ^^^^
|
||||
|
|
||||
= help: add #![feature(const_let)] to the crate attributes to enable
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
||||
Reference in New Issue
Block a user