Skip to content

transitioning to Iterator - #7110

Closed
thestinger wants to merge 4 commits into
rust-lang:masterfrom
thestinger:iterator
Closed

thestinger wants to merge 4 commits into
rust-lang:masterfrom
thestinger:iterator

Conversation

@thestinger

Copy link
Copy Markdown
Contributor

No description provided.

replaced with `xs.mut_iter().enumerate()`
replaced with mutable implementations of Iterator
copies can just be done explicitly: `xs.transform(|x|x.clone())`
bors added a commit that referenced this pull request Jun 15, 2013
@bors bors closed this Jun 15, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 6, 2021
…h_type_annotations, r=flip1995

needless_collect: Lint cases with type annotations for indirect usage and recognize `BinaryHeap`

fixes rust-lang#7110
changelog: needless_collect: Lint cases with type annotations for indirect usage and recognize `BinaryHeap`.
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7110: Deduplicate macros when offering completion r=matklad a=AdnoC

Closes rust-lang/rust-analyzer#7081

When iterating over the names within the `hir_def::resolver::Scope` for a module, track what macros are in the `hir_def::item_scope::ItemScope::legacy_macros` collection for the module. When iterating over names from the prelude, do not proccess the name if it had been in the `legacy_macros` collection.

This is implemented with a `FxHashSet` in the `Scope::process_names` function that is populated when iterating over `legacy_macros` and checked when iterating over the prelude.

Alternative implementation could instead query the `legacy_macros` `FxHashMap` directly when processing names in the prelude.

Also, I'd like to add a test for this, but I'm not sure where it could be added.

Co-authored-by: AdnoC <[email protected]>
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7265: Add a test for rust-lang#7110 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <[email protected]>
rust-bors Bot pushed a commit that referenced this pull request Sep 22, 2026
…prefix

fix: don't treat a raw identifier as a raw string prefix
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.

2 participants