Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 4b249b0

Browse files
committed
Remove some dead code
1 parent 4cfaf9a commit 4b249b0

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

compiler/rustc_infer/src/infer/opaque_types.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
163163
Ok(_) => span_bug!(
164164
cause.span,
165165
"opaque types are never equal to anything but themselves: {:#?}",
166-
(a, b)
166+
(a.kind(), b.kind())
167167
),
168168
Err(e) => Err(e),
169169
}
@@ -450,10 +450,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
450450
trace!(?origin);
451451
origin
452452
}
453-
454-
pub fn opaque_types(&self) -> OpaqueTypeMap<'tcx> {
455-
self.inner.borrow().opaque_type_storage.opaque_types()
456-
}
457453
}
458454

459455
// Visitor that requires that (almost) all regions in the type visited outlive

compiler/rustc_infer/src/infer/opaque_types/table.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ impl<'tcx> OpaqueTypeStorage<'tcx> {
2929
}
3030
}
3131

32-
pub fn get_decl(&self, key: &OpaqueTypeKey<'tcx>) -> Option<&OpaqueTypeDecl<'tcx>> {
33-
self.opaque_types.get(key)
34-
}
35-
36-
pub fn opaque_types(&self) -> OpaqueTypeMap<'tcx> {
37-
self.opaque_types.clone()
38-
}
39-
4032
#[instrument(level = "debug")]
4133
pub fn take_opaque_types(&mut self) -> OpaqueTypeMap<'tcx> {
4234
std::mem::take(&mut self.opaque_types)
@@ -69,7 +61,7 @@ pub struct OpaqueTypeTable<'a, 'tcx> {
6961

7062
impl<'a, 'tcx> OpaqueTypeTable<'a, 'tcx> {
7163
#[instrument(skip(self), level = "debug")]
72-
pub fn register(
64+
pub(crate) fn register(
7365
&mut self,
7466
key: OpaqueTypeKey<'tcx>,
7567
hidden_type: OpaqueHiddenType<'tcx>,

0 commit comments

Comments
 (0)