File tree 4 files changed +35
-0
lines changed
4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ [ 1 ] [ 0u64 as usize ] ;
3
+ [ 1 ] [ 1.5 as usize ] ; // ERROR index out of bounds
4
+ [ 1 ] [ 1u64 as usize ] ; // ERROR index out of bounds
5
+ }
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
2
+ --> $DIR/issue-54348.rs:3:5
3
+ |
4
+ LL | [1][1.5 as usize]; // ERROR index out of bounds
5
+ | ^^^^^^^^^^^^^^^^^
6
+ |
7
+ = note: #[deny(const_err)] on by default
8
+
9
+ error: index out of bounds: the len is 1 but the index is 1
10
+ --> $DIR/issue-54348.rs:4:5
11
+ |
12
+ LL | [1][1u64 as usize]; // ERROR index out of bounds
13
+ | ^^^^^^^^^^^^^^^^^^
14
+
15
+ error: aborting due to 2 previous errors
16
+
Original file line number Diff line number Diff line change
1
+ use std:: path:: Path ;
2
+
3
+ fn main ( ) {
4
+ let Path :: new( ) ; //~ ERROR expected tuple struct/variant
5
+ }
Original file line number Diff line number Diff line change
1
+ error[E0164]: expected tuple struct/variant, found method `<Path>::new`
2
+ --> $DIR/issue-55587.rs:4:9
3
+ |
4
+ LL | let Path::new(); //~ ERROR expected tuple struct/variant
5
+ | ^^^^^^^^^^^ not a tuple variant or struct
6
+
7
+ error: aborting due to previous error
8
+
9
+ For more information about this error, try `rustc --explain E0164`.
You can’t perform that action at this time.
0 commit comments