]> git.lizzy.rs Git - rust.git/commitdiff
a simple refactoring and removing comment.
authorkenta7777 <k.hasegw7@gmail.com>
Fri, 15 Mar 2019 16:58:48 +0000 (01:58 +0900)
committerkenta7777 <k.hasegw7@gmail.com>
Fri, 15 Mar 2019 16:58:48 +0000 (01:58 +0900)
src/librustc_mir/hair/pattern/_match.rs

index 76e04d349f15bc679bab7aaec4a04859d6182bbe..44bcb9de0e1578dee06dbe23542bd3f116c55033 100644 (file)
@@ -678,10 +678,9 @@ fn all_constructors<'a, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
             ]
         }
         ty::Int(ity) => {
-            // FIXME(49937): refactor these bit manipulations into interpret.
             let bits = Integer::from_attr(&cx.tcx, SignedInt(ity)).size().bits() as u128;
             let min = 1u128 << (bits - 1);
-            let max = (1u128 << (bits - 1)) - 1;
+            let max = min - 1;
             vec![ConstantRange(min, max, pcx.ty, RangeEnd::Included)]
         }
         ty::Uint(uty) => {