rust/tests/ui/typeck/issue-87181/tuple-field.rs

15 lines
222 B
Rust

struct Bar<T> {
bar: T
}
struct Foo(char, u16);
impl Foo {
fn foo() { }
}
fn main() {
let thing = Bar { bar: Foo };
thing.bar.0;
//~^ ERROR no field `0` on type `fn(char, u16) -> Foo {Foo}` [E0609]
}