Skip to content

Commit 3812909

Browse files
authored
Rollup merge of #80487 - matthiaskrgr:field_names, r=jyn514
don't redundantly repeat field names r? `@Dylan-DPC`
2 parents 039b62e + 0c3af22 commit 3812909

File tree

6 files changed

+7
-10
lines changed

6 files changed

+7
-10
lines changed

compiler/rustc_data_structures/src/graph/scc/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ where
523523
successors_len: 0,
524524
min_depth: depth,
525525
min_cycle_root: successor_node,
526-
successor_node: successor_node,
526+
successor_node,
527527
});
528528
continue 'recurse;
529529
}

compiler/rustc_middle/src/hir/place.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,7 @@ impl<'tcx> PlaceWithHirId<'tcx> {
110110
base: PlaceBase,
111111
projections: Vec<Projection<'tcx>>,
112112
) -> PlaceWithHirId<'tcx> {
113-
PlaceWithHirId {
114-
hir_id: hir_id,
115-
place: Place { base_ty: base_ty, base: base, projections: projections },
116-
}
113+
PlaceWithHirId { hir_id, place: Place { base_ty, base, projections } }
117114
}
118115
}
119116

compiler/rustc_middle/src/mir/visit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,13 @@ macro_rules! make_mir_visitor {
306306

307307
let mut index = 0;
308308
for statement in statements {
309-
let location = Location { block: block, statement_index: index };
309+
let location = Location { block, statement_index: index };
310310
self.visit_statement(statement, location);
311311
index += 1;
312312
}
313313

314314
if let Some(terminator) = terminator {
315-
let location = Location { block: block, statement_index: index };
315+
let location = Location { block, statement_index: index };
316316
self.visit_terminator(terminator, location);
317317
}
318318
}

compiler/rustc_middle/src/ty/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
16341634

16351635
let layout = tcx.intern_layout(Layout {
16361636
variants: Variants::Multiple {
1637-
tag: tag,
1637+
tag,
16381638
tag_encoding: TagEncoding::Direct,
16391639
tag_field: tag_index,
16401640
variants,

compiler/rustc_typeck/src/check/upvar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
390390

391391
let min_cap_list = match root_var_min_capture_list.get_mut(&var_hir_id) {
392392
None => {
393-
let min_cap_list = vec![ty::CapturedPlace { place: place, info: capture_info }];
393+
let min_cap_list = vec![ty::CapturedPlace { place, info: capture_info }];
394394
root_var_min_capture_list.insert(var_hir_id, min_cap_list);
395395
continue;
396396
}

compiler/rustc_typeck/src/mem_categorization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
459459
kind: ProjectionKind,
460460
) -> PlaceWithHirId<'tcx> {
461461
let mut projections = base_place.place.projections;
462-
projections.push(Projection { kind: kind, ty: ty });
462+
projections.push(Projection { kind, ty });
463463
let ret = PlaceWithHirId::new(
464464
node.hir_id(),
465465
base_place.place.base_ty,

0 commit comments

Comments
 (0)