Skip to content

Commit a32ccf0

Browse files
Remove At methods that are unused
1 parent 61b3b02 commit a32ccf0

File tree

1 file changed

+0
-41
lines changed
  • compiler/rustc_infer/src/infer

1 file changed

+0
-41
lines changed

compiler/rustc_infer/src/infer/at.rs

-41
Original file line numberDiff line numberDiff line change
@@ -185,30 +185,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
185185
Ok(InferOk { value: (), obligations: op.into_obligations() })
186186
}
187187

188-
/// Equates `expected` and `found` while structurally relating aliases.
189-
/// This should only be used inside of the next generation trait solver
190-
/// when relating rigid aliases.
191-
pub fn eq_structurally_relating_aliases<T>(
192-
self,
193-
expected: T,
194-
actual: T,
195-
) -> InferResult<'tcx, ()>
196-
where
197-
T: ToTrace<'tcx>,
198-
{
199-
assert!(self.infcx.next_trait_solver());
200-
let mut op = TypeRelating::new(
201-
self.infcx,
202-
ToTrace::to_trace(self.cause, expected, actual),
203-
self.param_env,
204-
DefineOpaqueTypes::Yes,
205-
StructurallyRelateAliases::Yes,
206-
ty::Invariant,
207-
);
208-
op.relate(expected, actual)?;
209-
Ok(InferOk { value: (), obligations: op.into_obligations() })
210-
}
211-
212188
pub fn relate<T>(
213189
self,
214190
define_opaque_types: DefineOpaqueTypes,
@@ -294,23 +270,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
294270
let value = op.relate(expected, actual)?;
295271
Ok(InferOk { value, obligations: op.into_obligations() })
296272
}
297-
298-
/// Computes the greatest-lower-bound, or mutual subtype, of two
299-
/// values. As with `lub` order doesn't matter, except for error
300-
/// cases.
301-
pub fn glb<T>(self, expected: T, actual: T) -> InferResult<'tcx, T>
302-
where
303-
T: ToTrace<'tcx>,
304-
{
305-
let mut op = LatticeOp::new(
306-
self.infcx,
307-
ToTrace::to_trace(self.cause, expected, actual),
308-
self.param_env,
309-
LatticeOpKind::Glb,
310-
);
311-
let value = op.relate(expected, actual)?;
312-
Ok(InferOk { value, obligations: op.into_obligations() })
313-
}
314273
}
315274

316275
impl<'tcx> ToTrace<'tcx> for ImplSubject<'tcx> {

0 commit comments

Comments
 (0)