]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/imm-ref-trait-object-literal.stderr
Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup
[rust.git] / src / test / ui / suggestions / imm-ref-trait-object-literal.stderr
1 error[E0277]: the trait bound `&S: Trait` is not satisfied
2   --> $DIR/imm-ref-trait-object-literal.rs:12:7
3    |
4 LL |   foo(&s);
5    |       ^^ the trait `Trait` is not implemented for `&S`
6    |
7    = help: the following implementations were found:
8              <&'a mut S as Trait>
9 note: required by a bound in `foo`
10   --> $DIR/imm-ref-trait-object-literal.rs:7:11
11    |
12 LL | fn foo<X: Trait>(_: X) {}
13    |           ^^^^^ required by this bound in `foo`
14 help: consider changing this borrow's mutability
15    |
16 LL |   foo(&mut s);
17    |       ~~~~
18
19 error[E0277]: the trait bound `S: Trait` is not satisfied
20   --> $DIR/imm-ref-trait-object-literal.rs:13:7
21    |
22 LL |   foo(s);
23    |       ^
24    |       |
25    |       expected an implementor of trait `Trait`
26    |       help: consider mutably borrowing here: `&mut s`
27    |
28 note: required by a bound in `foo`
29   --> $DIR/imm-ref-trait-object-literal.rs:7:11
30    |
31 LL | fn foo<X: Trait>(_: X) {}
32    |           ^^^^^ required by this bound in `foo`
33
34 error: aborting due to 2 previous errors
35
36 For more information about this error, try `rustc --explain E0277`.