-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Move time out of extra #12411
Move time out of extra #12411
Conversation
#[allow(missing_doc)]; | ||
|
||
#[feature(globs)]; |
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.
It looks like there's only one glob in the tests below, would you mind removing it?
Nice work, thanks! Feel free to comment with the glob removal, and I'll r+ |
I've removed the glob. :) |
Could you squash the two commits together, and also mention #8784 in the commit message as well as the PR description? Just something along the lines of |
Done. |
I've just rebased this. |
Now I think it should be ready. |
Okay, let's try this again. |
Rebased. |
More work towards finishing #8784.
@alexcrichton I think this accidentally reverted |
PR rust-lang#12407 was accidentally reverted by PR rust-lang#12411. Restore the correct version of LLVM that PR rust-lang#12407 introduced.
@alexcrichton no problem. I just wanted to let you know. |
BTW, this forgot to add a link to the (Just a reminder to reviewers to double check for this in any further PRs in the crateplosion.) |
The lint used to check for patterns looking like: ```rs for (_, x) in some_iter.enumerate() { // Index is ignored } ``` This commit further checks for chained method calls constructs where we can detect that the index is unused. Currently, this checks only for the following patterns: ```rs some_iter.enumerate().map_function(|(_, x)| ..) let x = some_iter.enumerate(); x.map_function(|(_, x)| ..) ``` where `map_function` is one of `all`, `any`, `filter_map`, `find_map`, `flat_map`, `for_each` or `map`. Fixes rust-lang#12411.
[`unused_enumerate_index`]: trigger on method calls The lint used to check for patterns looking like: ```rs for (_, x) in some_iter.enumerate() { // Index is ignored } ``` This commit further checks for chained method calls constructs where we can detect that the index is unused. Currently, this checks only for the following patterns: ```rs some_iter.enumerate().map_function(|(_, x)| ..) let x = some_iter.enumerate(); x.map_function(|(_, x)| ..) ``` where `map_function` is one of `all`, `any`, `filter_map`, `find_map`, `flat_map`, `for_each` or `map`. Fixes rust-lang#12411. *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: [`unused_enumerate_index`]: add detection for method chains such as `iter.enumerate().map(|(_, x)| x)`
More work towards finishing #8784.