diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/typeck/issue-87181/enum-variant.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/typeck/issue-87181/enum-variant.rs b/tests/ui/typeck/issue-87181/enum-variant.rs new file mode 100644 index 000000000..ed01656ce --- /dev/null +++ b/tests/ui/typeck/issue-87181/enum-variant.rs @@ -0,0 +1,16 @@ +struct Bar<T> { + bar: T +} + +enum Foo{ + Tup() +} +impl Foo { + fn foo(&self) { } +} + +fn main() { + let thing = Bar { bar: Foo::Tup }; + thing.bar.foo(); + //~^ ERROR no method named `foo` found for enum constructor `fn() -> Foo {Foo::Tup}` in the current scope [E0599] +} |