From bbdc3380d57fafbe66d2f6422df35d542331555f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 7 Dec 2018 10:15:25 +0100 Subject: [PATCH] fix tests --- tests/compile-fail/validity/nonzero.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/compile-fail/validity/nonzero.rs b/tests/compile-fail/validity/nonzero.rs index d1de0f8095e3..f820b0e810b8 100644 --- a/tests/compile-fail/validity/nonzero.rs +++ b/tests/compile-fail/validity/nonzero.rs @@ -7,5 +7,5 @@ pub(crate) struct NonZero(pub(crate) T); fn main() { // Make sure that we detect this even when no function call is happening along the way - 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 }