summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs')
-rw-r--r--src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs
index 804ebf660..b873940c4 100644
--- a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs
+++ b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs
@@ -1,8 +1,5 @@
-// build-fail
// compile-flags: -Zunleash-the-miri-inside-of-you
-#![allow(const_err)]
-
fn double(x: usize) -> usize {
x * 2
}
@@ -10,6 +7,8 @@ const X: fn(usize) -> usize = double;
const fn bar(x: fn(usize) -> usize, y: usize) -> usize {
x(y)
+ //~^ ERROR evaluation of constant value failed
+ //~| ERROR evaluation of constant value failed
}
const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
@@ -17,7 +16,5 @@ const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
fn main() {
assert_eq!(Y, 4);
- //~^ ERROR evaluation of constant value failed
assert_eq!(Z, 4);
- //~^ ERROR evaluation of constant value failed
}