Rollup merge of #78491 - petertodd:2020-inline-from-nonzero, r=sfackler
Inline NonZeroN::from(n) Currently this results in the generated assembly having a function call for this trivial conversion.
This commit is contained in:
commit
c7792230c0
@ -92,6 +92,7 @@ assert_eq!(size_of::<Option<core::num::", stringify!($Ty), ">>(), size_of::<", s
|
||||
doc_comment! {
|
||||
concat!(
|
||||
"Converts a `", stringify!($Ty), "` into an `", stringify!($Int), "`"),
|
||||
#[inline]
|
||||
fn from(nonzero: $Ty) -> Self {
|
||||
nonzero.0
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user