Add regression test for #64792
This commit is contained in:
parent
2328a7ea40
commit
4eba21e4c7
5
src/test/ui/issues/issue-64792-bad-unicode-ctor.rs
Normal file
5
src/test/ui/issues/issue-64792-bad-unicode-ctor.rs
Normal file
@ -0,0 +1,5 @@
|
||||
struct X {}
|
||||
|
||||
const Y: X = X("ö"); //~ ERROR expected function, found struct `X`
|
||||
|
||||
fn main() {}
|
15
src/test/ui/issues/issue-64792-bad-unicode-ctor.stderr
Normal file
15
src/test/ui/issues/issue-64792-bad-unicode-ctor.stderr
Normal 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`.
|
Loading…
x
Reference in New Issue
Block a user