Recover tests
This commit is contained in:
parent
b9c617a1b7
commit
1a474d9179
@ -16,6 +16,18 @@ fn main() {
|
||||
expect_result();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_expect_option() {
|
||||
let opt = Some(0);
|
||||
let _ = opt.expect("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_expect_result() {
|
||||
let res: Result<u8, ()> = Ok(0);
|
||||
let _ = res.expect("");
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod issue9612 {
|
||||
// should not lint in `#[cfg(test)]` modules
|
||||
|
@ -66,6 +66,12 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
let boxed_slice: Box<[u8]> = Box::new([0, 1, 2, 3]);
|
||||
let _ = boxed_slice.get(1).unwrap();
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod issue9612 {
|
||||
// should not lint in `#[cfg(test)]` modules
|
||||
|
Loading…
Reference in New Issue
Block a user