mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
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_on_ref() {
|
|||||||
let y = deref(&mut x);
|
let y = deref(&mut x);
|
||||||
assert_eq!(y, 4);
|
assert_eq!(y, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[allow(unreachable_code)]
|
||||||
|
fn test_not_never() {
|
||||||
|
if !return () {}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user