-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
r? @sfackler |
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
e2071d7
to
5d55533
Compare
@bors r+ |
📌 Commit 5d55533 has been approved by |
⌛ Testing commit 5d55533 with merge dbb7854... |
This should help avoid triggering the unused_results lint which can frequently be turned on. Closes #29710
This should help avoid triggering the unused_results lint which can frequently
be turned on.
Closes #29710