]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/imm-ref-trait-object-literal.stderr
Rollup merge of #65276 - varkor:toolstate-no-ping, r=Mark-Simulacrum
[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 | fn foo<X: Trait>(_: X) {}
5    |    ---    ----- required by this bound in `foo`
6 ...
7 LL |   foo(&s);
8    |       -^
9    |       |
10    |       the trait `Trait` is not implemented for `&S`
11    |       help: consider changing this borrow's mutability: `&mut`
12    |
13    = help: the following implementations were found:
14              <&'a mut S as Trait>
15
16 error[E0277]: the trait bound `S: Trait` is not satisfied
17   --> $DIR/imm-ref-trait-object-literal.rs:13:7
18    |
19 LL | fn foo<X: Trait>(_: X) {}
20    |    ---    ----- required by this bound in `foo`
21 ...
22 LL |   foo(s);
23    |       ^ the trait `Trait` is not implemented for `S`
24    |
25    = help: the following implementations were found:
26              <&'a mut S as Trait>
27
28 error: aborting due to 2 previous errors
29
30 For more information about this error, try `rustc --explain E0277`.