]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/closure.rs
Add a test
[rust.git] / tests / target / closure.rs
index 8fbe99a1adcee26af75aef21f62790ba9f9e51d6..2005d85bf175fc26f088ba64f7fc64d57045e1de 100644 (file)
@@ -60,7 +60,17 @@ fn main() {
     |arg1, arg2, _, _, arg3, arg4| {
         let temp = arg4 + arg3;
         arg2 * arg1 - temp
-    }
+    };
+
+    let block_body_with_comment = args.iter().map(|a| {
+        // Emitting only dep-info is possible only for final crate type, as
+        // as others may emit required metadata for dependent crate types
+        if a.starts_with("--emit") && is_final_crate_type && !self.workspace_mode {
+            "--emit=dep-info"
+        } else {
+            a
+        }
+    });
 }
 
 fn issue311() {
@@ -196,3 +206,9 @@ fn issue1713() {
         || recurse(right, is_less, Some(pivot), limit),
     );
 }
+
+fn issue2063() {
+    |ctx: Ctx<(String, String)>| -> io::Result<Response> {
+        Ok(Response::new().with_body(ctx.params.0))
+    }
+}