Implement dyn Trait syntax
This commit is contained in:
@@ -1049,8 +1049,9 @@ impl<'a> State<'a> {
|
||||
ast::TyKind::Path(Some(ref qself), ref path) => {
|
||||
self.print_qpath(path, qself, false)?
|
||||
}
|
||||
ast::TyKind::TraitObject(ref bounds) => {
|
||||
self.print_bounds("", &bounds[..])?;
|
||||
ast::TyKind::TraitObject(ref bounds, syntax) => {
|
||||
let prefix = if syntax == ast::TraitObjectSyntax::Dyn { "dyn " } else { "" };
|
||||
self.print_bounds(prefix, &bounds[..])?;
|
||||
}
|
||||
ast::TyKind::ImplTrait(ref bounds) => {
|
||||
self.print_bounds("impl ", &bounds[..])?;
|
||||
|
||||
Reference in New Issue
Block a user