File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
fn main ( ) {
4
4
[ 1 ] [ 0u64 as usize ] ;
5
- [ 1 ] [ 1.5 as usize ] ; //~ ERROR index out of bounds
6
- [ 1 ] [ 1u64 as usize ] ; //~ ERROR index out of bounds
5
+ [ 1 ] [ 1.5 as usize ] ; //~ ERROR operation will panic
6
+ [ 1 ] [ 1u64 as usize ] ; //~ ERROR operation will panic
7
7
}
Original file line number Diff line number Diff line change 1
- error: index out of bounds: the len is 1 but the index is 1
1
+ error: this operation will panic at runtime
2
2
--> $DIR/issue-54348.rs:5:5
3
3
|
4
4
LL | [1][1.5 as usize];
5
- | ^^^^^^^^^^^^^^^^^
5
+ | ^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1
6
6
|
7
- = note: `#[deny(const_err )]` on by default
7
+ = note: `#[deny(panic )]` on by default
8
8
9
- error: index out of bounds: the len is 1 but the index is 1
9
+ error: this operation will panic at runtime
10
10
--> $DIR/issue-54348.rs:6:5
11
11
|
12
12
LL | [1][1u64 as usize];
13
- | ^^^^^^^^^^^^^^^^^^
13
+ | ^^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1
14
14
15
15
error: aborting due to 2 previous errors
16
16
You can’t perform that action at this time.
0 commit comments