diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-23173.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-23173.rs b/src/test/ui/issues/issue-23173.rs new file mode 100644 index 000000000..92f4c5464 --- /dev/null +++ b/src/test/ui/issues/issue-23173.rs @@ -0,0 +1,13 @@ +enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } +struct Struct { + a: usize, +} + +fn use_token(token: &Token) { unimplemented!() } + +fn main() { + use_token(&Token::Homura); //~ ERROR no variant or associated item named `Homura` + Struct::method(); //~ ERROR no function or associated item named `method` found + Struct::method; //~ ERROR no function or associated item named `method` found + Struct::Assoc; //~ ERROR no associated item named `Assoc` found +} |