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:
parent
dc80ca78b6
commit
7586e79af8
5 changed files with 15 additions and 12 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue