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 ac61a9c commit 95c1d81Copy full SHA for 95c1d81
src/libcore/tests/nonzero.rs
@@ -121,3 +121,10 @@ fn test_match_nonzero_const_pattern() {
121
_ => panic!("Expected the const item as a pattern to match.")
122
}
123
124
+
125
+#[test]
126
+fn test_from_nonzero() {
127
+ let nz = NonZeroU32::new(1).unwrap();
128
+ let num: u32 = nz.into();
129
+ assert_eq!(num, 1u32);
130
+}
src/test/run-pass/nonzero.rs
0 commit comments