Skip to content

Commit 3896ad0

Browse files
committed
Remove opaque type printing.
As far as I can tell, this code is not actually reachable.
1 parent 882c74d commit 3896ad0

File tree

1 file changed

+1
-9
lines changed
  • compiler/rustc_hir_pretty/src

1 file changed

+1
-9
lines changed

compiler/rustc_hir_pretty/src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ impl<'a> State<'a> {
183183
Node::Ty(a) => self.print_type(a),
184184
Node::AssocItemConstraint(a) => self.print_assoc_item_constraint(a),
185185
Node::TraitRef(a) => self.print_trait_ref(a),
186-
Node::OpaqueTy(o) => self.print_opaque_ty(o),
186+
Node::OpaqueTy(_) => panic!("cannot print Node::OpaqueTy"),
187187
Node::Pat(a) => self.print_pat(a),
188188
Node::TyPat(a) => self.print_ty_pat(a),
189189
Node::PatField(a) => self.print_patfield(a),
@@ -764,14 +764,6 @@ impl<'a> State<'a> {
764764
self.print_path(t.path, false);
765765
}
766766

767-
fn print_opaque_ty(&mut self, o: &hir::OpaqueTy<'_>) {
768-
// FIXME(nnethercote): `cb` and `ib` are unclosed
769-
let (_cb, _ib) = self.head("opaque");
770-
self.word("{");
771-
self.print_bounds("impl", o.bounds);
772-
self.word("}");
773-
}
774-
775767
fn print_formal_generic_params(&mut self, generic_params: &[hir::GenericParam<'_>]) {
776768
if !generic_params.is_empty() {
777769
self.word("for");

0 commit comments

Comments
 (0)