1 // Test that the resolve failure does not lead to downstream type errors.
2 // See issue #31997.
3 #![allow(deprecated)]
4
5 trait TheTrait { }
6
closure<F, T>(x: F) -> Result<T, ()> where F: FnMut() -> T, T: TheTrait,7 fn closure<F, T>(x: F) -> Result<T, ()>
8 where F: FnMut() -> T, T: TheTrait,
9 {
10 unimplemented!()
11 }
12
foo() -> Result<(), ()>13 fn foo() -> Result<(), ()> {
14 try!(closure(|| bar(core::ptr::null_mut()))); //~ ERROR cannot find function `bar` in this scope
15 Ok(())
16 }
17
main()18 fn main() { }
19