From e58e144e6634e3cbdfd6d415eb0ea24bc2a2bb87 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 24 Sep 2019 14:01:31 +0200 Subject: Update ui tests --- src/test/ui/methods/method-path-in-pattern.rs | 6 ++++++ src/test/ui/methods/method-path-in-pattern.stderr | 21 ++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'src/test/ui/methods') 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() { ::trait_bar => {} //~^ ERROR expected unit struct/variant or constant, found method `::trait_bar` } + if let Foo::bar = 0u32 {} + //~^ ERROR expected unit struct/variant or constant, found method `::bar` + if let ::bar = 0u32 {} + //~^ ERROR expected unit struct/variant or constant, found method `::bar` + if let Foo::trait_bar = 0u32 {} + //~^ ERROR expected unit struct/variant or constant, found method `::trait_bar` } diff --git a/src/test/ui/methods/method-path-in-pattern.stderr b/src/test/ui/methods/method-path-in-pattern.stderr index 3f53ad76882..257fff4c37d 100644 --- a/src/test/ui/methods/method-path-in-pattern.stderr +++ b/src/test/ui/methods/method-path-in-pattern.stderr @@ -16,5 +16,24 @@ error[E0533]: expected unit struct/variant or constant, found method `::tra LL | ::trait_bar => {} | ^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors +error[E0533]: expected unit struct/variant or constant, found method `::bar` + --> $DIR/method-path-in-pattern.rs:26:12 + | +LL | if let Foo::bar = 0u32 {} + | ^^^^^^^^ + +error[E0533]: expected unit struct/variant or constant, found method `::bar` + --> $DIR/method-path-in-pattern.rs:28:12 + | +LL | if let ::bar = 0u32 {} + | ^^^^^^^^^^ + +error[E0533]: expected unit struct/variant or constant, found method `::trait_bar` + --> $DIR/method-path-in-pattern.rs:30:12 + | +LL | if let Foo::trait_bar = 0u32 {} + | ^^^^^^^^^^^^^^ + +error: aborting due to 6 previous errors +For more information about this error, try `rustc --explain E0533`. -- cgit 1.4.1-3-g733a5