mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
54fc546f20
Based on earlier work by León Orell Valerian Liehr. Co-authored-by: León Orell Valerian Liehr <me@fmease.dev> Signed-off-by: Usman Akinyemi <uniqueusman@archlinux>
15 lines
722 B
Rust
15 lines
722 B
Rust
fn main() {
|
|
let _ = {foo: (), bar: {} }; //~ ERROR struct literal body without path
|
|
//~| NOTE struct name missing for struct literal
|
|
//~| HELP add the correct type
|
|
let _ = _ {foo: (), bar: {} }; //~ ERROR placeholder `_` is not allowed for the path in struct literals
|
|
//~| NOTE not allowed in struct literals
|
|
//~| HELP replace it with the correct type
|
|
let _ = {foo: ()}; //~ ERROR struct literal body without path
|
|
//~| NOTE struct name missing for struct literal
|
|
//~| HELP add the correct type
|
|
let _ = _ {foo: ()}; //~ ERROR placeholder `_` is not allowed for the path in struct literals
|
|
//~| NOTE not allowed in struct literals
|
|
//~| HELP replace it with the correct type
|
|
}
|