Flag the Repr::repr function with #[inline]
This allows cross-crate inlining which is *very* good because this is called a lot throughout libstd (even when libstd is inlined across crates).
This commit is contained in:
parent
28d042e198
commit
739df232fe
@ -49,6 +49,7 @@ pub trait Repr<T> {
|
||||
/// struct representation. This can be used to read/write different values
|
||||
/// for the struct. This is a safe method because by default it does not
|
||||
/// give write-access to the struct returned.
|
||||
#[inline]
|
||||
fn repr(&self) -> T { unsafe { cast::transmute_copy(self) } }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user