@@ -175,20 +175,6 @@ impl<'a> ExtCtxt<'a> {
175
175
ast:: Stmt { id : ast:: DUMMY_NODE_ID , span : expr. span , kind : ast:: StmtKind :: Expr ( expr) }
176
176
}
177
177
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
-
192
178
pub fn stmt_let ( & self , sp : Span , mutbl : bool , ident : Ident , ex : P < ast:: Expr > ) -> ast:: Stmt {
193
179
self . stmt_let_ty ( sp, mutbl, ident, None , ex)
194
180
}
@@ -278,10 +264,6 @@ impl<'a> ExtCtxt<'a> {
278
264
self . expr_ident ( span, Ident :: with_dummy_span ( kw:: SelfLower ) )
279
265
}
280
266
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
-
285
267
pub fn expr_macro_call ( & self , span : Span , call : P < ast:: MacCall > ) -> P < ast:: Expr > {
286
268
self . expr ( span, ast:: ExprKind :: MacCall ( call) )
287
269
}
@@ -394,11 +376,6 @@ impl<'a> ExtCtxt<'a> {
394
376
self . expr ( span, ast:: ExprKind :: Lit ( lit) )
395
377
}
396
378
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
-
402
379
pub fn expr_byte_str ( & self , span : Span , bytes : Vec < u8 > ) -> P < ast:: Expr > {
403
380
let lit = token:: Lit :: new ( token:: ByteStr , literal:: escape_byte_str_symbol ( & bytes) , None ) ;
404
381
self . expr ( span, ast:: ExprKind :: Lit ( lit) )
@@ -414,10 +391,6 @@ impl<'a> ExtCtxt<'a> {
414
391
self . expr_addr_of ( sp, self . expr_array ( sp, exprs) )
415
392
}
416
393
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
-
421
394
pub fn expr_some ( & self , sp : Span , expr : P < ast:: Expr > ) -> P < ast:: Expr > {
422
395
let some = self . std_path ( & [ sym:: option, sym:: Option , sym:: Some ] ) ;
423
396
self . expr_call_global ( sp, some, thin_vec ! [ expr] )
0 commit comments