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 --> $DIR/derive-trait-for-method-call.rs:20:9
25 LL | impl<X: Clone + Default + , Y: Clone + Default> Foo<X, Y> {
26 | ^^^^^ ^^^^^^^ ^^^^^^^ ---------
28 | | | unsatisfied trait bound introduced here
29 | | unsatisfied trait bound introduced here
30 | unsatisfied trait bound introduced here
31 note: the trait `Default` must be implemented
32 --> $SRC_DIR/core/src/default.rs:LL:COL
33 help: consider annotating `Enum` with `#[derive(Clone)]`
38 error[E0599]: the method `test` exists for struct `Foo<Struct, CloneStruct>`, but its trait bounds were not satisfied
39 --> $DIR/derive-trait-for-method-call.rs:34:15
44 | doesn't satisfy `Struct: Clone`
45 | doesn't satisfy `Struct: Default`
47 LL | struct CloneStruct {
48 | ------------------ doesn't satisfy `CloneStruct: Default`
50 LL | struct Foo<X, Y> (X, Y);
51 | ---------------- method `test` not found for this struct
53 LL | let y = x.test();
54 | ^^^^ method cannot be called on `Foo<Struct, CloneStruct>` due to unsatisfied trait bounds
56 note: the following trait bounds were not satisfied:
57 `CloneStruct: Default`
60 --> $DIR/derive-trait-for-method-call.rs:20:9
62 LL | impl<X: Clone + Default + , Y: Clone + Default> Foo<X, Y> {
63 | ^^^^^ ^^^^^^^ ^^^^^^^ ---------
65 | | | unsatisfied trait bound introduced here
66 | | unsatisfied trait bound introduced here
67 | unsatisfied trait bound introduced here
68 help: consider annotating `CloneStruct` with `#[derive(Default)]`
70 LL | #[derive(Default)]
72 help: consider annotating `Struct` with `#[derive(Clone, Default)]`
74 LL | #[derive(Clone, Default)]
77 error[E0599]: the method `test` exists for struct `Foo<Vec<Enum>, Instant>`, but its trait bounds were not satisfied
78 --> $DIR/derive-trait-for-method-call.rs:40:15
80 LL | struct Foo<X, Y> (X, Y);
81 | ---------------- method `test` not found for this struct
83 LL | let y = x.test();
84 | ^^^^ method cannot be called on `Foo<Vec<Enum>, Instant>` due to unsatisfied trait bounds
85 --> $SRC_DIR/std/src/time.rs:LL:COL
87 = note: doesn't satisfy `Instant: Default`
88 --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
90 = note: doesn't satisfy `Vec<Enum>: Clone`
92 note: the following trait bounds were not satisfied:
95 --> $DIR/derive-trait-for-method-call.rs:20:9
97 LL | impl<X: Clone + Default + , Y: Clone + Default> Foo<X, Y> {
98 | ^^^^^ ^^^^^^^ ---------
100 | | unsatisfied trait bound introduced here
101 | unsatisfied trait bound introduced here
103 error: aborting due to 3 previous errors
105 For more information about this error, try `rustc --explain E0599`.