about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorOliver Schneider <obk8176014uqher834@olio-obk.de>2018-04-28 13:35:35 +0200
committerOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>2018-04-30 18:29:15 +0200
commitf66367daccd2352d14730e472e8dfdef244aec63 (patch)
treec12368ed62bdd34264ddc30105d68731ce0705e3 /src/test
parent1f3cb926a24897d6524920bb38618b4b6ee17aa7 (diff)
Improve div by zero const eval errors
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/const-eval/index_out_of_bound.stderr2
-rw-r--r--src/test/ui/const-eval/promoted_errors.stderr6
-rw-r--r--src/test/ui/error-codes/E0080.rs1
-rw-r--r--src/test/ui/error-codes/E0080.stderr2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/test/ui/const-eval/index_out_of_bound.stderr b/src/test/ui/const-eval/index_out_of_bound.stderr
index 793e0a7ace8..d16231c72b9 100644
--- a/src/test/ui/const-eval/index_out_of_bound.stderr
+++ b/src/test/ui/const-eval/index_out_of_bound.stderr
@@ -2,7 +2,7 @@ error[E0080]: constant evaluation error
   --> $DIR/index_out_of_bound.rs:11:19
    |
 LL | static FOO: i32 = [][0];
-   |                   ^^^^^ index out of bounds: the len is 0 but the index is 0 at $DIR/index_out_of_bound.rs:11:19: 11:24
+   |                   ^^^^^ index out of bounds: the len is 0 but the index is 0
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/const-eval/promoted_errors.stderr b/src/test/ui/const-eval/promoted_errors.stderr
index 59dcc2bac42..7761f192fdb 100644
--- a/src/test/ui/const-eval/promoted_errors.stderr
+++ b/src/test/ui/const-eval/promoted_errors.stderr
@@ -28,7 +28,7 @@ warning: constant evaluation error
   --> $DIR/promoted_errors.rs:19:20
    |
 LL |     println!("{}", 1/(1-1));
-   |                    ^^^^^^^ attempt to divide with overflow
+   |                    ^^^^^^^ attempt to divide by zero
 
 warning: attempt to divide by zero
   --> $DIR/promoted_errors.rs:22:14
@@ -40,11 +40,11 @@ warning: constant evaluation error
   --> $DIR/promoted_errors.rs:22:14
    |
 LL |     let _x = 1/(1-1);
-   |              ^^^^^^^ attempt to divide with overflow
+   |              ^^^^^^^ attempt to divide by zero
 
 warning: constant evaluation error
   --> $DIR/promoted_errors.rs:25:20
    |
 LL |     println!("{}", 1/(false as u32));
-   |                    ^^^^^^^^^^^^^^^^ attempt to divide with overflow
+   |                    ^^^^^^^^^^^^^^^^ attempt to divide by zero
 
diff --git a/src/test/ui/error-codes/E0080.rs b/src/test/ui/error-codes/E0080.rs
index c8e42571128..7f3e6eaad9b 100644
--- a/src/test/ui/error-codes/E0080.rs
+++ b/src/test/ui/error-codes/E0080.rs
@@ -15,7 +15,6 @@ enum Enum {
     //~| const_err
     //~| const_err
     //~| const_err
-    //~| divide by zero
 }
 
 fn main() {
diff --git a/src/test/ui/error-codes/E0080.stderr b/src/test/ui/error-codes/E0080.stderr
index 56c23f080cc..5e401bd6c79 100644
--- a/src/test/ui/error-codes/E0080.stderr
+++ b/src/test/ui/error-codes/E0080.stderr
@@ -24,7 +24,7 @@ warning: constant evaluation error
   --> $DIR/E0080.rs:14:9
    |
 LL |     Y = (1 / 0) //~ ERROR E0080
-   |         ^^^^^^^ attempt to divide with overflow
+   |         ^^^^^^^ attempt to divide by zero
 
 error[E0080]: constant evaluation error
   --> $DIR/E0080.rs:14:9