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
1 changed files with 6 additions and 0 deletions
|
@ -232,3 +232,9 @@ fn deref_on_ref() {
|
|||
let y = deref(&mut x);
|
||||
assert_eq!(y, 4);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(unreachable_code)]
|
||||
fn test_not_never() {
|
||||
if !return () {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue