]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_expand/src/build.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / compiler / rustc_expand / src / build.rs
index 50d2be3cee5e0b3d71cbb0c861f14d78a4fdbbe4..0952e65cfee3d590b3643a1d2d96a33acfacd190 100644 (file)
@@ -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,