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