about summary refs log tree commit diff
path: root/src/test/ui/derived-errors
diff options
context:
space:
mode:
authorBO41 <botbob@disroot.org>2019-06-23 12:19:46 +0000
committerLzu Tao <taolzu@gmail.com>2019-08-09 02:29:44 +0000
commitfd7ac6b17ef98f63438f59edca40562c400d4128 (patch)
treecff821a785fc23a0c8e29df08793eb2215dc9bbb /src/test/ui/derived-errors
parent2d1a551e144335e0d60a637d12f410cf65849876 (diff)
downloadrust-fd7ac6b17ef98f63438f59edca40562c400d4128.tar.gz
rust-fd7ac6b17ef98f63438f59edca40562c400d4128.zip
Deprecate `try!` macro
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Co-Authored-By: Oliver Middleton <olliemail27@gmail.com>
Diffstat (limited to 'src/test/ui/derived-errors')
-rw-r--r--src/test/ui/derived-errors/issue-31997.rs2
-rw-r--r--src/test/ui/derived-errors/issue-31997.stderr6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/derived-errors/issue-31997.rs b/src/test/ui/derived-errors/issue-31997.rs
index cfdee26c559..6d7d21e3673 100644
--- a/src/test/ui/derived-errors/issue-31997.rs
+++ b/src/test/ui/derived-errors/issue-31997.rs
@@ -10,7 +10,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/src/test/ui/derived-errors/issue-31997.stderr b/src/test/ui/derived-errors/issue-31997.stderr
index e9fe0d3971e..d9260f79f27 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:21
+  --> $DIR/issue-31997.rs:13: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 previous error