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