diff --git a/library/core/tests/ops.rs b/library/core/tests/ops.rs index aa79dbac8f3..0c81cba35b3 100644 --- a/library/core/tests/ops.rs +++ b/library/core/tests/ops.rs @@ -232,3 +232,9 @@ fn deref>(t: T) -> U { let y = deref(&mut x); assert_eq!(y, 4); } + +#[test] +#[allow(unreachable_code)] +fn test_not_never() { + if !return () {} +}