summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unwrap_or_else_default.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/tests/ui/unwrap_or_else_default.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/unwrap_or_else_default.rs b/src/tools/clippy/tests/ui/unwrap_or_else_default.rs
index d55664990..1735bd580 100644
--- a/src/tools/clippy/tests/ui/unwrap_or_else_default.rs
+++ b/src/tools/clippy/tests/ui/unwrap_or_else_default.rs
@@ -69,6 +69,9 @@ fn unwrap_or_else_default() {
let with_default_type: Option<Vec<u64>> = None;
with_default_type.unwrap_or_else(Vec::new);
+
+ let empty_string = None::<String>;
+ empty_string.unwrap_or_else(|| "".to_string());
}
fn main() {}