Remove some dead code

This commit is contained in:
Oli Scherer 2022-02-10 14:14:39 +00:00
parent 4cfaf9a931
commit 4b249b062b
2 changed files with 2 additions and 14 deletions

View File

@ -163,7 +163,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
Ok(_) => span_bug!(
cause.span,
"opaque types are never equal to anything but themselves: {:#?}",
(a, b)
(a.kind(), b.kind())
),
Err(e) => Err(e),
}
@ -450,10 +450,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
trace!(?origin);
origin
}
pub fn opaque_types(&self) -> OpaqueTypeMap<'tcx> {
self.inner.borrow().opaque_type_storage.opaque_types()
}
}
// Visitor that requires that (almost) all regions in the type visited outlive

View File

@ -29,14 +29,6 @@ impl<'tcx> OpaqueTypeStorage<'tcx> {
}
}
pub fn get_decl(&self, key: &OpaqueTypeKey<'tcx>) -> Option<&OpaqueTypeDecl<'tcx>> {
self.opaque_types.get(key)
}
pub fn opaque_types(&self) -> OpaqueTypeMap<'tcx> {
self.opaque_types.clone()
}
#[instrument(level = "debug")]
pub fn take_opaque_types(&mut self) -> OpaqueTypeMap<'tcx> {
std::mem::take(&mut self.opaque_types)
@ -69,7 +61,7 @@ pub struct OpaqueTypeTable<'a, 'tcx> {
impl<'a, 'tcx> OpaqueTypeTable<'a, 'tcx> {
#[instrument(skip(self), level = "debug")]
pub fn register(
pub(crate) fn register(
&mut self,
key: OpaqueTypeKey<'tcx>,
hidden_type: OpaqueHiddenType<'tcx>,