diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-02-10 14:14:39 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-03-28 16:30:34 +0000 |
| commit | 4b249b062bea6c3ed81e605ccac852ca8ad60986 (patch) | |
| tree | d115df3be94103b435a80989b08f09888c6d1455 /compiler/rustc_infer/src | |
| parent | 4cfaf9a93121f3b4a57f59ebfc1991c6f4b892a8 (diff) | |
| download | rust-4b249b062bea6c3ed81e605ccac852ca8ad60986.tar.gz rust-4b249b062bea6c3ed81e605ccac852ca8ad60986.zip | |
Remove some dead code
Diffstat (limited to 'compiler/rustc_infer/src')
| -rw-r--r-- | compiler/rustc_infer/src/infer/opaque_types.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/opaque_types/table.rs | 10 |
2 files changed, 2 insertions, 14 deletions
diff --git a/compiler/rustc_infer/src/infer/opaque_types.rs b/compiler/rustc_infer/src/infer/opaque_types.rs index 46420fbe0c3..38b092cfd70 100644 --- a/compiler/rustc_infer/src/infer/opaque_types.rs +++ b/compiler/rustc_infer/src/infer/opaque_types.rs @@ -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 diff --git a/compiler/rustc_infer/src/infer/opaque_types/table.rs b/compiler/rustc_infer/src/infer/opaque_types/table.rs index 202afea559c..55da42e98f4 100644 --- a/compiler/rustc_infer/src/infer/opaque_types/table.rs +++ b/compiler/rustc_infer/src/infer/opaque_types/table.rs @@ -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>, |
