Skip to content

Commit 4eba21e

Browse files
committed
Add regression test for rust-lang#64792
1 parent 2328a7e commit 4eba21e

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
struct X {}
2+
3+
const Y: X = X("ö"); //~ ERROR expected function, found struct `X`
4+
5+
fn main() {}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error[E0423]: expected function, found struct `X`
2+
--> $DIR/issue-64792-bad-unicode-ctor.rs:3:14
3+
|
4+
LL | struct X {}
5+
| ----------- `X` defined here
6+
LL |
7+
LL | const Y: X = X("ö");
8+
| ^
9+
| |
10+
| did you mean `X { /* fields */ }`?
11+
| help: a constant with a similar name exists: `Y`
12+
13+
error: aborting due to previous error
14+
15+
For more information about this error, try `rustc --explain E0423`.

0 commit comments

Comments
 (0)