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

Move time out of extra #12411

Closed
wants to merge 1 commit into from
Closed

Move time out of extra #12411

wants to merge 1 commit into from

Conversation

Arcterus
Copy link
Contributor

More work towards finishing #8784.

#[allow(missing_doc)];

#[feature(globs)];
Copy link
Member

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?

@alexcrichton
Copy link
Member

Nice work, thanks!

Feel free to comment with the glob removal, and I'll r+

@Arcterus
Copy link
Contributor Author

I've removed the glob. :)

@alexcrichton
Copy link
Member

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 cc #8784 is fine.

@Arcterus
Copy link
Contributor Author

Done.

@Arcterus
Copy link
Contributor Author

I've just rebased this.

@Arcterus
Copy link
Contributor Author

Now I think it should be ready.

@Arcterus
Copy link
Contributor Author

Okay, let's try this again.

@Arcterus
Copy link
Contributor Author

Rebased.

bors added a commit that referenced this pull request Feb 22, 2014
@bors bors closed this Feb 22, 2014
@Arcterus
Copy link
Contributor Author

@alexcrichton I think this accidentally reverted src/llvm to a prior commit.

lilyball added a commit to lilyball/rust that referenced this pull request Feb 22, 2014
PR rust-lang#12407 was accidentally reverted by PR rust-lang#12411. Restore the correct
version of LLVM that PR rust-lang#12407 introduced.
bors added a commit that referenced this pull request Feb 22, 2014
PR #12407 was accidentally reverted by PR #12411. Restore the correct
version of LLVM that PR #12407 introduced.
@alexcrichton
Copy link
Member

@Arcterus sorry I didn't catch that in review! Thankfully @kballard got around to it and fixed it in #12462

@Arcterus
Copy link
Contributor Author

@alexcrichton no problem. I just wanted to let you know.

@huonw
Copy link
Member

huonw commented Feb 24, 2014

BTW, this forgot to add a link to the time docs on the front page (the src/doc/index.md file).

(Just a reminder to reviewers to double check for this in any further PRs in the crateplosion.)

matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Mar 21, 2024
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.
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Mar 21, 2024
[`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)`
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.

4 participants