diff options
| author | bors <bors@rust-lang.org> | 2018-11-09 06:56:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-11-09 06:56:25 +0000 |
| commit | 36a50c29f6c5c386fba6ab685818755ac55152e5 (patch) | |
| tree | 67c50601ac77481c7b2a8410c1c67f32fef2081f /src/libsyntax | |
| parent | 653da4fd006c97625247acd7e076d0782cdc149b (diff) | |
| parent | d293d1eea0b41e4ff65e8027e74eca9efd2dc7df (diff) | |
| download | rust-36a50c29f6c5c386fba6ab685818755ac55152e5.tar.gz rust-36a50c29f6c5c386fba6ab685818755ac55152e5.zip | |
Auto merge of #55803 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 17 pull requests Successful merges: - #55576 (Clarify error message for -C opt-level) - #55633 (Support memcpy/memmove with differing src/dst alignment) - #55638 (Fix ICE in msg_span_from_free_region on ReEmpty) - #55659 (rustc: Delete grouping logic from the musl target) - #55719 (Sidestep link error from rustfix'ed code by using a *defined* static.) - #55736 (Elide anon lifetimes in conflicting impl note) - #55739 (Consume optimization fuel from the MIR inliner) - #55742 (Avoid panic when matching function call) - #55753 (borrow_set: remove a helper function and a clone it uses) - #55755 (Improve creation of 3 IndexVecs) - #55758 ([regression - rust2018]: unused_mut lint false positives on nightly) - #55760 (Remove intermediate font specs) - #55761 (mir: remove a hacky recursive helper function) - #55774 (wasm32-unknown-emscripten expects the rust_eh_personality symbol) - #55777 (Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.) - #55783 (Deprecate mpsc channel selection) - #55788 (rustc: Request ansi colors if stderr isn't a tty) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/base.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/build.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index cfedda18a7e..2f17bc0548c 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1086,7 +1086,7 @@ pub enum ExprKind { /// A unary operation (For example: `!x`, `*x`) Unary(UnOp, P<Expr>), /// A literal (For example: `1`, `"foo"`) - Lit(P<Lit>), + Lit(Lit), /// A cast (`foo as f64`) Cast(P<Expr>, P<Ty>), Type(P<Expr>, P<Ty>), diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 1701c8da2c5..88ee80e6088 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -491,7 +491,7 @@ impl DummyResult { pub fn raw_expr(sp: Span) -> P<ast::Expr> { P(ast::Expr { id: ast::DUMMY_NODE_ID, - node: ast::ExprKind::Lit(P(source_map::respan(sp, ast::LitKind::Bool(false)))), + node: ast::ExprKind::Lit(source_map::respan(sp, ast::LitKind::Bool(false))), span: sp, attrs: ThinVec::new(), }) diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 7928ec1606b..cacec867cf1 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -695,7 +695,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { } fn expr_lit(&self, sp: Span, lit: ast::LitKind) -> P<ast::Expr> { - self.expr(sp, ast::ExprKind::Lit(P(respan(sp, lit)))) + self.expr(sp, ast::ExprKind::Lit(respan(sp, lit))) } fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr> { self.expr_lit(span, ast::LitKind::Int(i as u128, diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 37800a334c6..c6e0adbb5a4 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -274,7 +274,7 @@ pub mod rt { // FIXME: This is wrong P(ast::Expr { id: ast::DUMMY_NODE_ID, - node: ast::ExprKind::Lit(P(self.clone())), + node: ast::ExprKind::Lit(self.clone()), span: DUMMY_SP, attrs: ThinVec::new(), }).to_tokens(cx) @@ -305,7 +305,7 @@ pub mod rt { let lit = ast::LitKind::Int(val as u128, ast::LitIntType::Signed($tag)); let lit = P(ast::Expr { id: ast::DUMMY_NODE_ID, - node: ast::ExprKind::Lit(P(dummy_spanned(lit))), + node: ast::ExprKind::Lit(dummy_spanned(lit)), span: DUMMY_SP, attrs: ThinVec::new(), }); diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c8a686da179..68e7e40c43e 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1989,7 +1989,7 @@ impl<'a> Parser<'a> { let minus_lo = self.span; let minus_present = self.eat(&token::BinOp(token::Minus)); let lo = self.span; - let literal = P(self.parse_lit()?); + let literal = self.parse_lit()?; let hi = self.prev_span; let expr = self.mk_expr(lo.to(hi), ExprKind::Lit(literal), ThinVec::new()); |
