about summary refs log tree commit diff
path: root/compiler/rustc_ast_pretty/src/pprust
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-05-23 07:43:50 +0200
committerGitHub <noreply@github.com>2022-05-23 07:43:50 +0200
commitb73f1c77a7006d2e6ddebeb1d8adb33720bb33fb (patch)
treebe1b5820fe109f83774ccf49f1a70c347998c26e /compiler/rustc_ast_pretty/src/pprust
parente5cf3cb97d228f7c5ac691ebf3f754bec5a92852 (diff)
parent7b987e34c083c81a9e70cb1d387759ac98c752c0 (diff)
downloadrust-b73f1c77a7006d2e6ddebeb1d8adb33720bb33fb.tar.gz
rust-b73f1c77a7006d2e6ddebeb1d8adb33720bb33fb.zip
Rollup merge of #97254 - jhpratt:remove-crate-vis, r=cjgillot
Remove feature: `crate` visibility modifier

FCP completed in #53120.
Diffstat (limited to 'compiler/rustc_ast_pretty/src/pprust')
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state/item.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state/item.rs b/compiler/rustc_ast_pretty/src/pprust/state/item.rs
index 0de5e2099fd..67b539a7ad4 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state/item.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state/item.rs
@@ -403,13 +403,9 @@ impl<'a> State<'a> {
     pub(crate) fn print_visibility(&mut self, vis: &ast::Visibility) {
         match vis.kind {
             ast::VisibilityKind::Public => self.word_nbsp("pub"),
-            ast::VisibilityKind::Crate(sugar) => match sugar {
-                ast::CrateSugar::PubCrate => self.word_nbsp("pub(crate)"),
-                ast::CrateSugar::JustCrate => self.word_nbsp("crate"),
-            },
             ast::VisibilityKind::Restricted { ref path, .. } => {
                 let path = Self::to_string(|s| s.print_path(path, false, 0));
-                if path == "self" || path == "super" {
+                if path == "crate" || path == "self" || path == "super" {
                     self.word_nbsp(format!("pub({})", path))
                 } else {
                     self.word_nbsp(format!("pub(in {})", path))