Skip to content

Commit 8e9552a

Browse files
committed
Add a few inline directives in rustc_serialize.
1 parent 6d0c9e2 commit 8e9552a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

compiler/rustc_serialize/src/int_overflow.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ macro_rules! impl_debug_strict_add {
2020
($( $ty:ty )*) => {
2121
$(
2222
impl DebugStrictAdd for $ty {
23+
#[inline]
2324
fn debug_strict_add(self, other: Self) -> Self {
2425
if cfg!(debug_assertions) {
2526
self + other
@@ -42,6 +43,7 @@ macro_rules! impl_debug_strict_sub {
4243
($( $ty:ty )*) => {
4344
$(
4445
impl DebugStrictSub for $ty {
46+
#[inline]
4547
fn debug_strict_sub(self, other: Self) -> Self {
4648
if cfg!(debug_assertions) {
4749
self - other

compiler/rustc_serialize/src/opaque.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ impl FileEncoder {
8989
self.buffered = 0;
9090
}
9191

92+
#[inline]
9293
pub fn file(&self) -> &File {
9394
&self.file
9495
}
9596

97+
#[inline]
9698
pub fn path(&self) -> &Path {
9799
&self.path
98100
}

0 commit comments

Comments
 (0)