]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/unwrap_or.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / unwrap_or.rs
diff --git a/src/tools/clippy/tests/ui/unwrap_or.rs b/src/tools/clippy/tests/ui/unwrap_or.rs
new file mode 100644 (file)
index 0000000..bfb41e4
--- /dev/null
@@ -0,0 +1,9 @@
+#![warn(clippy::all)]
+
+fn main() {
+    let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len();
+}
+
+fn new_lines() {
+    let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len();
+}