diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-06-21 23:54:16 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-06-21 23:54:16 +0000 |
| commit | 8e9552a6b5f05b181e9b550880d252d5282f96fe (patch) | |
| tree | 8792f1101d42820a83a59979c78240ae9db33234 /compiler/rustc_serialize | |
| parent | 6d0c9e2a1c80e350c50f5fb9338ea9e585ec603b (diff) | |
| download | rust-8e9552a6b5f05b181e9b550880d252d5282f96fe.tar.gz rust-8e9552a6b5f05b181e9b550880d252d5282f96fe.zip | |
Add a few inline directives in rustc_serialize.
Diffstat (limited to 'compiler/rustc_serialize')
| -rw-r--r-- | compiler/rustc_serialize/src/int_overflow.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_serialize/src/opaque.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_serialize/src/int_overflow.rs b/compiler/rustc_serialize/src/int_overflow.rs index f2aac2ef711..6782fbc33da 100644 --- a/compiler/rustc_serialize/src/int_overflow.rs +++ b/compiler/rustc_serialize/src/int_overflow.rs @@ -20,6 +20,7 @@ macro_rules! impl_debug_strict_add { ($( $ty:ty )*) => { $( impl DebugStrictAdd for $ty { + #[inline] fn debug_strict_add(self, other: Self) -> Self { if cfg!(debug_assertions) { self + other @@ -42,6 +43,7 @@ macro_rules! impl_debug_strict_sub { ($( $ty:ty )*) => { $( impl DebugStrictSub for $ty { + #[inline] fn debug_strict_sub(self, other: Self) -> Self { if cfg!(debug_assertions) { self - other diff --git a/compiler/rustc_serialize/src/opaque.rs b/compiler/rustc_serialize/src/opaque.rs index 00bad8e70cf..4242642c664 100644 --- a/compiler/rustc_serialize/src/opaque.rs +++ b/compiler/rustc_serialize/src/opaque.rs @@ -89,10 +89,12 @@ impl FileEncoder { self.buffered = 0; } + #[inline] pub fn file(&self) -> &File { &self.file } + #[inline] pub fn path(&self) -> &Path { &self.path } |
