]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / imm-ref-trait-object-literal-bound-regions.stderr
1 error[E0277]: the trait bound `for<'b> &'b S: Trait` is not satisfied
2   --> $DIR/imm-ref-trait-object-literal-bound-regions.rs:17:14
3    |
4 LL |     foo::<S>(s);
5    |     -------- ^ the trait `for<'b> Trait` is not implemented for `&'b S`
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = help: the trait `Trait` is implemented for `&'a mut S`
10    = note: `for<'b> Trait` is implemented for `&'b mut S`, but not for `&'b S`
11 note: required by a bound in `foo`
12   --> $DIR/imm-ref-trait-object-literal-bound-regions.rs:11:20
13    |
14 LL | fn foo<X>(_: X)
15    |    --- required by a bound in this
16 LL | where
17 LL |     for<'b> &'b X: Trait,
18    |                    ^^^^^ required by this bound in `foo`
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0277`.