1 error[E0277]: the trait bound `&S: Trait` is not satisfied
2 --> $DIR/imm-ref-trait-object-literal.rs:12:7
4 LL | fn foo<X: Trait>(_: X) {}
5 | --- ----- required by this bound in `foo`
10 | the trait `Trait` is not implemented for `&S`
11 | help: consider changing this borrow's mutability: `&mut`
13 = help: the following implementations were found:
16 error[E0277]: the trait bound `S: Trait` is not satisfied
17 --> $DIR/imm-ref-trait-object-literal.rs:13:7
19 LL | fn foo<X: Trait>(_: X) {}
20 | --- ----- required by this bound in `foo`
23 | ^ the trait `Trait` is not implemented for `S`
25 = help: the following implementations were found:
28 error: aborting due to 2 previous errors
30 For more information about this error, try `rustc --explain E0277`.