2021-10-01 21:21:39 +00:00
|
|
|
error[E0277]: the trait bound `for<'a> &'a _: Trait` is not satisfied
|
|
|
|
--> $DIR/issue-89333.rs:6:5
|
2021-09-29 00:12:46 +00:00
|
|
|
|
|
|
|
|
LL | test(&|| 0);
|
2021-10-01 21:21:39 +00:00
|
|
|
| ^^^^ the trait `for<'a> Trait` is not implemented for `&'a _`
|
2021-09-29 00:12:46 +00:00
|
|
|
|
|
|
|
|
note: required by a bound in `test`
|
2021-10-01 21:21:39 +00:00
|
|
|
--> $DIR/issue-89333.rs:11:55
|
2021-09-29 00:12:46 +00:00
|
|
|
|
|
2021-10-01 21:21:39 +00:00
|
|
|
LL | fn test<T>(arg: &impl Fn() -> T) where for<'a> &'a T: Trait {}
|
|
|
|
| ^^^^^ required by this bound in `test`
|
2021-09-29 00:12:46 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|