1 error[E0277]: the trait bound `&S: Trait` is not satisfied
2 --> $DIR/imm-ref-trait-object-literal.rs:12:7
5 | ^^ the trait `Trait` is not implemented for `&S`
7 = help: the following implementations were found:
9 note: required by a bound in `foo`
10 --> $DIR/imm-ref-trait-object-literal.rs:7:11
12 LL | fn foo<X: Trait>(_: X) {}
13 | ^^^^^ required by this bound in `foo`
14 help: consider changing this borrow's mutability
19 error[E0277]: the trait bound `S: Trait` is not satisfied
20 --> $DIR/imm-ref-trait-object-literal.rs:13:7
25 | expected an implementor of trait `Trait`
26 | help: consider mutably borrowing here: `&mut s`
28 note: required by a bound in `foo`
29 --> $DIR/imm-ref-trait-object-literal.rs:7:11
31 LL | fn foo<X: Trait>(_: X) {}
32 | ^^^^^ required by this bound in `foo`
34 error: aborting due to 2 previous errors
36 For more information about this error, try `rustc --explain E0277`.