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 trait `Trait` is implemented for `&'a mut S`
10 note: required by a bound in `foo`
11 --> $DIR/imm-ref-trait-object-literal.rs:7:11
13 LL | fn foo<X: Trait>(_: X) {}
14 | ^^^^^ required by this bound in `foo`
15 help: consider changing this borrow's mutability
20 error[E0277]: the trait bound `S: Trait` is not satisfied
21 --> $DIR/imm-ref-trait-object-literal.rs:13:7
24 | --- ^ the trait `Trait` is not implemented for `S`
26 | required by a bound introduced by this call
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`
33 help: consider mutably borrowing here
38 error: aborting due to 2 previous errors
40 For more information about this error, try `rustc --explain E0277`.