1 error[E0599]: the method `test` exists for struct `Foo<Enum, CloneEnum>`, but its trait bounds were not satisfied
2 --> $DIR/derive-trait-for-method-call.rs:28:15
7 | doesn't satisfy `Enum: Clone`
8 | doesn't satisfy `Enum: Default`
11 | -------------- doesn't satisfy `CloneEnum: Default`
13 LL | struct Foo<X, Y> (X, Y);
14 | ---------------- method `test` not found for this struct
16 LL | let y = x.test();
17 | ^^^^ method cannot be called on `Foo<Enum, CloneEnum>` due to unsatisfied trait bounds
19 = note: the following trait bounds were not satisfied:
23 note: the trait `Default` must be implemented
24 --> $SRC_DIR/core/src/default.rs:LL:COL
25 help: consider annotating `Enum` with `#[derive(Clone)]`
30 error[E0599]: the method `test` exists for struct `Foo<Struct, CloneStruct>`, but its trait bounds were not satisfied
31 --> $DIR/derive-trait-for-method-call.rs:34:15
36 | doesn't satisfy `Struct: Clone`
37 | doesn't satisfy `Struct: Default`
39 LL | struct CloneStruct {
40 | ------------------ doesn't satisfy `CloneStruct: Default`
42 LL | struct Foo<X, Y> (X, Y);
43 | ---------------- method `test` not found for this struct
45 LL | let y = x.test();
46 | ^^^^ method cannot be called on `Foo<Struct, CloneStruct>` due to unsatisfied trait bounds
48 = note: the following trait bounds were not satisfied:
51 `CloneStruct: Default`
52 help: consider annotating `CloneStruct` with `#[derive(Default)]`
54 LL | #[derive(Default)]
56 help: consider annotating `Struct` with `#[derive(Clone, Default)]`
58 LL | #[derive(Clone, Default)]
61 error[E0599]: the method `test` exists for struct `Foo<Vec<Enum>, Instant>`, but its trait bounds were not satisfied
62 --> $DIR/derive-trait-for-method-call.rs:40:15
64 LL | struct Foo<X, Y> (X, Y);
65 | ---------------- method `test` not found for this struct
67 LL | let y = x.test();
68 | ^^^^ method cannot be called on `Foo<Vec<Enum>, Instant>` due to unsatisfied trait bounds
69 --> $SRC_DIR/std/src/time.rs:LL:COL
71 = note: doesn't satisfy `Instant: Default`
72 --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
74 = note: doesn't satisfy `Vec<Enum>: Clone`
76 = note: the following trait bounds were not satisfied:
80 error: aborting due to 3 previous errors
82 For more information about this error, try `rustc --explain E0599`.