about summary refs log tree commit diff
path: root/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.stderr
blob: 8b1c0b9a77ad2ef4fbf7364960cbe58d1f341762 (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
error[E0277]: the trait bound `&T: X` is not satisfied
  --> $DIR/issue-106443-sugg-clone-for-bound.rs:10:9
   |
LL |     foo(s);
   |         ^ the trait `X` is not implemented for `&T`
   |
help: consider further restricting type parameter `T` with trait `Clone`
   |
LL | fn bar<T: X + Clone>(s: &T) {
   |             +++++++
help: consider using clone here
   |
LL |     foo(s.clone());
   |          ++++++++

error[E0277]: the trait bound `&T: X` is not satisfied
  --> $DIR/issue-106443-sugg-clone-for-bound.rs:14:9
   |
LL |     foo(s);
   |         ^ the trait `X` is not implemented for `&T`
   |
help: consider using clone here
   |
LL |     foo(s.clone());
   |          ++++++++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.