We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a41ce6 commit bbdc338Copy full SHA for bbdc338
tests/compile-fail/validity/nonzero.rs
@@ -7,5 +7,5 @@ pub(crate) struct NonZero<T>(pub(crate) T);
7
8
fn main() {
9
// Make sure that we detect this even when no function call is happening along the way
10
- let _x = Some(NonZero(0)); //~ ERROR encountered 0, but expected something greater or equal to 1
+ let _x = Some(unsafe { NonZero(0) }); //~ ERROR encountered 0, but expected something greater or equal to 1
11
}
0 commit comments