]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | error[E0277]: the trait bound `&S: Trait` is not satisfied |
2 | --> $DIR/imm-ref-trait-object-literal.rs:12:7 | |
3 | | | |
4 | LL | fn foo<X: Trait>(_: X) {} | |
ba9703b0 | 5 | | ----- required by this bound in `foo` |
e74abb32 XL |
6 | ... |
7 | LL | foo(&s); | |
ba9703b0 | 8 | | ^^ the trait `Trait` is not implemented for `&S` |
e74abb32 XL |
9 | | |
10 | = help: the following implementations were found: | |
11 | <&'a mut S as Trait> | |
ba9703b0 XL |
12 | help: consider changing this borrow's mutability |
13 | | | |
14 | LL | foo(&mut s); | |
15 | | ^^^^ | |
e74abb32 XL |
16 | |
17 | error[E0277]: the trait bound `S: Trait` is not satisfied | |
18 | --> $DIR/imm-ref-trait-object-literal.rs:13:7 | |
19 | | | |
20 | LL | fn foo<X: Trait>(_: X) {} | |
ba9703b0 | 21 | | ----- required by this bound in `foo` |
e74abb32 XL |
22 | ... |
23 | LL | foo(s); | |
17df50a5 XL |
24 | | ^ |
25 | | | | |
26 | | expected an implementor of trait `Trait` | |
27 | | help: consider mutably borrowing here: `&mut s` | |
e74abb32 XL |
28 | |
29 | error: aborting due to 2 previous errors | |
30 | ||
31 | For more information about this error, try `rustc --explain E0277`. |