rust/tests/ui/derives/issue-91492.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
2.1 KiB
Plaintext
Raw Normal View History

2021-12-04 06:15:45 -06:00
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;
2022-02-13 09:27:59 -06:00
| -------------------- doesn't satisfy `NoDerives: Clone`
2021-12-04 06:15:45 -06:00
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)]
|
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;
2022-02-13 09:27:59 -06:00
| ---------------------- doesn't satisfy `SomeDerives: Clone`
2021-12-04 06:15:45 -06:00
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)]
|
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;
2022-02-13 09:27:59 -06:00
| -------------------- doesn't satisfy `NoDerives: Clone`
2021-12-04 06:15:45 -06:00
...
LL | struct Object<T, A>(T, A);
| ------------------- method `use_clone` not found for this struct
2021-12-04 06:15:45 -06:00
...
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
2021-12-04 06:15:45 -06:00
help: consider annotating `NoDerives` with `#[derive(Clone)]`
|
LL | #[derive(Clone)]
|
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0599`.