File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 22
33fn main ( ) {
44 [ 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
77}
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
22 --> $DIR/issue-54348.rs:5:5
33 |
44LL | [1][1.5 as usize];
5- | ^^^^^^^^^^^^^^^^^
5+ | ^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1
66 |
7- = note: `#[deny(const_err )]` on by default
7+ = note: `#[deny(panic )]` on by default
88
9- error: index out of bounds: the len is 1 but the index is 1
9+ error: this operation will panic at runtime
1010 --> $DIR/issue-54348.rs:6:5
1111 |
1212LL | [1][1u64 as usize];
13- | ^^^^^^^^^^^^^^^^^^
13+ | ^^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1
1414
1515error: aborting due to 2 previous errors
1616
You can’t perform that action at this time.
0 commit comments