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