From 4fe4ff95f6c459d98c2449c9993e0f7e0b8c47d3 Mon Sep 17 00:00:00 2001 From: Smitty Date: Tue, 15 Jun 2021 19:16:10 -0400 Subject: Use better error message for hard errors in CTFE Currently the same message is used for hard errors and soft errors. This makes hard errors use a message that indicates the reality of the situation correctly, since usage of the constant is never allowed when there was a hard error evaluating it. --- src/test/ui/consts/control-flow/assert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/ui/consts/control-flow/assert.rs') diff --git a/src/test/ui/consts/control-flow/assert.rs b/src/test/ui/consts/control-flow/assert.rs index 90017fee193..b311cb140cc 100644 --- a/src/test/ui/consts/control-flow/assert.rs +++ b/src/test/ui/consts/control-flow/assert.rs @@ -9,6 +9,6 @@ const _: () = assert!(true); const _: () = assert!(false); //[stock]~^ ERROR panicking in constants is unstable -//[const_panic]~^^ ERROR any use of this value will cause an error +//[const_panic]~^^ ERROR evaluation of constant value failed fn main() {} -- cgit 1.4.1-3-g733a5