Remove mention of 'priv'; visibility is either PUB or nothing
This commit is contained in:
parent
899d4180ef
commit
31b7001b49
2 changed files with 2 additions and 2 deletions
|
@ -899,7 +899,7 @@ fn convert_item(ccx: &CrateCtxt, it: &ast::Item) {
|
|||
if let ast::MethodImplItem(ref sig, _) = ii.node {
|
||||
// if the method specifies a visibility, use that, otherwise
|
||||
// inherit the visibility from the impl (so `foo` in `pub impl
|
||||
// { fn foo(); }` is public, but private in `priv impl { fn
|
||||
// { fn foo(); }` is public, but private in `impl { fn
|
||||
// foo(); }`).
|
||||
let method_vis = ii.vis.inherit_from(parent_visibility);
|
||||
Some((sig, ii.id, ii.ident, method_vis, ii.span))
|
||||
|
|
|
@ -4772,7 +4772,7 @@ impl<'a> Parser<'a> {
|
|||
return self.parse_single_struct_field(Inherited, attrs);
|
||||
}
|
||||
|
||||
/// Parse visibility: PUB, PRIV, or nothing
|
||||
/// Parse visibility: PUB or nothing
|
||||
fn parse_visibility(&mut self) -> PResult<Visibility> {
|
||||
if try!(self.eat_keyword(keywords::Pub)) { Ok(Public) }
|
||||
else { Ok(Inherited) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue