diff options
| author | bors <bors@rust-lang.org> | 2017-12-17 04:23:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-12-17 04:23:55 +0000 |
| commit | 53a6d14e5bb8b1915a5f0b9371bbf0da934ed052 (patch) | |
| tree | 85a7fbce9c5bf3beb9746628800a9fa9561699d9 /src/libsyntax/parse | |
| parent | 35376587c802f3f142c63a443422184fd0ad40bd (diff) | |
| parent | a4aa26aaa076ce732f2c26803d9d48459aa2046a (diff) | |
| download | rust-53a6d14e5bb8b1915a5f0b9371bbf0da934ed052.tar.gz rust-53a6d14e5bb8b1915a5f0b9371bbf0da934ed052.zip | |
Auto merge of #46778 - petrochenkov:nounwrap, r=arielb1
syntax: Rename `P::unwrap` into something less alarming
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2158c4a4fe4..09a65046e20 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1456,7 +1456,7 @@ impl<'a> Parser<'a> { self.expect(&token::CloseDelim(token::Paren))?; if ts.len() == 1 && !last_comma { - let ty = ts.into_iter().nth(0).unwrap().unwrap(); + let ty = ts.into_iter().nth(0).unwrap().into_inner(); let maybe_bounds = allow_plus && self.token == token::BinOp(token::Plus); match ty.node { // `(TY_BOUND_NOPAREN) + BOUND + ...`. @@ -6077,7 +6077,7 @@ impl<'a> Parser<'a> { fn parse_item_(&mut self, attrs: Vec<Attribute>, macros_allowed: bool, attributes_allowed: bool) -> PResult<'a, Option<P<Item>>> { maybe_whole!(self, NtItem, |item| { - let mut item = item.unwrap(); + let mut item = item.into_inner(); let mut attrs = attrs; mem::swap(&mut item.attrs, &mut attrs); item.attrs.extend(attrs); |
