parse interpolated visibility tokens

This commit is contained in:
Alex Burka 2017-04-02 04:46:51 +00:00
parent 06411c4769
commit 16010c2f50
3 changed files with 18 additions and 3 deletions

View file

@ -5057,6 +5057,8 @@ impl<'a> Parser<'a> {
/// a function definition, it's not a tuple struct field) and the contents within the parens
/// isn't valid, emit a proper diagnostic.
pub fn parse_visibility(&mut self, can_take_tuple: bool) -> PResult<'a, Visibility> {
maybe_whole!(self, NtVis, |x| x);
if !self.eat_keyword(keywords::Pub) {
return Ok(Visibility::Inherited)
}