rust/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
830 B
Plaintext
Raw Normal View History

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
|
= 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`
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
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`.