1
Fork 0

Remove dead args from functions

This commit is contained in:
Michael Goulet 2024-02-02 22:45:25 +00:00
parent 11f32b73e0
commit 6b2a8249c1
22 changed files with 32 additions and 124 deletions

View file

@ -862,7 +862,7 @@ impl<'tcx> InferCtxt<'tcx> {
}
#[instrument(skip(self, snapshot), level = "debug")]
fn rollback_to(&self, cause: &str, snapshot: CombinedSnapshot<'tcx>) {
fn rollback_to(&self, snapshot: CombinedSnapshot<'tcx>) {
let CombinedSnapshot { undo_snapshot, region_constraints_snapshot, universe } = snapshot;
self.universe.set(universe);
@ -894,7 +894,7 @@ impl<'tcx> InferCtxt<'tcx> {
self.commit_from(snapshot);
}
Err(_) => {
self.rollback_to("commit_if_ok -- error", snapshot);
self.rollback_to(snapshot);
}
}
r
@ -908,7 +908,7 @@ impl<'tcx> InferCtxt<'tcx> {
{
let snapshot = self.start_snapshot();
let r = f(&snapshot);
self.rollback_to("probe", snapshot);
self.rollback_to(snapshot);
r
}

View file

@ -327,7 +327,6 @@ impl<'tcx> InferCtxt<'tcx> {
#[instrument(level = "debug", skip(self))]
pub fn register_member_constraints(
&self,
param_env: ty::ParamEnv<'tcx>,
opaque_type_key: OpaqueTypeKey<'tcx>,
concrete_ty: Ty<'tcx>,
span: Span,

View file

@ -225,11 +225,11 @@ impl<'tcx> InferCtxt<'tcx> {
}
(ty::ConstKind::Infer(InferConst::Var(vid)), _) => {
return self.unify_const_variable(vid, b, relation.param_env());
return self.unify_const_variable(vid, b);
}
(_, ty::ConstKind::Infer(InferConst::Var(vid))) => {
return self.unify_const_variable(vid, a, relation.param_env());
return self.unify_const_variable(vid, a);
}
(ty::ConstKind::Infer(InferConst::EffectVar(vid)), _) => {
@ -310,7 +310,6 @@ impl<'tcx> InferCtxt<'tcx> {
&self,
target_vid: ty::ConstVid,
ct: ty::Const<'tcx>,
param_env: ty::ParamEnv<'tcx>,
) -> RelateResult<'tcx, ty::Const<'tcx>> {
let span = match self.inner.borrow_mut().const_unification_table().probe_value(target_vid) {
ConstVariableValue::Known { value } => {