Skip to content

Commit 6123478

Browse files
committed
Fix issues caused during rebasing
1 parent 38bd3a2 commit 6123478

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/librustc_codegen_ssa/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
156156
}).collect();
157157

158158
let (landing_pads, funclets) = create_funclets(&mir, &mut bx, &cleanup_kinds, &block_bxs);
159-
let mir_body: &Body<'_> = &mir;
159+
let mir_body: &Body<'_> = mir.body();
160160
let mut fx = FunctionCx {
161161
instance,
162162
mir,

src/librustc_mir/shim.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ fn build_drop_shim<'tcx>(
199199
block(&mut blocks, TerminatorKind::Goto { target: return_block });
200200
block(&mut blocks, TerminatorKind::Return);
201201

202-
let mut body = new_body(
202+
let body = new_body(
203203
blocks,
204204
local_decls_for_sig(&sig, span),
205205
sig.inputs().len(),
@@ -914,7 +914,7 @@ pub fn build_adt_ctor(tcx: TyCtxt<'_>, ctor_id: DefId) -> &BodyCache<'_> {
914914
is_cleanup: false
915915
};
916916

917-
let mut body = new_body(
917+
let body = new_body(
918918
IndexVec::from_elem_n(start_block, 1),
919919
local_decls,
920920
sig.inputs().len(),

src/librustc_mir/transform/promote_consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<'tcx> MirPass<'tcx> for PromoteTemps<'tcx> {
6464
let (temps, all_candidates) = collect_temps_and_candidates(tcx, body, &mut rpo);
6565

6666
let promotable_candidates
67-
= validate_candidates(tcx, read_only, def_id, &temps, &all_candidates);
67+
= validate_candidates(tcx, read_only!(body), def_id, &temps, &all_candidates);
6868

6969
let promoted = promote_candidates(def_id, body, tcx, temps, promotable_candidates);
7070
self.promoted_fragments.set(promoted);

src/librustc_mir/util/def_use.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl DefUseAnalysis {
6262
let mut visitor = MutateUseVisitor::new(local, new_local, tcx);
6363
let info = &self.info[local];
6464
for place_use in &info.defs_and_uses {
65-
visitor.visit_location(body_cache, place_use.location)
65+
visitor.visit_location(body, place_use.location)
6666
}
6767
// Update debuginfo as well, alongside defs/uses.
6868
for &i in &info.var_debug_info_indices {

0 commit comments

Comments
 (0)