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