diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-08-08 16:17:08 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-09-27 13:13:08 +0200 |
| commit | 9bec0de3977e589fb92fc85ce9bc8fa99c3691f6 (patch) | |
| tree | ba52134752254b6fed558b11f15794a04f5242b5 /compiler/rustc_expand/src/build.rs | |
| parent | d9297d22ad9edc2b56f0dd8734c1187a0c88be69 (diff) | |
| download | rust-9bec0de3977e589fb92fc85ce9bc8fa99c3691f6.tar.gz rust-9bec0de3977e589fb92fc85ce9bc8fa99c3691f6.zip | |
Rewrite and refactor format_args!() builtin macro.
Diffstat (limited to 'compiler/rustc_expand/src/build.rs')
| -rw-r--r-- | compiler/rustc_expand/src/build.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index 50d2be3cee5..0952e65cfee 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -252,6 +252,10 @@ impl<'a> ExtCtxt<'a> { self.expr_ident(span, Ident::with_dummy_span(kw::SelfLower)) } + pub fn expr_field(&self, span: Span, expr: P<Expr>, field: Ident) -> P<ast::Expr> { + self.expr(span, ast::ExprKind::Field(expr, field)) + } + pub fn expr_binary( &self, sp: Span, |
