forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test with a leading newline for ICE rust-lang#90878
- Loading branch information
Showing
2 changed files
with
17 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,6 @@ | ||
|
||
fn main() { | ||
|x: usize| [0; x]; //~ ERROR attempt to use a non-constant value in a constant [E0435] | ||
// (note the newline before "fn") | ||
} | ||
// ignore-tidy-leading-newlines |
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,11 @@ | ||
error[E0435]: attempt to use a non-constant value in a constant | ||
--> $DIR/issue-90878-3.rs:3:20 | ||
| | ||
LL | |x: usize| [0; x]; | ||
| - ^ | ||
| | | ||
| this would need to be a `const` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0435`. |