+ match ty.sty {
+ // Print all nominal types as paths (unlike `pretty_print_type`).
+ ty::FnDef(def_id, substs) |
+ ty::Opaque(def_id, substs) |
+ ty::Projection(ty::ProjectionTy { item_def_id: def_id, substs }) |
+ ty::UnnormalizedProjection(ty::ProjectionTy { item_def_id: def_id, substs }) |
+ ty::Closure(def_id, ty::ClosureSubsts { substs }) |
+ ty::Generator(def_id, ty::GeneratorSubsts { substs }, _) => {
+ self.print_def_path(def_id, Some(substs), iter::empty())
+ }
+ _ => self.pretty_print_type(ty),
+ }