From 525cd2d7c117a925d6b9976ad142ff5e63208dc9 Mon Sep 17 00:00:00 2001 From: jumbatm Date: Sat, 4 Jan 2020 16:43:31 +1000 Subject: [PATCH] Re-add comment about behaviour of inline. --- src/libcore/num/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 605ab98219f91..b6b4a46e0b812 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -2001,6 +2001,9 @@ $EndFeature, " #[inline] #[rustc_inherit_overflow_checks] pub const fn abs(self) -> Self { + // Note that the #[inline] above means that the overflow + // semantics of the subtraction depend on the crate we're being + // inlined into. if self.is_negative() { -self } else {