about summary refs log tree commit diff
path: root/src/test/ui/const-eval
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/ui/const-eval
parent1f3cb926a24897d6524920bb38618b4b6ee17aa7 (diff)
Improve div by zero const eval errors
Diffstat (limited to 'src/test/ui/const-eval')
-rw-r--r--src/test/ui/const-eval/index_out_of_bound.stderr2
-rw-r--r--src/test/ui/const-eval/promoted_errors.stderr6
2 files changed, 4 insertions, 4 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