@@ -12,7 +12,7 @@ pub struct Renderer<'cx> {
1212 writer : Ident ,
1313 result : Ident ,
1414 loop_label : Vec < TokenTree > ,
15- stmts : Vec < P < Stmt > > ,
15+ stmts : Vec < Stmt > ,
1616 tail : String ,
1717}
1818
@@ -79,13 +79,13 @@ impl<'cx> Renderer<'cx> {
7979 }
8080
8181 /// Reifies the `Renderer` into a raw list of statements.
82- pub fn into_stmts ( mut self ) -> Vec < P < Stmt > > {
82+ pub fn into_stmts ( mut self ) -> Vec < Stmt > {
8383 let Renderer { stmts, .. } = { self . flush ( ) ; self } ;
8484 stmts
8585 }
8686
8787 /// Pushes a statement, flushing the tail buffer in the process.
88- fn push ( & mut self , stmt : P < Stmt > ) {
88+ fn push ( & mut self , stmt : Stmt ) {
8989 self . flush ( ) ;
9090 self . stmts . push ( stmt) ;
9191 }
@@ -96,7 +96,7 @@ impl<'cx> Renderer<'cx> {
9696 }
9797
9898 /// Wraps an expression in a `try!` call.
99- fn wrap_try ( & self , expr : P < Expr > ) -> P < Stmt > {
99+ fn wrap_try ( & self , expr : P < Expr > ) -> Stmt {
100100 let result = self . result ;
101101 let loop_label = & self . loop_label ;
102102 quote_stmt ! (
@@ -157,8 +157,8 @@ impl<'cx> Renderer<'cx> {
157157 ///
158158 /// The condition is a token tree (not an expression) so we don't
159159 /// need to special-case `if let`.
160- pub fn emit_if ( & mut self , if_cond : Vec < TokenTree > , if_body : Vec < P < Stmt > > ,
161- else_body : Option < Vec < P < Stmt > > > ) {
160+ pub fn emit_if ( & mut self , if_cond : Vec < TokenTree > , if_body : Vec < Stmt > ,
161+ else_body : Option < Vec < Stmt > > ) {
162162 let stmt = match else_body {
163163 None => quote_stmt ! ( self . cx, if $if_cond { $if_body } ) ,
164164 Some ( else_body) =>
@@ -167,7 +167,7 @@ impl<'cx> Renderer<'cx> {
167167 self . push ( stmt) ;
168168 }
169169
170- pub fn emit_for ( & mut self , pattern : P < Pat > , iterable : P < Expr > , body : Vec < P < Stmt > > ) {
170+ pub fn emit_for ( & mut self , pattern : P < Pat > , iterable : P < Expr > , body : Vec < Stmt > ) {
171171 let stmt = quote_stmt ! ( self . cx, for $pattern in $iterable { $body } ) . unwrap ( ) ;
172172 self . push ( stmt) ;
173173 }
0 commit comments