]> git.lizzy.rs Git - rust.git/commitdiff
Add tests for issues which can be closed on master
authortopecongiro <seuchida@gmail.com>
Thu, 4 May 2017 04:52:35 +0000 (13:52 +0900)
committertopecongiro <seuchida@gmail.com>
Thu, 4 May 2017 05:32:13 +0000 (14:32 +0900)
tests/source/closure.rs
tests/source/comment.rs
tests/source/issue-1350.rs [new file with mode: 0644]
tests/source/structs.rs
tests/source/try-conversion.rs
tests/target/closure.rs
tests/target/comment.rs
tests/target/issue-1350.rs [new file with mode: 0644]
tests/target/structs.rs
tests/target/try-conversion.rs

index f6e8c0930822548abd09ef678cb270f0ddbee761..b8d998f2e5975ecc0ae2fb3f0950e2410713432a 100644 (file)
@@ -104,3 +104,19 @@ fn issue1466() {
         ctx.create_device_local_buffer(buffer)
     });
 }
+
+fn issue470() {
+    {{{
+        let explicit_arg_decls =
+            explicit_arguments.into_iter()
+            .enumerate()
+            .map(|(index, (ty, pattern))| {
+                let lvalue = Lvalue::Arg(index as u32);
+                block = this.pattern(block,
+                                     argument_extent,
+                                     hair::PatternRef::Hair(pattern),
+                                     &lvalue);
+                ArgDecl { ty: ty }
+            });
+    }}}
+}
index bce05ff7a2a6f2ca8867d4970b9a1b8d579ba694..cf40e581b6eba872a06fee8d3a7cc2f52efe6dc6 100644 (file)
@@ -33,6 +33,12 @@ fn test() {
 
     funk(); //dontchangeme
             // or me
+
+    // #1388
+    const EXCEPTION_PATHS: &'static [&'static str] =
+        &[// std crates
+          "src/libstd/sys/", // Platform-specific code for std lives here.
+          "src/bootstrap"];
 }
 
   /// test123
diff --git a/tests/source/issue-1350.rs b/tests/source/issue-1350.rs
new file mode 100644 (file)
index 0000000..1baa198
--- /dev/null
@@ -0,0 +1,16 @@
+// rustfmt-max_width: 120
+// rustfmt-comment_width: 110
+
+impl Struct {
+    fn fun() {
+        let result = match <R::RequestResult as serde::Deserialize>::deserialize(&json) {
+            Ok(v) => v,
+            Err(e) => {
+                match <R::ErrorResult as serde::Deserialize>::deserialize(&json) {
+                    Ok(v) => return Err(Error::with_json(v)),
+                    Err(e2) => return Err(Error::with_json(e)),
+                }
+            }
+        };
+    }
+}
index 28bb95e1a2de3441fe83d784bea1d1612ef72156..5dd9087682cbe6ae79e74059012386f6499290f1 100644 (file)
@@ -180,3 +180,11 @@ struct Deep {
 }
 
 struct Foo<C=()>(String);
+
+// #1364
+fn foo() {
+    convex_shape.set_point(0, &Vector2f { x: 400.0, y: 100.0 });
+    convex_shape.set_point(1, &Vector2f { x: 500.0, y: 70.0 });
+    convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
+    convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });
+}
index addf2f5d5e8fa1a31fe2d92635a21a038a7dc7ba..ed83ee9e101c99b89000d0bf5ea6efbe4c59a6b5 100644 (file)
@@ -9,3 +9,10 @@ fn main() {
 fn test() {
     a?
 }
+
+fn issue1291() {
+    try!(fs::create_dir_all(&gitfiledir).chain_err(|| {
+        format!("failed to create the {} submodule directory for the workarea",
+                name)
+    }));
+}
index f6d9a855a331b22bfd5fb76445c4accbc54c0543..c94d98b3dda5d26d86d4590fce3541e7ab34cdc2 100644 (file)
@@ -119,3 +119,23 @@ fn issue1466() {
         ctx.create_device_local_buffer(buffer)
     });
 }
+
+fn issue470() {
+    {
+        {
+            {
+                let explicit_arg_decls = explicit_arguments
+                    .into_iter()
+                    .enumerate()
+                    .map(|(index, (ty, pattern))| {
+                             let lvalue = Lvalue::Arg(index as u32);
+                             block = this.pattern(block,
+                                                  argument_extent,
+                                                  hair::PatternRef::Hair(pattern),
+                                                  &lvalue);
+                             ArgDecl { ty: ty }
+                         });
+            }
+        }
+    }
+}
index 3a9735139873ff53658cad381990486829a2d1a4..a2f8d6ba0b4e34096822bc9c7809a6a9484fc0c2 100644 (file)
@@ -34,6 +34,12 @@ fn test() {
 
     funk(); // dontchangeme
     // or me
+
+    // #1388
+    const EXCEPTION_PATHS: &'static [&'static str] =
+        &[// std crates
+          "src/libstd/sys/", // Platform-specific code for std lives here.
+          "src/bootstrap"];
 }
 
 /// test123
diff --git a/tests/target/issue-1350.rs b/tests/target/issue-1350.rs
new file mode 100644 (file)
index 0000000..1baa198
--- /dev/null
@@ -0,0 +1,16 @@
+// rustfmt-max_width: 120
+// rustfmt-comment_width: 110
+
+impl Struct {
+    fn fun() {
+        let result = match <R::RequestResult as serde::Deserialize>::deserialize(&json) {
+            Ok(v) => v,
+            Err(e) => {
+                match <R::ErrorResult as serde::Deserialize>::deserialize(&json) {
+                    Ok(v) => return Err(Error::with_json(v)),
+                    Err(e2) => return Err(Error::with_json(e)),
+                }
+            }
+        };
+    }
+}
index 358172ae83835ff8ec67c5de94b72f4f3659dfd3..a89df16376fc891986e9106b5b2a97617b3d32ef 100644 (file)
@@ -184,3 +184,11 @@ struct Deep {
 }
 
 struct Foo<C = ()>(String);
+
+// #1364
+fn foo() {
+    convex_shape.set_point(0, &Vector2f { x: 400.0, y: 100.0 });
+    convex_shape.set_point(1, &Vector2f { x: 500.0, y: 70.0 });
+    convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
+    convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });
+}
index d4422cf9621412e8b12de8096ad87607006723ae..7198606d75b3b5aa1355ee131e59cde54c027c20 100644 (file)
@@ -16,3 +16,11 @@ fn main() {
 fn test() {
     a?
 }
+
+fn issue1291() {
+    fs::create_dir_all(&gitfiledir)
+        .chain_err(|| {
+                       format!("failed to create the {} submodule directory for the workarea",
+                               name)
+                   })?;
+}