about summary refs log tree commit diff
path: root/src/librustc_apfloat/ieee.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-20 15:06:41 +0000
committerbors <bors@rust-lang.org>2018-01-20 15:06:41 +0000
commit15a1e2844dfea7850be5c6c901b67ceff370b0eb (patch)
tree2929f026038000e5f0ecfdbe6e1e0fb378157a6b /src/librustc_apfloat/ieee.rs
parentbdda8d61151a91fcc95b059918dd834c8e7ac09e (diff)
parent14982db2d68268458a3de03e395b2e9afe518b50 (diff)
downloadrust-15a1e2844dfea7850be5c6c901b67ceff370b0eb.tar.gz
rust-15a1e2844dfea7850be5c6c901b67ceff370b0eb.zip
Auto merge of #46980 - zackmdavis:and_the_case_of_the_needlessly_parenthesized_arguments, r=petrochenkov
in which the unused-parens lint comes to cover function and method args

Resolves #46137.
Diffstat (limited to 'src/librustc_apfloat/ieee.rs')
-rw-r--r--src/librustc_apfloat/ieee.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_apfloat/ieee.rs b/src/librustc_apfloat/ieee.rs
index 3e76b60b84a..7abd02b6656 100644
--- a/src/librustc_apfloat/ieee.rs
+++ b/src/librustc_apfloat/ieee.rs
@@ -1434,7 +1434,7 @@ impl<S: Semantics> Float for IeeeFloat<S> {
         let max_change = S::MAX_EXP as i32 - (S::MIN_EXP as i32 - sig_bits) + 1;
 
         // Clamp to one past the range ends to let normalize handle overflow.
-        let exp_change = cmp::min(cmp::max(exp as i32, (-max_change - 1)), max_change);
+        let exp_change = cmp::min(cmp::max(exp as i32, -max_change - 1), max_change);
         self.exp = self.exp.saturating_add(exp_change as ExpInt);
         self = self.normalize(round, Loss::ExactlyZero).value;
         if self.is_nan() {