]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/imm-ref-trait-object-literal.stderr
New upstream version 1.55.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 |
4LL | fn foo<X: Trait>(_: X) {}
ba9703b0 5 | ----- required by this bound in `foo`
e74abb32
XL
6...
7LL | 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
12help: consider changing this borrow's mutability
13 |
14LL | foo(&mut s);
15 | ^^^^
e74abb32
XL
16
17error[E0277]: the trait bound `S: Trait` is not satisfied
18 --> $DIR/imm-ref-trait-object-literal.rs:13:7
19 |
20LL | fn foo<X: Trait>(_: X) {}
ba9703b0 21 | ----- required by this bound in `foo`
e74abb32
XL
22...
23LL | foo(s);
17df50a5
XL
24 | ^
25 | |
26 | expected an implementor of trait `Trait`
27 | help: consider mutably borrowing here: `&mut s`
e74abb32
XL
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0277`.