1 // Test a method call where the parameter `B` would (illegally) be
2 // inferred to a region bound in the method argument. If this program
3 // were accepted, then the closure passed to `s.f` could escape its
9 fn f<B, F>(&self, _: F) where F: FnOnce(&i32) -> B {
15 s.f(|p| p) //~ ERROR lifetime may not live long enough