From 25870a0b77e8d0e37aecce17f1b37fc5bf630b56 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 15 Feb 2020 13:15:15 +0100 Subject: [PATCH] fix another test --- src/test/ui/issues/issue-54348.rs | 4 ++-- 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 -- 2.44.0