Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the return type of AstBuilder.stmt_let_typed #35874

Merged
merged 1 commit into from
Oct 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/libsyntax/ext/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub trait AstBuilder {
ident: ast::Ident,
typ: P<ast::Ty>,
ex: P<ast::Expr>)
-> P<ast::Stmt>;
-> ast::Stmt;
fn stmt_let_type_only(&self, span: Span, ty: P<ast::Ty>) -> ast::Stmt;
fn stmt_item(&self, sp: Span, item: P<ast::Item>) -> ast::Stmt;

Expand Down Expand Up @@ -556,7 +556,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
ident: ast::Ident,
typ: P<ast::Ty>,
ex: P<ast::Expr>)
-> P<ast::Stmt> {
-> ast::Stmt {
let pat = if mutbl {
let binding_mode = ast::BindingMode::ByValue(ast::Mutability::Mutable);
self.pat_ident_binding_mode(sp, ident, binding_mode)
Expand All @@ -571,11 +571,11 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
span: sp,
attrs: ast::ThinVec::new(),
});
P(ast::Stmt {
ast::Stmt {
id: ast::DUMMY_NODE_ID,
node: ast::StmtKind::Local(local),
span: sp,
})
}
}

// Generate `let _: Type;`, usually used for type assertions.
Expand Down