Skip to content

Commit 9159cc6

Browse files
committed
Inline debug_strict_*.
1 parent b61a4c2 commit 9159cc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_serialize/src/int_overflow.rs

+2
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(always)]
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(always)]
4547
fn debug_strict_sub(self, other: Self) -> Self {
4648
if cfg!(debug_assertions) {
4749
self - other

0 commit comments

Comments
 (0)