未验证 提交 38129099 编写于 作者: Y Yuki Okushi 提交者: GitHub

Rollup merge of #80487 - matthiaskrgr:field_names, r=jyn514

don't redundantly repeat field names

r? `@Dylan-DPC`
......@@ -523,7 +523,7 @@ struct VisitingNodeFrame<G: DirectedGraph, Successors> {
successors_len: 0,
min_depth: depth,
min_cycle_root: successor_node,
successor_node: successor_node,
successor_node,
});
continue 'recurse;
}
......
......@@ -110,10 +110,7 @@ pub fn new(
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 } }
}
}
......
......@@ -306,13 +306,13 @@ fn super_basic_block_data(&mut self,
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);
}
}
......
......@@ -1634,7 +1634,7 @@ fn generator_layout(
let layout = tcx.intern_layout(Layout {
variants: Variants::Multiple {
tag: tag,
tag,
tag_encoding: TagEncoding::Direct,
tag_field: tag_index,
variants,
......
......@@ -390,7 +390,7 @@ fn compute_min_captures(
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;
}
......
......@@ -459,7 +459,7 @@ fn cat_upvar(&self, hir_id: hir::HirId, var_id: hir::HirId) -> McResult<PlaceWit
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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册