We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cc2cab commit dd1cd67Copy full SHA for dd1cd67
src/librustc_mir/util/aggregate.rs
@@ -52,8 +52,7 @@ pub fn expand_aggregate<'tcx>(
52
.enumerate()
53
.map(move |(i, (op, ty))| {
54
let lhs_field = if let AggregateKind::Array(_) = kind {
55
- let offset = i as u64;
56
- assert_eq!(offset as usize, i);
+ let offset = u64::try_from(i).unwrap();
57
tcx.mk_place_elem(
58
lhs,
59
ProjectionElem::ConstantIndex {
0 commit comments