Update a test's diagnostics

This commit is contained in:
Oliver Scherer 2018-11-22 15:44:25 +01:00
parent 4d2bed9460
commit dba5ba02f7
2 changed files with 6 additions and 39 deletions

View file

@ -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() {}

View file

@ -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`.