]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/chains.rs
Tidy up and pass tests
[rust.git] / tests / target / chains.rs
index 6e1fc809764a5414dfd4df6321011a8ec6e4089a..8a41eec2bde313c8e528880be1d83b4d1c7fec56 100644 (file)
@@ -246,3 +246,16 @@ pub fn from_ast(diagnostic: &::errors::Handler, attrs: &[ast::Attribute]) -> Att
             .collect();
     }
 }
+
+// #2415
+// Avoid orphan in chain
+fn issue2415() {
+    let base_url = (|| {
+        // stuff
+
+        Ok((|| {
+            // stuff
+            Some(value.to_string())
+        })().ok_or("")?)
+    })().unwrap_or_else(|_: Box<::std::error::Error>| String::from(""));
+}