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 31b5d11 commit 50df06dCopy full SHA for 50df06d
src/lib.rs
@@ -118,6 +118,14 @@ macro_rules! implement_common {
118
$name(value)
119
}
120
121
+ /// Creates a new variable without checking if the variable is representable by this type.
122
+ ///
123
+ /// # Safety
124
+ /// The value must be representable by this type.
125
+ pub const unsafe fn new_unchecked(value: $type) -> $name {
126
+ $name(value)
127
+ }
128
+
129
/// Wrapping (modular) subtraction. Computes `self - other`,
130
/// wrapping around at the boundary of the type.
131
///
0 commit comments