don't redundantly repeat field names

This commit is contained in:
Matthias Krüger 2020-12-29 22:02:47 +01:00
parent 158f8d034b
commit 0c3af22e08
6 changed files with 7 additions and 10 deletions

View File

@ -523,7 +523,7 @@ where
successors_len: 0,
min_depth: depth,
min_cycle_root: successor_node,
successor_node: successor_node,
successor_node,
});
continue 'recurse;
}

View File

@ -110,10 +110,7 @@ impl<'tcx> PlaceWithHirId<'tcx> {
base: PlaceBase,
projections: Vec<Projection<'tcx>>,
) -> PlaceWithHirId<'tcx> {
PlaceWithHirId {
hir_id: hir_id,
place: Place { base_ty: base_ty, base: base, projections: projections },
}
PlaceWithHirId { hir_id, place: Place { base_ty, base, projections } }
}
}

View File

@ -306,13 +306,13 @@ macro_rules! make_mir_visitor {
let mut index = 0;
for statement in statements {
let location = Location { block: block, statement_index: index };
let location = Location { block, statement_index: index };
self.visit_statement(statement, location);
index += 1;
}
if let Some(terminator) = terminator {
let location = Location { block: block, statement_index: index };
let location = Location { block, statement_index: index };
self.visit_terminator(terminator, location);
}
}

View File

@ -1634,7 +1634,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
let layout = tcx.intern_layout(Layout {
variants: Variants::Multiple {
tag: tag,
tag,
tag_encoding: TagEncoding::Direct,
tag_field: tag_index,
variants,

View File

@ -390,7 +390,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let min_cap_list = match root_var_min_capture_list.get_mut(&var_hir_id) {
None => {
let min_cap_list = vec![ty::CapturedPlace { place: place, info: capture_info }];
let min_cap_list = vec![ty::CapturedPlace { place, info: capture_info }];
root_var_min_capture_list.insert(var_hir_id, min_cap_list);
continue;
}

View File

@ -459,7 +459,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
kind: ProjectionKind,
) -> PlaceWithHirId<'tcx> {
let mut projections = base_place.place.projections;
projections.push(Projection { kind: kind, ty: ty });
projections.push(Projection { kind, ty });
let ret = PlaceWithHirId::new(
node.hir_id(),
base_place.place.base_ty,