From 739df232fee368727f9dab5638937935981f666d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 6 Sep 2013 22:29:29 -0700 Subject: [PATCH] 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). --- src/libstd/unstable/raw.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstd/unstable/raw.rs b/src/libstd/unstable/raw.rs index a538566fa18..ac0e83df7ef 100644 --- a/src/libstd/unstable/raw.rs +++ b/src/libstd/unstable/raw.rs @@ -49,6 +49,7 @@ pub trait Repr { /// 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) } } }