diff options
| author | Lukas Wirth <lukas.wirth@ferrous-systems.com> | 2025-06-02 10:11:10 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukas.wirth@ferrous-systems.com> | 2025-06-03 10:13:33 +0200 |
| commit | 23d523160748045ca24a5d1acd7372dd444eaa6e (patch) | |
| tree | 1f4dd7ae14fa3b8b5375fb20359a6447565fbbf6 /tests/ui/derived-errors | |
| parent | 91fad92585b2dafc52a074e502b2a6c1f093ca35 (diff) | |
| download | rust-23d523160748045ca24a5d1acd7372dd444eaa6e.tar.gz rust-23d523160748045ca24a5d1acd7372dd444eaa6e.zip | |
Use non-2015 edition paths in tests that do not test for their resolution
This allows for testing these tests on editions other than 2015
Diffstat (limited to 'tests/ui/derived-errors')
| -rw-r--r-- | tests/ui/derived-errors/issue-31997.rs | 2 | ||||
| -rw-r--r-- | tests/ui/derived-errors/issue-31997.stderr | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/derived-errors/issue-31997.rs b/tests/ui/derived-errors/issue-31997.rs index ff619313afb..59f19e4fde2 100644 --- a/tests/ui/derived-errors/issue-31997.rs +++ b/tests/ui/derived-errors/issue-31997.rs @@ -11,7 +11,7 @@ fn closure<F, T>(x: F) -> Result<T, ()> } fn foo() -> Result<(), ()> { - try!(closure(|| bar(core::ptr::null_mut()))); //~ ERROR cannot find function `bar` in this scope + closure(|| bar(core::ptr::null_mut()))?; //~ ERROR cannot find function `bar` in this scope Ok(()) } diff --git a/tests/ui/derived-errors/issue-31997.stderr b/tests/ui/derived-errors/issue-31997.stderr index 7d6415fef83..f5afb94fbd6 100644 --- a/tests/ui/derived-errors/issue-31997.stderr +++ b/tests/ui/derived-errors/issue-31997.stderr @@ -1,8 +1,8 @@ error[E0425]: cannot find function `bar` in this scope - --> $DIR/issue-31997.rs:14:21 + --> $DIR/issue-31997.rs:14:16 | -LL | try!(closure(|| bar(core::ptr::null_mut()))); - | ^^^ not found in this scope +LL | closure(|| bar(core::ptr::null_mut()))?; + | ^^^ not found in this scope error: aborting due to 1 previous error |
