Skip to content

Commit 1a474d9

Browse files
committed
Recover tests
1 parent b9c617a commit 1a474d9

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/ui-toml/expect_used/expect_used.rs

+12
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ fn main() {
1616
expect_result();
1717
}
1818

19+
#[test]
20+
fn test_expect_option() {
21+
let opt = Some(0);
22+
let _ = opt.expect("");
23+
}
24+
25+
#[test]
26+
fn test_expect_result() {
27+
let res: Result<u8, ()> = Ok(0);
28+
let _ = res.expect("");
29+
}
30+
1931
#[cfg(test)]
2032
mod issue9612 {
2133
// should not lint in `#[cfg(test)]` modules

tests/ui-toml/unwrap_used/unwrap_used.rs

+6
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ fn main() {
6666
}
6767
}
6868

69+
#[test]
70+
fn test() {
71+
let boxed_slice: Box<[u8]> = Box::new([0, 1, 2, 3]);
72+
let _ = boxed_slice.get(1).unwrap();
73+
}
74+
6975
#[cfg(test)]
7076
mod issue9612 {
7177
// should not lint in `#[cfg(test)]` modules

0 commit comments

Comments
 (0)