about summary refs log tree commit diff
path: root/compiler/rustc_ast_pretty/src/pprust/state.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-01-16 17:22:57 +0000
committerbors <bors@rust-lang.org>2022-01-16 17:22:57 +0000
commitbd3cb52565faab2755ff1bdb54d88bc91f47b4b9 (patch)
tree62cae2960feaabe7d5bd0362032102cd48621b3d /compiler/rustc_ast_pretty/src/pprust/state.rs
parent48e89b00caa94829a5f07e0f1ecb33bf37431244 (diff)
parent2b6b49e1d7f1d818b48dbbca11c49f672e25e6ca (diff)
downloadrust-bd3cb52565faab2755ff1bdb54d88bc91f47b4b9.tar.gz
rust-bd3cb52565faab2755ff1bdb54d88bc91f47b4b9.zip
Auto merge of #92970 - matthiaskrgr:rollup-tcx7cfb, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #92487 (Fix unclosed boxes in pretty printing of TraitAlias)
 - #92581 (ARMv6K Horizon - Enable default libraries)
 - #92619 (Add diagnostic items for macros)
 - #92635 (rustdoc: Yet more intra-doc links cleanup)
 - #92646 (feat: rustc_pass_by_value lint attribute)
 - #92706 (Clarify explicitly that BTree{Map,Set} are ordered.)
 - #92710 (Include Projections when elaborating TypeOutlives)
 - #92746 (Parse `Ty?` as `Option<Ty>` and provide structured suggestion)
 - #92792 (rustdoc: fix intra-link for generic trait impls)
 - #92814 (remove unused FIXME)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_ast_pretty/src/pprust/state.rs')
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs
index fa9a20f2e03..32a4a0751d8 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state.rs
@@ -1357,9 +1357,7 @@ impl<'a> State<'a> {
                 self.bclose(item.span, empty);
             }
             ast::ItemKind::TraitAlias(ref generics, ref bounds) => {
-                self.head("");
-                self.print_visibility(&item.vis);
-                self.word_nbsp("trait");
+                self.head(visibility_qualified(&item.vis, "trait"));
                 self.print_ident(item.ident);
                 self.print_generic_params(&generics.params);
                 let mut real_bounds = Vec::with_capacity(bounds.len());
@@ -1377,6 +1375,8 @@ impl<'a> State<'a> {
                 self.print_type_bounds("=", &real_bounds);
                 self.print_where_clause(&generics.where_clause);
                 self.word(";");
+                self.end(); // end inner head-block
+                self.end(); // end outer head-block
             }
             ast::ItemKind::MacCall(ref mac) => {
                 self.print_mac(mac);