Skip to content

syntax: Use let _ in #[derive(Debug)] #29727

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

Merged
merged 1 commit into from
Nov 11, 2015

Conversation

alexcrichton
Copy link
Member

This should help avoid triggering the unused_results lint which can frequently
be turned on.

Closes #29710

@alexcrichton
Copy link
Member Author

r? @sfackler

@rust-highfive rust-highfive assigned sfackler and unassigned pnkfelix Nov 9, 2015
@rust-highfive
Copy link
Contributor

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -135,3 +138,19 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span,
let block = cx.block(span, stmts, Some(expr));
cx.expr_block(block)
}

fn stmt_let_undescore(sp: Span, expr: P<ast::Expr>) -> P<ast::Stmt> {
let local = P(ast::Local {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there not anything on the AstBuilder extension trait that can do this with less manual work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah turns out pat_wild exists, but unfortunately it looks like nothing exists for local + decl + StmtDecl

This should help avoid triggering the unused_results lint which can frequently
be turned on.

Closes rust-lang#29710
@sfackler
Copy link
Member

sfackler commented Nov 9, 2015

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 9, 2015

📌 Commit 5d55533 has been approved by sfackler

@bors
Copy link
Collaborator

bors commented Nov 11, 2015

⌛ Testing commit 5d55533 with merge dbb7854...

bors added a commit that referenced this pull request Nov 11, 2015
This should help avoid triggering the unused_results lint which can frequently
be turned on.

Closes #29710
@bors bors merged commit 5d55533 into rust-lang:master Nov 11, 2015
@alexcrichton alexcrichton deleted the debug-unused-result branch January 21, 2016 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants