diff options
Diffstat (limited to 'src/test/ui/derived-errors')
| -rw-r--r-- | src/test/ui/derived-errors/issue-31997.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/derived-errors/issue-31997.stderr | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/test/ui/derived-errors/issue-31997.rs b/src/test/ui/derived-errors/issue-31997.rs index 6d7d21e3673..ff619313afb 100644 --- a/src/test/ui/derived-errors/issue-31997.rs +++ b/src/test/ui/derived-errors/issue-31997.rs @@ -1,5 +1,6 @@ // Test that the resolve failure does not lead to downstream type errors. // See issue #31997. +#![allow(deprecated)] trait TheTrait { } @@ -10,7 +11,7 @@ fn closure<F, T>(x: F) -> Result<T, ()> } fn foo() -> Result<(), ()> { - closure(|| bar(core::ptr::null_mut()))?; //~ ERROR cannot find function `bar` in this scope + try!(closure(|| bar(core::ptr::null_mut()))); //~ ERROR cannot find function `bar` in this scope Ok(()) } diff --git a/src/test/ui/derived-errors/issue-31997.stderr b/src/test/ui/derived-errors/issue-31997.stderr index d9260f79f27..b53c0cda8de 100644 --- a/src/test/ui/derived-errors/issue-31997.stderr +++ b/src/test/ui/derived-errors/issue-31997.stderr @@ -1,8 +1,8 @@ error[E0425]: cannot find function `bar` in this scope - --> $DIR/issue-31997.rs:13:16 + --> $DIR/issue-31997.rs:14:21 | -LL | closure(|| bar(core::ptr::null_mut()))?; - | ^^^ not found in this scope +LL | try!(closure(|| bar(core::ptr::null_mut()))); + | ^^^ not found in this scope error: aborting due to previous error |
