diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-06-16 17:02:52 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2021-06-17 10:02:08 +0000 |
| commit | 13bfbb42530321e528bd10e5301ba83db8973b8f (patch) | |
| tree | 802457b83022bc7d3b29cf9e02c8fd74875ba4fa | |
| parent | 8daad743c4bb941536860b4df20111cb71b8c777 (diff) | |
| download | rust-13bfbb42530321e528bd10e5301ba83db8973b8f.tar.gz rust-13bfbb42530321e528bd10e5301ba83db8973b8f.zip | |
Fix comment about rustc_inherit_overflow_checks in abs().
| -rw-r--r-- | library/core/src/num/int_macros.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index a0efe681285..2e466106fe5 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -1772,9 +1772,9 @@ macro_rules! int_impl { #[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. + // Note that the #[rustc_inherit_overflow_checks] and #[inline] + // above mean that the overflow semantics of the subtraction + // depend on the crate we're being called from. if self.is_negative() { -self } else { |
