rust/tests/ui/suggestions/imm-ref-trait-object-litera...

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

23 lines
832 B
Plaintext
Raw Normal View History

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