Add regression test for #64792

This commit is contained in:
varkor 2019-10-07 22:06:14 +01:00
parent 2328a7ea40
commit 4eba21e4c7
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,5 @@
struct X {}
const Y: X = X("ö"); //~ ERROR expected function, found struct `X`
fn main() {}

View File

@ -0,0 +1,15 @@
error[E0423]: expected function, found struct `X`
--> $DIR/issue-64792-bad-unicode-ctor.rs:3:14
|
LL | struct X {}
| ----------- `X` defined here
LL |
LL | const Y: X = X("ö");
| ^
| |
| did you mean `X { /* fields */ }`?
| help: a constant with a similar name exists: `Y`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0423`.