Skip to content

Commit 96c37c8

Browse files
committed
Add a test with a leading newline for ICE #90878
1 parent 495d8ed commit 96c37c8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/test/ui/consts/issue-90878-3.rs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
fn main() {
3+
|x: usize| [0; x]; //~ ERROR attempt to use a non-constant value in a constant [E0435]
4+
// (note the newline before "fn")
5+
}
6+
// ignore-tidy-leading-newlines
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0435]: attempt to use a non-constant value in a constant
2+
--> $DIR/issue-90878-3.rs:3:20
3+
|
4+
LL | |x: usize| [0; x];
5+
| - ^
6+
| |
7+
| this would need to be a `const`
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0435`.

0 commit comments

Comments
 (0)