]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_expand/src/build.rs
Rollup merge of #104263 - albertlarsan68:add-ilog2-to-leading-zeroes-docs, r=scottmcm
[rust.git] / compiler / rustc_expand / src / build.rs
index 50d2be3cee5e0b3d71cbb0c861f14d78a4fdbbe4..0952e65cfee3d590b3643a1d2d96a33acfacd190 100644 (file)
@@ -252,6 +252,10 @@ pub fn expr_self(&self, span: Span) -> P<ast::Expr> {
         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,