Skip to content

Commit

Permalink
Add regression test for #64792
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Oct 7, 2019
1 parent 2328a7e commit 4eba21e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/ui/issues/issue-64792-bad-unicode-ctor.rs
@@ -0,0 +1,5 @@
struct X {}

const Y: X = X("ö"); //~ ERROR expected function, found struct `X`

fn main() {}
15 changes: 15 additions & 0 deletions src/test/ui/issues/issue-64792-bad-unicode-ctor.stderr
@@ -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`.

0 comments on commit 4eba21e

Please sign in to comment.