Skip to content

Commit 739df23

Browse files
committed
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).
1 parent 28d042e commit 739df23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libstd/unstable/raw.rs

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pub trait Repr<T> {
4949
/// struct representation. This can be used to read/write different values
5050
/// for the struct. This is a safe method because by default it does not
5151
/// give write-access to the struct returned.
52+
#[inline]
5253
fn repr(&self) -> T { unsafe { cast::transmute_copy(self) } }
5354
}
5455

0 commit comments

Comments
 (0)