fork/rust

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

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

master
1.7 KiB59 linesraw
1error[E0277]: the trait bound `A: Trait` is not satisfied
2  --> $DIR/suggest-imm-mut-trait-implementations.rs:20:9
3   |
4LL |     foo(a);
5   |     --- ^ the trait `Trait` is not implemented for `A`
6   |     |
7   |     required by a bound introduced by this call
8   |
9note: required by a bound in `foo`
10  --> $DIR/suggest-imm-mut-trait-implementations.rs:14:11
11   |
12LL | fn foo<X: Trait>(_: X) {}
13   |           ^^^^^ required by this bound in `foo`
14help: consider borrowing here
15   |
16LL |     foo(&a);
17   |         +
18LL |     foo(&mut a);
19   |         ++++
20
21error[E0277]: the trait bound `B: Trait` is not satisfied
22  --> $DIR/suggest-imm-mut-trait-implementations.rs:21:9
23   |
24LL |     foo(b);
25   |     --- ^ the trait `Trait` is not implemented for `B`
26   |     |
27   |     required by a bound introduced by this call
28   |
29note: required by a bound in `foo`
30  --> $DIR/suggest-imm-mut-trait-implementations.rs:14:11
31   |
32LL | fn foo<X: Trait>(_: X) {}
33   |           ^^^^^ required by this bound in `foo`
34help: consider borrowing here
35   |
36LL |     foo(&b);
37   |         +
38
39error[E0277]: the trait bound `C: Trait` is not satisfied
40  --> $DIR/suggest-imm-mut-trait-implementations.rs:22:9
41   |
42LL |     foo(c);
43   |     --- ^ the trait `Trait` is not implemented for `C`
44   |     |
45   |     required by a bound introduced by this call
46   |
47note: required by a bound in `foo`
48  --> $DIR/suggest-imm-mut-trait-implementations.rs:14:11
49   |
50LL | fn foo<X: Trait>(_: X) {}
51   |           ^^^^^ required by this bound in `foo`
52help: consider mutably borrowing here
53   |
54LL |     foo(&mut c);
55   |         ++++
56
57error: aborting due to 3 previous errors
58
59For more information about this error, try `rustc --explain E0277`.