mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
19 lines
402 B
Rust
19 lines
402 B
Rust
// Test that the resolve failure does not lead to downstream type errors.
|
|
// See issue #31997.
|
|
#![allow(deprecated)]
|
|
|
|
trait TheTrait { }
|
|
|
|
fn closure<F, T>(x: F) -> Result<T, ()>
|
|
where F: FnMut() -> T, T: TheTrait,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
|
|
fn foo() -> Result<(), ()> {
|
|
try!(closure(|| bar(core::ptr::null_mut()))); //~ ERROR cannot find function `bar` in this scope
|
|
Ok(())
|
|
}
|
|
|
|
fn main() { }
|