diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-09-06 22:29:29 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-09-06 22:29:29 -0700 |
| commit | 739df232fee368727f9dab5638937935981f666d (patch) | |
| tree | 4b37cd5e4c1abb20850f884dcc41bc3d36f59114 /src/libstd | |
| parent | 28d042e198d700287f0b946b13dab3b99e0ed962 (diff) | |
| download | rust-739df232fee368727f9dab5638937935981f666d.tar.gz rust-739df232fee368727f9dab5638937935981f666d.zip | |
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).
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/unstable/raw.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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<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) } } } |
