Skip to content

Commit 3f05589

Browse files
committed
Remove unused ExpCtxt methods.
1 parent 7c6d363 commit 3f05589

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

compiler/rustc_expand/src/build.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,6 @@ impl<'a> ExtCtxt<'a> {
175175
ast::Stmt { id: ast::DUMMY_NODE_ID, span: expr.span, kind: ast::StmtKind::Expr(expr) }
176176
}
177177

178-
pub fn stmt_let_pat(&self, sp: Span, pat: P<ast::Pat>, ex: P<ast::Expr>) -> ast::Stmt {
179-
let local = P(ast::Local {
180-
pat,
181-
ty: None,
182-
id: ast::DUMMY_NODE_ID,
183-
kind: LocalKind::Init(ex),
184-
span: sp,
185-
colon_sp: None,
186-
attrs: AttrVec::new(),
187-
tokens: None,
188-
});
189-
self.stmt_local(local, sp)
190-
}
191-
192178
pub fn stmt_let(&self, sp: Span, mutbl: bool, ident: Ident, ex: P<ast::Expr>) -> ast::Stmt {
193179
self.stmt_let_ty(sp, mutbl, ident, None, ex)
194180
}
@@ -278,10 +264,6 @@ impl<'a> ExtCtxt<'a> {
278264
self.expr_ident(span, Ident::with_dummy_span(kw::SelfLower))
279265
}
280266

281-
pub fn expr_field(&self, span: Span, expr: P<Expr>, field: Ident) -> P<ast::Expr> {
282-
self.expr(span, ast::ExprKind::Field(expr, field))
283-
}
284-
285267
pub fn expr_macro_call(&self, span: Span, call: P<ast::MacCall>) -> P<ast::Expr> {
286268
self.expr(span, ast::ExprKind::MacCall(call))
287269
}
@@ -394,11 +376,6 @@ impl<'a> ExtCtxt<'a> {
394376
self.expr(span, ast::ExprKind::Lit(lit))
395377
}
396378

397-
pub fn expr_char(&self, span: Span, ch: char) -> P<ast::Expr> {
398-
let lit = token::Lit::new(token::Char, literal::escape_char_symbol(ch), None);
399-
self.expr(span, ast::ExprKind::Lit(lit))
400-
}
401-
402379
pub fn expr_byte_str(&self, span: Span, bytes: Vec<u8>) -> P<ast::Expr> {
403380
let lit = token::Lit::new(token::ByteStr, literal::escape_byte_str_symbol(&bytes), None);
404381
self.expr(span, ast::ExprKind::Lit(lit))
@@ -414,10 +391,6 @@ impl<'a> ExtCtxt<'a> {
414391
self.expr_addr_of(sp, self.expr_array(sp, exprs))
415392
}
416393

417-
pub fn expr_cast(&self, sp: Span, expr: P<ast::Expr>, ty: P<ast::Ty>) -> P<ast::Expr> {
418-
self.expr(sp, ast::ExprKind::Cast(expr, ty))
419-
}
420-
421394
pub fn expr_some(&self, sp: Span, expr: P<ast::Expr>) -> P<ast::Expr> {
422395
let some = self.std_path(&[sym::option, sym::Option, sym::Some]);
423396
self.expr_call_global(sp, some, thin_vec![expr])

0 commit comments

Comments
 (0)