Skip to content

Commit

Permalink
Remove At methods that are unused
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Oct 7, 2024
1 parent 501bff7 commit 4b516eb
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions compiler/rustc_infer/src/infer/at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,30 +185,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
Ok(InferOk { value: (), obligations: op.into_obligations() })
}

/// Equates `expected` and `found` while structurally relating aliases.
/// This should only be used inside of the next generation trait solver
/// when relating rigid aliases.
pub fn eq_structurally_relating_aliases<T>(
self,
expected: T,
actual: T,
) -> InferResult<'tcx, ()>
where
T: ToTrace<'tcx>,
{
assert!(self.infcx.next_trait_solver());
let mut op = TypeRelating::new(
self.infcx,
ToTrace::to_trace(self.cause, expected, actual),
self.param_env,
DefineOpaqueTypes::Yes,
StructurallyRelateAliases::Yes,
ty::Invariant,
);
op.relate(expected, actual)?;
Ok(InferOk { value: (), obligations: op.into_obligations() })
}

pub fn relate<T>(
self,
define_opaque_types: DefineOpaqueTypes,
Expand Down Expand Up @@ -294,23 +270,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
let value = op.relate(expected, actual)?;
Ok(InferOk { value, obligations: op.into_obligations() })
}

/// Computes the greatest-lower-bound, or mutual subtype, of two
/// values. As with `lub` order doesn't matter, except for error
/// cases.
pub fn glb<T>(self, expected: T, actual: T) -> InferResult<'tcx, T>
where
T: ToTrace<'tcx>,
{
let mut op = LatticeOp::new(
self.infcx,
ToTrace::to_trace(self.cause, expected, actual),
self.param_env,
LatticeOpKind::Glb,
);
let value = op.relate(expected, actual)?;
Ok(InferOk { value, obligations: op.into_obligations() })
}
}

impl<'tcx> ToTrace<'tcx> for ImplSubject<'tcx> {
Expand Down

0 comments on commit 4b516eb

Please sign in to comment.