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 | required by a bound introduced by this call
9 = help: the following implementations were found:
11 note: required by a bound in `foo`
12 --> $DIR/imm-ref-trait-object-literal.rs:7:11
14 LL | fn foo<X: Trait>(_: X) {}
15 | ^^^^^ required by this bound in `foo`
16 help: consider changing this borrow's mutability
21 error[E0277]: the trait bound `S: Trait` is not satisfied
22 --> $DIR/imm-ref-trait-object-literal.rs:13:7
25 | --- ^ expected an implementor of trait `Trait`
27 | required by a bound introduced by this call
29 note: required by a bound in `foo`
30 --> $DIR/imm-ref-trait-object-literal.rs:7:11
32 LL | fn foo<X: Trait>(_: X) {}
33 | ^^^^^ required by this bound in `foo`
34 help: consider mutably borrowing here
39 error: aborting due to 2 previous errors
41 For more information about this error, try `rustc --explain E0277`.