Skip to content

Commit 0ab839d

Browse files
committed
Add test
1 parent 709d2ce commit 0ab839d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/ui/unwrap_or_else_default.fixed

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ fn unwrap_or_else_default() {
6666

6767
let with_default_type = Some(1);
6868
with_default_type.unwrap_or_default();
69+
70+
let with_default_type = Some(1);
71+
with_default_type.unwrap_or_default();
6972
}
7073

7174
fn main() {}

tests/ui/unwrap_or_else_default.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ fn unwrap_or_else_default() {
6666

6767
let with_default_type = Some(1);
6868
with_default_type.unwrap_or_else(u64::default);
69+
70+
let with_default_type = Some(1);
71+
with_default_type.unwrap_or_else(0u64);
6972
}
7073

7174
fn main() {}

0 commit comments

Comments
 (0)