summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-imm-mut-trait-implementations.stderr
blob: f2eb651eaa426af11e62ec8bf2933e725b1a5737 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error[E0277]: the trait bound `A: Trait` is not satisfied
  --> $DIR/suggest-imm-mut-trait-implementations.rs:20:9
   |
LL |     foo(a);
   |     --- ^ the trait `Trait` is not implemented for `A`
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `foo`
  --> $DIR/suggest-imm-mut-trait-implementations.rs:14:11
   |
LL | fn foo<X: Trait>(_: X) {}
   |           ^^^^^ required by this bound in `foo`
help: consider borrowing here
   |
LL |     foo(&a);
   |         +
LL |     foo(&mut a);
   |         ++++

error[E0277]: the trait bound `B: Trait` is not satisfied
  --> $DIR/suggest-imm-mut-trait-implementations.rs:21:9
   |
LL |     foo(b);
   |     --- ^ the trait `Trait` is not implemented for `B`
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `foo`
  --> $DIR/suggest-imm-mut-trait-implementations.rs:14:11
   |
LL | fn foo<X: Trait>(_: X) {}
   |           ^^^^^ required by this bound in `foo`
help: consider borrowing here
   |
LL |     foo(&b);
   |         +

error[E0277]: the trait bound `C: Trait` is not satisfied
  --> $DIR/suggest-imm-mut-trait-implementations.rs:22:9
   |
LL |     foo(c);
   |     --- ^ the trait `Trait` is not implemented for `C`
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `foo`
  --> $DIR/suggest-imm-mut-trait-implementations.rs:14:11
   |
LL | fn foo<X: Trait>(_: X) {}
   |           ^^^^^ required by this bound in `foo`
help: consider mutably borrowing here
   |
LL |     foo(&mut c);
   |         ++++

error: aborting due to 3 previous errors

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