]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/imm-ref-trait-object-literal.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / suggestions / imm-ref-trait-object-literal.stderr
CommitLineData
e74abb32
XL
1error[E0277]: the trait bound `&S: Trait` is not satisfied
2 --> $DIR/imm-ref-trait-object-literal.rs:12:7
3 |
e74abb32 4LL | 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
11note: required by a bound in `foo`
12 --> $DIR/imm-ref-trait-object-literal.rs:7:11
13 |
14LL | fn foo<X: Trait>(_: X) {}
15 | ^^^^^ required by this bound in `foo`
ba9703b0
XL
16help: consider changing this borrow's mutability
17 |
18LL | foo(&mut s);
94222f64 19 | ~~~~
e74abb32
XL
20
21error[E0277]: the trait bound `S: Trait` is not satisfied
22 --> $DIR/imm-ref-trait-object-literal.rs:13:7
23 |
e74abb32 24LL | foo(s);
c295e0f8
XL
25 | --- ^ expected an implementor of trait `Trait`
26 | |
27 | required by a bound introduced by this call
94222f64
XL
28 |
29note: required by a bound in `foo`
30 --> $DIR/imm-ref-trait-object-literal.rs:7:11
31 |
32LL | fn foo<X: Trait>(_: X) {}
33 | ^^^^^ required by this bound in `foo`
c295e0f8
XL
34help: consider mutably borrowing here
35 |
36LL | foo(&mut s);
37 | ++++
e74abb32
XL
38
39error: aborting due to 2 previous errors
40
41For more information about this error, try `rustc --explain E0277`.