Rename some ExtCtxt methods.
The new names are more accurate. Co-authored-by: Scott McMurray <scottmcm@users.noreply.github.com>
This commit is contained in:
@@ -315,12 +315,16 @@ impl<'a> ExtCtxt<'a> {
|
||||
self.expr_lit(sp, ast::LitKind::Bool(value))
|
||||
}
|
||||
|
||||
pub fn expr_vec(&self, sp: Span, exprs: Vec<P<ast::Expr>>) -> P<ast::Expr> {
|
||||
/// `[expr1, expr2, ...]`
|
||||
pub fn expr_array(&self, sp: Span, exprs: Vec<P<ast::Expr>>) -> P<ast::Expr> {
|
||||
self.expr(sp, ast::ExprKind::Array(exprs))
|
||||
}
|
||||
pub fn expr_vec_slice(&self, sp: Span, exprs: Vec<P<ast::Expr>>) -> P<ast::Expr> {
|
||||
self.expr_addr_of(sp, self.expr_vec(sp, exprs))
|
||||
|
||||
/// `&[expr1, expr2, ...]`
|
||||
pub fn expr_array_ref(&self, sp: Span, exprs: Vec<P<ast::Expr>>) -> P<ast::Expr> {
|
||||
self.expr_addr_of(sp, self.expr_array(sp, exprs))
|
||||
}
|
||||
|
||||
pub fn expr_str(&self, sp: Span, s: Symbol) -> P<ast::Expr> {
|
||||
self.expr_lit(sp, ast::LitKind::Str(s, ast::StrStyle::Cooked))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user