error: struct literal body without path --> tests/ui/compile-fail/init/wrong_generics2.rs:7:13 | 7 | let _ = init!(Foo::<(), ()> { | _____________^ 8 | | value <- (), 9 | | }); | |______^ | = note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `init` (in Nightly builds, run with -Z macro-backtrace for more info) help: you might have forgotten to add the struct literal inside the block --> src/macros.rs | ~ ::core::ptr::write($slot, $t { SomeStruct { |4 $($acc)* ~ } }); | error: expected one of `)`, `,`, `.`, `?`, or an operator, found `{` --> tests/ui/compile-fail/init/wrong_generics2.rs:7:13 | 7 | let _ = init!(Foo::<(), ()> { | _____________^ 8 | | value <- (), 9 | | }); | | ^ | | | | |______expected one of `)`, `,`, `.`, `?`, or an operator | help: missing `,` | = note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `init` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0423]: expected value, found struct `Foo` --> tests/ui/compile-fail/init/wrong_generics2.rs:7:13 | 3 | / struct Foo { 4 | | value: T, 5 | | } | |_- `Foo` defined here 6 | fn main() { 7 | let _ = init!(Foo::<(), ()> { | _____________^ 8 | | value <- (), 9 | | }); | |______^ help: use struct literal syntax instead: `Foo { value: val }` | = note: this error originates in the macro `$crate::try_init` which comes from the expansion of the macro `init` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> tests/ui/compile-fail/init/wrong_generics2.rs:7:19 | 7 | let _ = init!(Foo::<(), ()> { | ^^^ ---- help: remove the unnecessary generic argument | | | expected 1 generic argument | note: struct defined here, with 1 generic parameter: `T` --> tests/ui/compile-fail/init/wrong_generics2.rs:3:8 | 3 | struct Foo { | ^^^ - error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> tests/ui/compile-fail/init/wrong_generics2.rs:7:13 | 7 | let _ = init!(Foo::<(), ()> { | _____________^ 8 | | value <- (), 9 | | }); | |______^ unexpected argument #3 | note: function defined here --> $RUST/core/src/ptr/mod.rs | | pub const unsafe fn write(dst: *mut T, src: T) { | ^^^^^ = note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `init` (in Nightly builds, run with -Z macro-backtrace for more info)