rustc: Remove private enum variants
This removes the `priv` keyword from the language and removes private enum variants as a result. The remaining use cases of private enum variants were all updated to be a struct with one private field that is a private enum. RFC: 0006-remove-priv Closes #13535
This commit is contained in:
parent
83351fa02e
commit
5cfbc0e7ae
27 changed files with 31 additions and 198 deletions
|
@ -230,7 +230,6 @@ pub fn variant_to_str(var: &ast::Variant) -> ~str {
|
|||
|
||||
pub fn visibility_qualified(vis: ast::Visibility, s: &str) -> ~str {
|
||||
match vis {
|
||||
ast::Private => format!("priv {}", s),
|
||||
ast::Public => format!("pub {}", s),
|
||||
ast::Inherited => s.to_owned()
|
||||
}
|
||||
|
@ -731,7 +730,6 @@ impl<'a> State<'a> {
|
|||
|
||||
pub fn print_visibility(&mut self, vis: ast::Visibility) -> IoResult<()> {
|
||||
match vis {
|
||||
ast::Private => self.word_nbsp("priv"),
|
||||
ast::Public => self.word_nbsp("pub"),
|
||||
ast::Inherited => Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue