about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_expand/src/build.rs')
-rw-r--r--compiler/rustc_expand/src/build.rs4
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,