From 94a0819fe3a0d679c3042a77bfe6a2afc505daea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:28 +0200 Subject: Adding upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/consts/const-eval/issue-43197.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/test/ui/consts/const-eval/issue-43197.rs') diff --git a/src/test/ui/consts/const-eval/issue-43197.rs b/src/test/ui/consts/const-eval/issue-43197.rs index e15f8771d..145463f0a 100644 --- a/src/test/ui/consts/const-eval/issue-43197.rs +++ b/src/test/ui/consts/const-eval/issue-43197.rs @@ -1,23 +1,11 @@ -// build-fail - -#![warn(const_err)] - const fn foo(x: u32) -> u32 { x } fn main() { const X: u32 = 0 - 1; - //~^ WARN any use of this value will cause - //~| WARN this was previously accepted by the compiler but is being phased out + //~^ ERROR constant const Y: u32 = foo(0 - 1); - //~^ WARN any use of this value will cause - //~| WARN this was previously accepted by the compiler but is being phased out + //~^ ERROR constant println!("{} {}", X, Y); - //~^ ERROR evaluation of constant value failed - //~| ERROR evaluation of constant value failed - //~| WARN erroneous constant used [const_err] - //~| WARN erroneous constant used [const_err] - //~| WARN this was previously accepted by the compiler but is being phased out - //~| WARN this was previously accepted by the compiler but is being phased out } -- cgit v1.2.3