Skip to content

Commit 1a90808

Browse files
committed
Update Rust
See rust-lang/rust#31583
1 parent 4e7bd32 commit 1a90808

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

maud_macros/src/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ impl<'cx, 'i> Parser<'cx, 'i> {
559559
}
560560

561561
/// Parses the given token tree, returning a vector of statements.
562-
fn block(&mut self, sp: Span, tts: &[TokenTree]) -> PResult<Vec<P<Stmt>>> {
562+
fn block(&mut self, sp: Span, tts: &[TokenTree]) -> PResult<Vec<Stmt>> {
563563
let mut parse = Parser {
564564
in_attr: self.in_attr,
565565
input: tts,

maud_macros/src/render.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)