Skip to content

Commit dd1cd67

Browse files
committed
removed not-needed conversion
1 parent 4cc2cab commit dd1cd67

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_mir/util/aggregate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ pub fn expand_aggregate<'tcx>(
5252
.enumerate()
5353
.map(move |(i, (op, ty))| {
5454
let lhs_field = if let AggregateKind::Array(_) = kind {
55-
let offset = i as u64;
56-
assert_eq!(offset as usize, i);
55+
let offset = u64::try_from(i).unwrap();
5756
tcx.mk_place_elem(
5857
lhs,
5958
ProjectionElem::ConstantIndex {

0 commit comments

Comments
 (0)