]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rustfmt/tests/source/issue-1350.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / rustfmt / tests / source / issue-1350.rs
diff --git a/src/tools/rustfmt/tests/source/issue-1350.rs b/src/tools/rustfmt/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)),
+                }
+            }
+        };
+    }
+}