]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_hir/print.rs
Rollup merge of #68416 - Centril:lowering-cleanup-hofs, r=pietroalbini
[rust.git] / src / librustc_hir / print.rs
index 6c7d419395317b950a713df4949ed62c17aa3d2f..b9598c93761466723ec18975943157ecbdebb237 100644 (file)
@@ -631,6 +631,7 @@ pub fn print_item(&mut self, item: &hir::Item<'_>) {
                 unsafety,
                 polarity,
                 defaultness,
+                constness,
                 ref generics,
                 ref of_trait,
                 ref self_ty,
@@ -647,6 +648,10 @@ pub fn print_item(&mut self, item: &hir::Item<'_>) {
                     self.s.space();
                 }
 
+                if constness == ast::Constness::Const {
+                    self.word_nbsp("const");
+                }
+
                 if let hir::ImplPolarity::Negative = polarity {
                     self.s.word("!");
                 }