Test not never
Currently fails to build: error[E0600]: cannot apply unary operator `!` to type `!` --> library/core/tests/ops.rs:239:8 | 239 | if !return () {} | ^^^^^^^^^^ cannot apply unary operator `!`
This commit is contained in:
parent
cebd2dda1d
commit
a4bff741d0
@ -232,3 +232,9 @@ fn deref<U: Copy, T: Deref<Target = U>>(t: T) -> U {
|
||||
let y = deref(&mut x);
|
||||
assert_eq!(y, 4);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(unreachable_code)]
|
||||
fn test_not_never() {
|
||||
if !return () {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user