Skip to content

Commit

Permalink
removed not-needed conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan-DPC committed Aug 24, 2020
1 parent 4cc2cab commit dd1cd67
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc_mir/util/aggregate.rs
Expand Up @@ -52,8 +52,7 @@ pub fn expand_aggregate<'tcx>(
.enumerate()
.map(move |(i, (op, ty))| {
let lhs_field = if let AggregateKind::Array(_) = kind {
let offset = i as u64;
assert_eq!(offset as usize, i);
let offset = u64::try_from(i).unwrap();
tcx.mk_place_elem(
lhs,
ProjectionElem::ConstantIndex {
Expand Down

0 comments on commit dd1cd67

Please sign in to comment.