mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
20 lines
814 B
Plaintext
20 lines
814 B
Plaintext
error[E0277]: the trait bound `&impl DoesAThing: DoesAThing` is not satisfied
|
|
--> $DIR/clone-bounds-121524.rs:10:22
|
|
|
|
|
LL | drops_impl_owned(thing.clone());
|
|
| ^^^^^^^^^^^^^ the trait `DoesAThing` is not implemented for `&impl DoesAThing`
|
|
|
|
|
note: this `clone()` copies the reference, which does not do anything, because `impl DoesAThing` does not implement `Clone`
|
|
--> $DIR/clone-bounds-121524.rs:10:28
|
|
|
|
|
LL | drops_impl_owned(thing.clone());
|
|
| ^^^^^
|
|
help: consider further restricting this bound
|
|
|
|
|
LL | fn clones_impl_ref_inline(thing: &impl DoesAThing + Clone) {
|
|
| +++++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|