]> git.proxmox.com Git - rustc.git/blob - src/test/ui/typeck/issue-87181/enum-variant.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / typeck / issue-87181 / enum-variant.rs
1 struct Bar<T> {
2 bar: T
3 }
4
5 enum Foo{
6 Tup()
7 }
8 impl Foo {
9 fn foo() { }
10 }
11
12 fn main() {
13 let thing = Bar { bar: Foo::Tup };
14 thing.bar.foo();
15 //~^ ERROR no method named `foo` found for fn item `fn() -> Foo {Foo::Tup}` in the current scope [E0599]
16 }