summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unwrap_or.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/unwrap_or.rs')
-rw-r--r--src/tools/clippy/tests/ui/unwrap_or.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/unwrap_or.rs b/src/tools/clippy/tests/ui/unwrap_or.rs
new file mode 100644
index 000000000..bfb41e439
--- /dev/null
+++ b/src/tools/clippy/tests/ui/unwrap_or.rs
@@ -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();
+}