Skip to content

Commit

Permalink
a simple refactoring and removing comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenta7777 committed Mar 15, 2019
1 parent 50af62d commit a8fa1a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc_mir/hair/pattern/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit a8fa1a1

Please sign in to comment.