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
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 following trait must be implemented
24 --> $SRC_DIR/core/src/default.rs:LL:COL
26 LL | / pub trait Default: Sized {
27 LL | | /// Returns the "default value" for a type.
29 LL | | /// Default values are often some kind of initial value, identity value, or anything else that
31 LL | | fn default() -> Self;
34 help: consider annotating `Enum` with `#[derive(Clone)]`
39 error[E0599]: the method `test` exists for struct `Foo<Struct, CloneStruct>`, but its trait bounds were not satisfied
40 --> $DIR/derive-trait-for-method-call.rs:34:15
45 | doesn't satisfy `Struct: Clone`
46 | doesn't satisfy `Struct: Default`
48 LL | struct CloneStruct {
49 | ------------------ doesn't satisfy `CloneStruct: Default`
51 LL | struct Foo<X, Y> (X, Y);
52 | ------------------------ method `test` not found for this
54 LL | let y = x.test();
55 | ^^^^ method cannot be called on `Foo<Struct, CloneStruct>` due to unsatisfied trait bounds
57 = note: the following trait bounds were not satisfied:
60 `CloneStruct: Default`
61 help: consider annotating `CloneStruct` with `#[derive(Default)]`
63 LL | #[derive(Default)]
65 help: consider annotating `Struct` with `#[derive(Clone, Default)]`
67 LL | #[derive(Clone, Default)]
70 error[E0599]: the method `test` exists for struct `Foo<Vec<Enum>, Instant>`, but its trait bounds were not satisfied
71 --> $DIR/derive-trait-for-method-call.rs:40:15
73 LL | struct Foo<X, Y> (X, Y);
74 | ------------------------ method `test` not found for this
76 LL | let y = x.test();
77 | ^^^^ method cannot be called on `Foo<Vec<Enum>, Instant>` due to unsatisfied trait bounds
79 ::: $SRC_DIR/std/src/time.rs:LL:COL
81 LL | pub struct Instant(time::Instant);
82 | ---------------------------------- doesn't satisfy `Instant: Default`
84 ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
86 LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
87 | ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<Enum>: Clone`
89 = note: the following trait bounds were not satisfied:
93 error: aborting due to 3 previous errors
95 For more information about this error, try `rustc --explain E0599`.