Skip to content

Commit 245abc4

Browse files
committed
Fix type errors cause during rebasing
1 parent 05dc5e9 commit 245abc4

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/librustc_mir/borrow_check/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
16951695
}
16961696
}
16971697
let mut visitor = FakeReadCauseFinder { place, cause: None };
1698-
visitor.visit_body(&self.body);
1698+
visitor.visit_body(self.body);
16991699
match visitor.cause {
17001700
Some(FakeReadCause::ForMatchGuard) => Some("match guard"),
17011701
Some(FakeReadCause::ForIndex) => Some("indexing expression"),

src/librustc_mir/transform/promote_consts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ use crate::transform::check_consts::{qualifs, Item, ConstKind, is_lang_panic_fn}
4141
/// newly created `StaticKind::Promoted`.
4242
#[derive(Default)]
4343
pub struct PromoteTemps<'tcx> {
44-
pub promoted_fragments: Cell<IndexVec<Promoted, Body<'tcx>>>,
44+
pub promoted_fragments: Cell<IndexVec<Promoted, BodyCache<'tcx>>>,
4545
}
4646

4747
impl<'tcx> MirPass<'tcx> for PromoteTemps<'tcx> {
48-
fn run_pass(&self, tcx: TyCtxt<'tcx>, src: MirSource<'tcx>, body: &mut Body<'tcx>) {
48+
fn run_pass(&self, tcx: TyCtxt<'tcx>, src: MirSource<'tcx>, body: &mut BodyCache<'tcx>) {
4949
// There's not really any point in promoting errorful MIR.
5050
//
5151
// This does not include MIR that failed const-checking, which we still try to promote.

src/librustc_mir/transform/uninhabited_enum_branching.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
33
use crate::transform::{MirPass, MirSource};
44
use rustc::mir::{
5-
BasicBlock, BasicBlockData, Body, Local, Operand, Rvalue, StatementKind, TerminatorKind,
5+
BasicBlock, BasicBlockData, Body, BodyCache, Local, Operand, Rvalue, StatementKind,
6+
TerminatorKind,
67
};
78
use rustc::ty::layout::{Abi, TyLayout, Variants};
89
use rustc::ty::{Ty, TyCtxt};
@@ -65,7 +66,7 @@ fn variant_discriminants<'tcx>(
6566
}
6667

6768
impl<'tcx> MirPass<'tcx> for UninhabitedEnumBranching {
68-
fn run_pass(&self, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'tcx>) {
69+
fn run_pass(&self, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut BodyCache<'tcx>) {
6970
if source.promoted.is_some() {
7071
return;
7172
}

0 commit comments

Comments
 (0)