]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/try_err.fixed
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / try_err.fixed
index 117300e84a40f17bd04cd1d43c1466f8477ce1a7..a2087316e3768f622787f45d421e2621f1efbe6e 100644 (file)
@@ -78,3 +78,22 @@ fn main() {
     closure_matches_test().unwrap();
     closure_into_test().unwrap();
 }
+
+macro_rules! bar {
+    () => {
+        String::from("aasdfasdfasdfa")
+    };
+}
+
+macro_rules! foo {
+    () => {
+        bar!()
+    };
+}
+
+pub fn macro_inside(fail: bool) -> Result<i32, String> {
+    if fail {
+        return Err(foo!());
+    }
+    Ok(0)
+}