diff options
Diffstat (limited to 'src/test/ui/methods/method-path-in-pattern.rs')
| -rw-r--r-- | src/test/ui/methods/method-path-in-pattern.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/methods/method-path-in-pattern.rs b/src/test/ui/methods/method-path-in-pattern.rs index fb1cf7f71e7..21a91f3f32b 100644 --- a/src/test/ui/methods/method-path-in-pattern.rs +++ b/src/test/ui/methods/method-path-in-pattern.rs @@ -23,4 +23,10 @@ fn main() { <Foo>::trait_bar => {} //~^ ERROR expected unit struct/variant or constant, found method `<Foo>::trait_bar` } + if let Foo::bar = 0u32 {} + //~^ ERROR expected unit struct/variant or constant, found method `<Foo>::bar` + if let <Foo>::bar = 0u32 {} + //~^ ERROR expected unit struct/variant or constant, found method `<Foo>::bar` + if let Foo::trait_bar = 0u32 {} + //~^ ERROR expected unit struct/variant or constant, found method `<Foo>::trait_bar` } |
