fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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