diff options
| author | jumbatm <jumbatm@gmail.com> | 2020-01-04 16:43:31 +1000 |
|---|---|---|
| committer | jumbatm <jumbatm@gmail.com> | 2020-01-05 08:01:32 +1000 |
| commit | 525cd2d7c117a925d6b9976ad142ff5e63208dc9 (patch) | |
| tree | 02d82fb46292296ab32c1ba9574bff39a9ab4ed9 /src/libcore | |
| parent | 760ce94c69ca510d44087291c311296f6d9ccdf5 (diff) | |
| download | rust-525cd2d7c117a925d6b9976ad142ff5e63208dc9.tar.gz rust-525cd2d7c117a925d6b9976ad142ff5e63208dc9.zip | |
Re-add comment about behaviour of inline.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/num/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 605ab98219f..b6b4a46e0b8 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 { |
