rust/tests/ui/parser/bare-struct-body.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
264 B
Rust
Raw Normal View History

struct Foo {
val: (),
}
fn foo() -> Foo { //~ ERROR struct literal body without path
val: (),
}
fn main() {
let x = foo();
x.val == 42; //~ ERROR mismatched types
let x = { //~ ERROR struct literal body without path
val: (),
};
}