]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/consts/const-eval/conditional_array_execution.stderr
Show the values and computation that would overflow a const evaluation or propagation
[rust.git] / src / test / ui / consts / const-eval / conditional_array_execution.stderr
index c72a1ed40c5d4e3c289480e3b3e5f5548e1054a7..62f339809e431c0d3eccb9d986dcc207771094c6 100644 (file)
@@ -4,7 +4,7 @@ warning: any use of this value will cause an error
 LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
    | ------------------^^^^^---------------------------
    |                   |
-   |                   attempt to subtract with overflow
+   |                   attempt to compute `5_u32 - 6_u32` which would overflow
    |
 note: the lint level is defined here
   --> $DIR/conditional_array_execution.rs:3:9
@@ -24,6 +24,6 @@ warning: erroneous constant used
 LL |     println!("{}", FOO);
    |                    ^^^ referenced constant has errors
 
-error: aborting due to previous error
+error: aborting due to previous error; 2 warnings emitted
 
 For more information about this error, try `rustc --explain E0080`.