diff options
| author | Ralf Jung <post@ralfj.de> | 2020-02-15 13:15:15 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-02-15 13:15:15 +0100 |
| commit | 25870a0b77e8d0e37aecce17f1b37fc5bf630b56 (patch) | |
| tree | 963a9db607b2339df0fd89be29056df34078ba95 | |
| parent | 415218fc8d590063a8c5cd403ff890fb91c0bd2c (diff) | |
| download | rust-25870a0b77e8d0e37aecce17f1b37fc5bf630b56.tar.gz rust-25870a0b77e8d0e37aecce17f1b37fc5bf630b56.zip | |
fix another test
| -rw-r--r-- | src/test/ui/issues/issue-54348.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-54348.stderr | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/test/ui/issues/issue-54348.rs b/src/test/ui/issues/issue-54348.rs index fd9a9e024aa..5c38d7c42f6 100644 --- a/src/test/ui/issues/issue-54348.rs +++ b/src/test/ui/issues/issue-54348.rs @@ -2,6 +2,6 @@ fn main() { [1][0u64 as usize]; - [1][1.5 as usize]; //~ ERROR index out of bounds - [1][1u64 as usize]; //~ ERROR index out of bounds + [1][1.5 as usize]; //~ ERROR operation will panic + [1][1u64 as usize]; //~ ERROR operation will panic } diff --git a/src/test/ui/issues/issue-54348.stderr b/src/test/ui/issues/issue-54348.stderr index 7619cd7437e..f2156a35f2a 100644 --- a/src/test/ui/issues/issue-54348.stderr +++ b/src/test/ui/issues/issue-54348.stderr @@ -1,16 +1,16 @@ -error: index out of bounds: the len is 1 but the index is 1 +error: this operation will panic at runtime --> $DIR/issue-54348.rs:5:5 | LL | [1][1.5 as usize]; - | ^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1 | - = note: `#[deny(const_err)]` on by default + = note: `#[deny(panic)]` on by default -error: index out of bounds: the len is 1 but the index is 1 +error: this operation will panic at runtime --> $DIR/issue-54348.rs:6:5 | LL | [1][1u64 as usize]; - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1 error: aborting due to 2 previous errors |
