diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-03-06 12:43:02 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-03-08 08:35:39 +0100 |
| commit | b5ace9a906d0a445420a0ff16f77ce967722ddc6 (patch) | |
| tree | de379168cd41e525503f37c9196be4433057c9e2 /src/test/ui/error-codes | |
| parent | edc5f7343338ddbbc2bae94be585cd821dbe8118 (diff) | |
| download | rust-b5ace9a906d0a445420a0ff16f77ce967722ddc6.tar.gz rust-b5ace9a906d0a445420a0ff16f77ce967722ddc6.zip | |
Unify the const folding errors
before they differed depending on whether optimizations were on or not
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0080.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0080.stderr | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/test/ui/error-codes/E0080.rs b/src/test/ui/error-codes/E0080.rs index cca63f23b77..c8e42571128 100644 --- a/src/test/ui/error-codes/E0080.rs +++ b/src/test/ui/error-codes/E0080.rs @@ -10,7 +10,6 @@ enum Enum { X = (1 << 500), //~ ERROR E0080 - //~| ERROR bitshift exceeds //~| shift left with overflow Y = (1 / 0) //~ ERROR E0080 //~| const_err diff --git a/src/test/ui/error-codes/E0080.stderr b/src/test/ui/error-codes/E0080.stderr index 501051b9fe6..6db53acd6b9 100644 --- a/src/test/ui/error-codes/E0080.stderr +++ b/src/test/ui/error-codes/E0080.stderr @@ -1,4 +1,4 @@ -error: bitshift exceeds the type's number of bits +error: attempt to shift left with overflow --> $DIR/E0080.rs:12:9 | LL | X = (1 << 500), //~ ERROR E0080 @@ -12,22 +12,22 @@ error[E0080]: constant evaluation error LL | X = (1 << 500), //~ ERROR E0080 | ^^^^^^^^^^ attempt to shift left with overflow -warning: constant evaluation error - --> $DIR/E0080.rs:15:9 +warning: attempt to divide by zero + --> $DIR/E0080.rs:14:9 | LL | Y = (1 / 0) //~ ERROR E0080 - | ^^^^^^^ attempt to divide by zero + | ^^^^^^^ | = note: #[warn(const_err)] on by default warning: constant evaluation error - --> $DIR/E0080.rs:15:9 + --> $DIR/E0080.rs:14:9 | LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ attempted to do overflowing math error[E0080]: constant evaluation error - --> $DIR/E0080.rs:15:9 + --> $DIR/E0080.rs:14:9 | LL | Y = (1 / 0) //~ ERROR E0080 | ^^^^^^^ attempt to divide by zero |
