Skip to content

Commit

Permalink
bless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 12, 2020
1 parent d6c988b commit 4b4d43f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
18 changes: 6 additions & 12 deletions src/test/ui/consts/const-err-multi.stderr
Expand Up @@ -13,28 +13,22 @@ LL | #![deny(const_err)]
| ^^^^^^^^^

error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:5:19
--> $DIR/const-err-multi.rs:5:1
|
LL | pub const B: i8 = A;
| ------------------^-
| |
| referenced constant has errors
| ^^^^^^^^^^^^^^^^^^^^ referenced constant has errors

error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:7:19
--> $DIR/const-err-multi.rs:7:1
|
LL | pub const C: u8 = A as u8;
| ------------------^^^^^^^-
| |
| referenced constant has errors
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors

error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:9:19
--> $DIR/const-err-multi.rs:9:1
|
LL | pub const D: i8 = 50 - A;
| ------------------^^^^^^-
| |
| referenced constant has errors
| ^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors

error: aborting due to 4 previous errors

4 changes: 2 additions & 2 deletions src/test/ui/consts/const-eval/erroneous-const.rs
Expand Up @@ -7,8 +7,8 @@ impl<T> PrintName<T> {
//~^ WARN this operation will panic at runtime
}

const fn no_codegen<T>() {
if false { //~ERROR evaluation of constant value failed
const fn no_codegen<T>() { //~ERROR evaluation of constant value failed
if false {
let _ = PrintName::<T>::VOID;
}
}
Expand Down
8 changes: 5 additions & 3 deletions src/test/ui/consts/const-eval/erroneous-const.stderr
Expand Up @@ -25,12 +25,14 @@ LL | #![warn(const_err, unconditional_panic)]
| ^^^^^^^^^

error[E0080]: evaluation of constant value failed
--> $DIR/erroneous-const.rs:11:5
--> $DIR/erroneous-const.rs:10:1
|
LL | / if false {
LL | / const fn no_codegen<T>() {
LL | | if false {
LL | | let _ = PrintName::<T>::VOID;
LL | | }
| |_____^ referenced constant has errors
LL | | }
| |_^ referenced constant has errors

error[E0080]: could not evaluate static initializer
--> $DIR/erroneous-const.rs:16:22
Expand Down

0 comments on commit 4b4d43f

Please sign in to comment.