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);
|
2024-01-23 20:52:29 -06:00
|
|
|
| ^^^^^^^^^^^ the trait `for<'a> Trait` is not implemented for `&'a _`
|
2021-09-28 19:12:46 -05:00
|
|
|
|
|
2023-09-09 22:33:07 -05:00
|
|
|
help: this trait has no implementations, consider adding one
|
|
|
|
--> $DIR/issue-89333.rs:9:1
|
|
|
|
|
|
|
|
|
LL | trait Trait {}
|
|
|
|
| ^^^^^^^^^^^
|
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
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2021-09-28 19:12:46 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|