summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.stderr
blob: 8607917ede6bf10f6d1433ad3b94944e15857ad3 (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 this bound
   |
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`.