2020-05-08 11:25:18 -05:00
|
|
|
error[E0277]: the trait bound `for<'b> &'b S: Trait` is not satisfied
|
2022-08-16 01:27:22 -05:00
|
|
|
--> $DIR/imm-ref-trait-object-literal-bound-regions.rs:17:14
|
2020-05-08 11:25:18 -05:00
|
|
|
|
|
|
|
|
LL | foo::<S>(s);
|
2022-08-16 01:27:22 -05:00
|
|
|
| -------- ^ the trait `for<'b> Trait` is not implemented for `&'b S`
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2020-05-08 11:25:18 -05:00
|
|
|
|
|
2021-12-13 14:56:40 -06:00
|
|
|
= help: the trait `Trait` is implemented for `&'a mut S`
|
2022-05-17 15:59:13 -05:00
|
|
|
= note: `for<'b> Trait` is implemented for `&'b mut S`, but not for `&'b S`
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `foo`
|
|
|
|
--> $DIR/imm-ref-trait-object-literal-bound-regions.rs:11:20
|
|
|
|
|
|
|
|
|
LL | fn foo<X>(_: X)
|
2023-02-20 23:21:07 -06:00
|
|
|
| --- required by a bound in this function
|
2021-07-31 11:26:55 -05:00
|
|
|
LL | where
|
|
|
|
LL | for<'b> &'b X: Trait,
|
|
|
|
| ^^^^^ required by this bound in `foo`
|
2020-05-08 11:25:18 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|