-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
simplify some unused lints code #54746
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
src/librustc_lint/unused.rs
Outdated
@@ -60,14 +60,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults { | |||
|
|||
let t = cx.tables.expr_ty(&expr); | |||
let ty_warned = match t.sty { | |||
ty::Tuple(ref tys) if tys.is_empty() => return, | |||
ty::Tuple(ref tys) if tys.is_empty() | |
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.
Huh!? since when can we chain match arms with guards and some without?
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
4eded25
to
6eb144c
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
6eb144c
to
3f20549
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
3f20549
to
989f480
Compare
📌 Commit 989f480 has been approved by |
…haelwoerister simplify some unused lints code Those are but small simplifications for readability.
Rollup of 10 pull requests Successful merges: - #53523 (Add doc for impl From for Std Error) - #54746 (simplify some unused lints code) - #54761 (Make spec_extend use for_each()) - #54769 (Fix typo in CONTRIBUTING.md) - #54773 (Update a FIXME in memory.rs) - #54777 (abolish ICE when pretty-printing async block) - #54780 (Remove duplicate predicates in `explicit_predicates_of`) - #54788 (A handful of cleanups for rustc/mir) - #54789 (Introduce `TyKind::UnnormalizedProjection`) - #54795 (remove padding from multiline format string label) Failed merges: r? @ghost
Those are but small simplifications for readability.