forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#55956 - euclio:issue-55587, r=estebank
add tests for some fixed ICEs Fixes rust-lang#55587. Fixes rust-lang#54348. Looks like these ICEs are already fixed in nightly, so this PR just adds tests. r? @estebank
- Loading branch information
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
error: index out of bounds: the len is 1 but the index is 1 | ||
--> $DIR/issue-54348.rs:3:5 | ||
| | ||
LL | [1][1.5 as usize]; // ERROR index out of bounds | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: #[deny(const_err)] on by default | ||
|
||
error: index out of bounds: the len is 1 but the index is 1 | ||
--> $DIR/issue-54348.rs:4:5 | ||
| | ||
LL | [1][1u64 as usize]; // ERROR index out of bounds | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
use std::path::Path; | ||
|
||
fn main() { | ||
let Path::new(); //~ ERROR expected tuple struct/variant | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0164]: expected tuple struct/variant, found method `<Path>::new` | ||
--> $DIR/issue-55587.rs:4:9 | ||
| | ||
LL | let Path::new(); //~ ERROR expected tuple struct/variant | ||
| ^^^^^^^^^^^ not a tuple variant or struct | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0164`. |