1
Fork 0

hir: Preserve used syntax in TyKind::TraitObject

This commit is contained in:
Vadim Petrochenkov 2021-03-13 15:44:29 +03:00
parent dac96d45af
commit 38ed36bba4
15 changed files with 23 additions and 17 deletions

View file

@ -410,7 +410,10 @@ impl<'a> State<'a> {
}
hir::TyKind::OpaqueDef(..) => self.s.word("/*impl Trait*/"),
hir::TyKind::Path(ref qpath) => self.print_qpath(qpath, false),
hir::TyKind::TraitObject(bounds, ref lifetime) => {
hir::TyKind::TraitObject(bounds, ref lifetime, syntax) => {
if syntax == ast::TraitObjectSyntax::Dyn {
self.word_space("dyn");
}
let mut first = true;
for bound in bounds {
if first {