blob: fc64828b1533cbcdda264576bffc4919a9e741e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
error[E0599]: the method `extend_from_slice` exists for mutable reference `&mut Vec<NoDerives>`, but its trait bounds were not satisfied
--> $DIR/issue-91492.rs:4:9
|
LL | pub struct NoDerives;
| -------------------- doesn't satisfy `NoDerives: Clone`
LL | fn fun1(foo: &mut Vec<NoDerives>, bar: &[NoDerives]) {
LL | foo.extend_from_slice(bar);
| ^^^^^^^^^^^^^^^^^
|
= note: the following trait bounds were not satisfied:
`NoDerives: Clone`
help: consider annotating `NoDerives` with `#[derive(Clone)]`
|
LL + #[derive(Clone)]
LL | pub struct NoDerives;
|
error[E0599]: the method `extend_from_slice` exists for mutable reference `&mut Vec<SomeDerives>`, but its trait bounds were not satisfied
--> $DIR/issue-91492.rs:12:9
|
LL | pub struct SomeDerives;
| ---------------------- doesn't satisfy `SomeDerives: Clone`
LL | fn fun2(foo: &mut Vec<SomeDerives>, bar: &[SomeDerives]) {
LL | foo.extend_from_slice(bar);
| ^^^^^^^^^^^^^^^^^
|
= note: the following trait bounds were not satisfied:
`SomeDerives: Clone`
help: consider annotating `SomeDerives` with `#[derive(Clone)]`
|
LL + #[derive(Clone)]
LL | pub struct SomeDerives;
|
error[E0599]: the method `use_clone` exists for struct `Object<NoDerives, SomeDerives>`, but its trait bounds were not satisfied
--> $DIR/issue-91492.rs:22:9
|
LL | pub struct NoDerives;
| -------------------- doesn't satisfy `NoDerives: Clone`
...
LL | struct Object<T, A>(T, A);
| ------------------- method `use_clone` not found for this struct
...
LL | foo.use_clone();
| ^^^^^^^^^ method cannot be called on `Object<NoDerives, SomeDerives>` due to unsatisfied trait bounds
|
note: trait bound `NoDerives: Clone` was not satisfied
--> $DIR/issue-91492.rs:18:9
|
LL | impl<T: Clone, A: Default> Object<T, A> {
| ^^^^^ ------------
| |
| unsatisfied trait bound introduced here
help: consider annotating `NoDerives` with `#[derive(Clone)]`
|
LL + #[derive(Clone)]
LL | pub struct NoDerives;
|
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0599`.
|