fork/rust

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

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

master
777 B29 linesraw
1error[E0277]: the trait bound `&T: X` is not satisfied
2  --> $DIR/issue-106443-sugg-clone-for-bound.rs:10:9
3   |
4LL |     foo(s);
5   |         ^ the trait `X` is not implemented for `&T`
6   |
7help: consider further restricting this bound
8   |
9LL | fn bar<T: X + Clone>(s: &T) {
10   |             +++++++
11help: consider using clone here
12   |
13LL |     foo(s.clone());
14   |          ++++++++
15
16error[E0277]: the trait bound `&T: X` is not satisfied
17  --> $DIR/issue-106443-sugg-clone-for-bound.rs:14:9
18   |
19LL |     foo(s);
20   |         ^ the trait `X` is not implemented for `&T`
21   |
22help: consider using clone here
23   |
24LL |     foo(s.clone());
25   |          ++++++++
26
27error: aborting due to 2 previous errors
28
29For more information about this error, try `rustc --explain E0277`.