error[E0277]: the trait bound `VecArgs<()>: MissingArgsDirective` is not satisfied --> tests/ui/args_vec_mistakes.rs:7:20 | 7 | struct MissingArgs(Vec); | ^^^^^^^ the trait `Default` is not implemented for `VecArgs<()>`, which is required by `VecArgs<()>: MissingArgsDirective` | = note: required for `VecArgs<()>` to implement `MissingArgsDirective` note: required by a bound in `Required::args` --> src/private.rs | | pub trait Required: MissingArgsDirective { | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `Required::args` | fn args() -> Self; | ---- required by a bound in this associated function error[E0308]: mismatched types --> tests/ui/args_vec_mistakes.rs:10:23 | 10 | struct WrongType(#[br(args((),))] Vec); | ^^^^ ------- expected due to this | | | expected `VecArgs<()>`, found `((),)` | = note: expected struct `VecArgs<()>` found tuple `((),)` error[E0599]: the method `finalize` exists for struct `VecArgsBuilder<(), Needed, Satisfied>`, but its trait bounds were not satisfied --> tests/ui/args_vec_mistakes.rs:13:26 | 13 | struct MissingCount(#[br(args { inner: () })] Vec); | ^^^^ method cannot be called on `VecArgsBuilder<(), Needed, Satisfied>` due to unsatisfied trait bounds | ::: src/named_args.rs | | pub struct Needed; | ----------------- doesn't satisfy `Needed: SatisfiedOrOptional` | = note: the following trait bounds were not satisfied: `Needed: SatisfiedOrOptional` = note: this error originates in the macro `binrw::args` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `usize: TryFrom>` is not satisfied --> tests/ui/args_vec_mistakes.rs:22:36 | 22 | struct WrongCountType(#[br(count = Some(1))] Vec); | ^^^^^^^ the trait `From>` is not implemented for `usize`, which is required by `usize: TryFrom>` | = help: the following other types implement trait `From`: `usize` implements `From` `usize` implements `From` `usize` implements `From` `usize` implements `From` = note: required for `Option<{integer}>` to implement `Into` = note: required for `usize` to implement `TryFrom>` error[E0599]: the method `finalize` exists for struct `VecArgsBuilder<(NoDefault,), Satisfied, Needed>`, but its trait bounds were not satisfied --> tests/ui/args_vec_mistakes.rs:25:42 | 4 | struct NoDefault; | ---------------- doesn't satisfy `NoDefault: Default` ... 25 | struct MissingInnerArgs(#[br(count = 1)] Vec); | ^^^^^^^^^^ method cannot be called on `VecArgsBuilder<(NoDefault,), Satisfied, Needed>` due to unsatisfied trait bounds | ::: src/named_args.rs | | pub struct Needed; | ----------------- doesn't satisfy `Needed: SatisfiedOrOptional` | = note: the following trait bounds were not satisfied: `NoDefault: Default` which is required by `(NoDefault,): Default` `Needed: SatisfiedOrOptional` = note: this error originates in the macro `binrw::args` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `NoDefault` with `#[derive(Default)]` | 4 + #[derive(Default)] 5 | struct NoDefault; | error[E0277]: the trait bound `VecArgs<()>: Required` is not satisfied --> tests/ui/args_vec_mistakes.rs:28:5 | 28 | Vec::::read(&mut binrw::io::Cursor::new(b"")).unwrap(); | ^^^^^^^^^ the trait `Default` is not implemented for `VecArgs<()>`, which is required by `VecArgs<()>: Required` | = note: required for `VecArgs<()>` to implement `Required` note: required by a bound in `binrw::BinRead::read` --> src/binread/mod.rs | | fn read(reader: &mut R) -> BinResult | ---- required by a bound in this associated function ... | for<'a> Self::Args<'a>: Required, | ^^^^^^^^ required by this bound in `BinRead::read`