about summary refs log tree commit diff
path: root/compiler/rustc_hir_pretty
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-04-29 19:59:36 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-05-03 09:14:00 +1000
commit3896ad0acd53fa62cab711d20af8dec1f3e944a1 (patch)
treed0f580ed7271e8282a054820af407688f88c5638 /compiler/rustc_hir_pretty
parent882c74dfcf974d4129b268ca1aef4de28cd6cc4e (diff)
downloadrust-3896ad0acd53fa62cab711d20af8dec1f3e944a1.tar.gz
rust-3896ad0acd53fa62cab711d20af8dec1f3e944a1.zip
Remove opaque type printing.
As far as I can tell, this code is not actually reachable.
Diffstat (limited to 'compiler/rustc_hir_pretty')
-rw-r--r--compiler/rustc_hir_pretty/src/lib.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs
index 4035de95715..f4076e1114b 100644
--- a/compiler/rustc_hir_pretty/src/lib.rs
+++ b/compiler/rustc_hir_pretty/src/lib.rs
@@ -183,7 +183,7 @@ impl<'a> State<'a> {
             Node::Ty(a) => self.print_type(a),
             Node::AssocItemConstraint(a) => self.print_assoc_item_constraint(a),
             Node::TraitRef(a) => self.print_trait_ref(a),
-            Node::OpaqueTy(o) => self.print_opaque_ty(o),
+            Node::OpaqueTy(_) => panic!("cannot print Node::OpaqueTy"),
             Node::Pat(a) => self.print_pat(a),
             Node::TyPat(a) => self.print_ty_pat(a),
             Node::PatField(a) => self.print_patfield(a),
@@ -764,14 +764,6 @@ impl<'a> State<'a> {
         self.print_path(t.path, false);
     }
 
-    fn print_opaque_ty(&mut self, o: &hir::OpaqueTy<'_>) {
-        // FIXME(nnethercote): `cb` and `ib` are unclosed
-        let (_cb, _ib) = self.head("opaque");
-        self.word("{");
-        self.print_bounds("impl", o.bounds);
-        self.word("}");
-    }
-
     fn print_formal_generic_params(&mut self, generic_params: &[hir::GenericParam<'_>]) {
         if !generic_params.is_empty() {
             self.word("for");