diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-06-25 20:53:02 +0200 |
|---|---|---|
| committer | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-06-28 11:04:25 +0200 |
| commit | 4bb9648b27e2c9f9efdb9e29a0d90b229aaff562 (patch) | |
| tree | 396538df8e178c1d5ddc1359a399651fc1373c89 /src/test/compile-fail | |
| parent | 221a499bf111c02f0d2cffa3ffa520d842d1877d (diff) | |
| download | rust-4bb9648b27e2c9f9efdb9e29a0d90b229aaff562.tar.gz rust-4bb9648b27e2c9f9efdb9e29a0d90b229aaff562.zip | |
Merge `ConstVal` and `ConstValue`
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/const-err-multi.rs | 9 | ||||
| -rw-r--r-- | src/test/compile-fail/const-err.rs | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/test/compile-fail/const-err-multi.rs b/src/test/compile-fail/const-err-multi.rs index 4a5e78b381e..9405b4134bc 100644 --- a/src/test/compile-fail/const-err-multi.rs +++ b/src/test/compile-fail/const-err-multi.rs @@ -11,19 +11,24 @@ #![deny(const_err)] pub const A: i8 = -std::i8::MIN; -//~^ ERROR E0080 -//~| ERROR attempt to negate with overflow +//~^ ERROR attempt to negate with overflow //~| ERROR this expression will panic at runtime //~| ERROR this constant cannot be used pub const B: i8 = A; //~^ ERROR const_err //~| ERROR const_err +//~| ERROR const_err +//~| ERROR const_err pub const C: u8 = A as u8; //~^ ERROR const_err //~| ERROR const_err +//~| ERROR const_err +//~| ERROR const_err pub const D: i8 = 50 - A; //~^ ERROR const_err //~| ERROR const_err +//~| ERROR const_err +//~| ERROR const_err fn main() { let _ = (A, B, C, D); diff --git a/src/test/compile-fail/const-err.rs b/src/test/compile-fail/const-err.rs index f77603b3eba..f6a64bcba21 100644 --- a/src/test/compile-fail/const-err.rs +++ b/src/test/compile-fail/const-err.rs @@ -23,7 +23,6 @@ fn black_box<T>(_: T) { // Make sure that the two uses get two errors. const FOO: u8 = [5u8][1]; //~^ ERROR constant evaluation error -//~| ERROR constant evaluation error //~| index out of bounds: the len is 1 but the index is 1 fn main() { |
