Skip to content

Commit 34434eb

Browse files
committed
Fix a few more errors
1 parent d556b6e commit 34434eb

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

compiler/rustc_infer/src/infer/combine.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,8 @@ fn float_unification_error<'tcx>(
776776
TypeError::FloatMismatch(ty::relate::expected_found_bool(a_is_expected, a, b))
777777
}
778778

779-
struct ConstInferUnifier<'cx, 'tcx> {
780-
infcx: &'cx InferCtxt<'cx, 'tcx>,
779+
struct ConstInferUnifier<'a, 'cx, 'tcx> {
780+
infcx: &'a mut InferCtxt<'cx, 'tcx>,
781781

782782
span: Span,
783783

@@ -794,7 +794,7 @@ struct ConstInferUnifier<'cx, 'tcx> {
794794
// We use `TypeRelation` here to propagate `RelateResult` upwards.
795795
//
796796
// Both inputs are expected to be the same.
797-
impl TypeRelation<'tcx> for ConstInferUnifier<'_, 'tcx> {
797+
impl TypeRelation<'tcx> for ConstInferUnifier<'_, '_, 'tcx> {
798798
fn tcx(&self) -> TyCtxt<'tcx> {
799799
self.infcx.tcx
800800
}
@@ -920,8 +920,7 @@ impl TypeRelation<'tcx> for ConstInferUnifier<'_, 'tcx> {
920920

921921
match c.val {
922922
ty::ConstKind::Infer(InferConst::Var(vid)) => {
923-
let mut inner = self.infcx.inner;
924-
let variable_table = &mut inner.const_unification_table();
923+
let mut variable_table = self.infcx.inner.const_unification_table();
925924

926925
// Check if the current unification would end up
927926
// unifying `target_vid` with a const which contains

compiler/rustc_infer/src/infer/equate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ impl TypeRelation<'tcx> for Equate<'_, 'combine, 'infcx, 'tcx> {
7272
return Ok(a);
7373
}
7474

75-
let infcx = self.fields.infcx;
76-
let a = infcx.inner.type_variables().replace_if_possible(a);
77-
let b = infcx.inner.type_variables().replace_if_possible(b);
75+
let inner = &mut self.fields.infcx.inner;
76+
let a = inner.type_variables().replace_if_possible(a);
77+
let b = inner.type_variables().replace_if_possible(b);
7878

7979
debug!("{}.tys: replacements ({:?}, {:?})", self.tag(), a, b);
8080

8181
match (a.kind(), b.kind()) {
8282
(&ty::Infer(TyVar(a_id)), &ty::Infer(TyVar(b_id))) => {
83-
infcx.inner.type_variables().equate(a_id, b_id);
83+
self.fields.infcx.inner.type_variables().equate(a_id, b_id);
8484
}
8585

8686
(&ty::Infer(TyVar(a_id)), _) => {

0 commit comments

Comments
 (0)