1
Fork 0

Remove feature: crate visibility modifier

This commit is contained in:
Jacob Pratt 2022-05-21 13:53:26 -04:00
parent 6970246886
commit 8cece636b2
No known key found for this signature in database
GPG key ID: B80E19E4662B5AA4
17 changed files with 19 additions and 116 deletions

View file

@ -403,10 +403,7 @@ 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::Crate => self.word_nbsp("pub(crate)"),
ast::VisibilityKind::Restricted { ref path, .. } => {
let path = Self::to_string(|s| s.print_path(path, false, 0));
if path == "self" || path == "super" {