Switch to 'const unsafe fn' ordering (rust-lang/rust#29107)
This commit is contained in:
@@ -55,7 +55,7 @@ macro_rules! nonzero_new {
|
||||
/// Creates an instance of NonZero with the provided value.
|
||||
/// You must indeed ensure that the value is actually "non-zero".
|
||||
#[inline(always)]
|
||||
pub unsafe const fn new(inner: T) -> NonZero<T> {
|
||||
pub const unsafe fn new(inner: T) -> NonZero<T> {
|
||||
NonZero(inner)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -511,7 +511,7 @@ macro_rules! unique_new {
|
||||
macro_rules! unique_new {
|
||||
() => (
|
||||
/// Creates a new `Unique`.
|
||||
pub unsafe const fn new(ptr: *mut T) -> Unique<T> {
|
||||
pub const unsafe fn new(ptr: *mut T) -> Unique<T> {
|
||||
Unique { pointer: NonZero::new(ptr), _marker: PhantomData }
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user