about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-08-11 12:42:05 +0200
committerRalf Jung <post@ralfj.de>2020-08-12 10:48:08 +0200
commit4b4d43fe6ae09cf8eed81a82812cffcd8be6154d (patch)
treebdf3d08c9c553677d8d106e56395cb1c300d9e02 /src
parentd6c988b3a74ff769d742a1ee16442a56579cf53b (diff)
downloadrust-4b4d43fe6ae09cf8eed81a82812cffcd8be6154d.tar.gz
rust-4b4d43fe6ae09cf8eed81a82812cffcd8be6154d.zip
bless tests
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/consts/const-err-multi.stderr18
-rw-r--r--src/test/ui/consts/const-eval/erroneous-const.rs4
-rw-r--r--src/test/ui/consts/const-eval/erroneous-const.stderr8
3 files changed, 13 insertions, 17 deletions
diff --git a/src/test/ui/consts/const-err-multi.stderr b/src/test/ui/consts/const-err-multi.stderr
index 4ac4a8754d3..171221553e2 100644
--- a/src/test/ui/consts/const-err-multi.stderr
+++ b/src/test/ui/consts/const-err-multi.stderr
@@ -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
 
diff --git a/src/test/ui/consts/const-eval/erroneous-const.rs b/src/test/ui/consts/const-eval/erroneous-const.rs
index 93c4e9372e8..7ff015d3b8c 100644
--- a/src/test/ui/consts/const-eval/erroneous-const.rs
+++ b/src/test/ui/consts/const-eval/erroneous-const.rs
@@ -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;
     }
 }
diff --git a/src/test/ui/consts/const-eval/erroneous-const.stderr b/src/test/ui/consts/const-eval/erroneous-const.stderr
index da7e7247d50..5ba113fc6a9 100644
--- a/src/test/ui/consts/const-eval/erroneous-const.stderr
+++ b/src/test/ui/consts/const-eval/erroneous-const.stderr
@@ -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