Skip to content

Commit d9f5532

Browse files
committed
Update ui test
1 parent bcfeb4d commit d9f5532

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/ui/or_fun_call.fixed

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ fn test_or_with_ctors() {
9595
let b = "b".to_string();
9696
let _ = Some(Bar("a".to_string(), Duration::from_secs(1)))
9797
.or(Some(Bar(b, Duration::from_secs(2))));
98+
99+
let vec = vec!["foo"];
100+
let _ = opt.ok_or(vec.len());
101+
102+
let array = ["foo"];
103+
let _ = opt.ok_or(array.len());
104+
105+
let slice = &["foo"][..];
106+
let _ = opt.ok_or(slice.len());
98107
}
99108

100109
// Issue 4514 - early return

0 commit comments

Comments
 (0)