Add a test with a leading newline for ICE #90878
This commit is contained in:
parent
495d8ed246
commit
96c37c8a6a
2 changed files with 17 additions and 0 deletions
6
src/test/ui/consts/issue-90878-3.rs
Normal file
6
src/test/ui/consts/issue-90878-3.rs
Normal file
|
|
@ -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
|
||||
11
src/test/ui/consts/issue-90878-3.stderr
Normal file
11
src/test/ui/consts/issue-90878-3.stderr
Normal file
|
|
@ -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`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue