]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #41345 - frewsxcv:rollup, r=frewsxcv
authorbors <bors@rust-lang.org>
Mon, 17 Apr 2017 17:56:29 +0000 (17:56 +0000)
committerbors <bors@rust-lang.org>
Mon, 17 Apr 2017 17:56:29 +0000 (17:56 +0000)
Rollup of 3 pull requests

- Successful merges: #41012, #41280, #41290
- Failed merges:

1  2 
src/libsyntax/parse/parser.rs

index ab4ac6f1b91ee43ea6fa870d6f78ea26cc218a33,31669e1bbe3a7d3ea83e07e78f0350bf601f3c03..3e71c0f0f68e3c63bc01da9d4df91aaa9824a5ef
@@@ -4066,7 -4066,7 +4066,7 @@@ impl<'a> Parser<'a> 
          }).emit();
      }
  
 -    // Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+`.
 +    // Parse bounds of a type parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
      // BOUND = TY_BOUND | LT_BOUND
      // LT_BOUND = LIFETIME (e.g. `'a`)
      // TY_BOUND = [?] [for<LT_PARAM_DEFS>] SIMPLE_PATH (e.g. `?for<'a: 'b> m::Trait<'a>`)
          self.parse_ty_param_bounds_common(true)
      }
  
 -    // Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+`.
 +    // Parse bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
      // BOUND = LT_BOUND (e.g. `'a`)
      fn parse_lt_param_bounds(&mut self) -> Vec<Lifetime> {
          let mut lifetimes = Vec::new();
      /// and `pub(super)` for `pub(in super)`.  If the following element can't be a tuple (i.e. it's
      /// a function definition, it's not a tuple struct field) and the contents within the parens
      /// isn't valid, emit a proper diagnostic.
-     fn parse_visibility(&mut self, can_take_tuple: bool) -> PResult<'a, Visibility> {
+     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)
          }