2021-09-28 19:12:46 -05:00
|
|
|
// check-fail
|
|
|
|
// Ensure we don't error when emitting trait bound not satisfied when self type
|
|
|
|
// has late bound var
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
test(&|| 0); //~ ERROR the trait bound
|
|
|
|
}
|
|
|
|
|
2021-10-01 16:21:39 -05:00
|
|
|
trait Trait {}
|
|
|
|
|
|
|
|
fn test<T>(arg: &impl Fn() -> T) where for<'a> &'a T: Trait {}
|