Skip to content

SmallIntMap doesn't have common map iterators #14376

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

Closed
tbu- opened this issue May 23, 2014 · 1 comment · Fixed by #15968
Closed

SmallIntMap doesn't have common map iterators #14376

tbu- opened this issue May 23, 2014 · 1 comment · Fixed by #15968

Comments

@tbu-
Copy link
Contributor

tbu- commented May 23, 2014

SmallIntMap doesn't have a keys() and a values() iterator. Maybe these could be added to the Map trait.

@huonw huonw added the A-libs label May 23, 2014
@sfackler
Copy link
Member

Adding them to the Map trait would make the trait a bit harder to work with:

pub trait Map<'a, K, V, EI: Iterator<(&'a K, &'a V)>, KI: Iterator<&'a K>, VI: Iterator<&'a V>> {
    // ...
    fn keys(&'a self) -> KI;
    fn values(&'a self) -> VI;
    fn entries(&'a self) -> EI;
}

bors added a commit that referenced this issue Jul 25, 2014
Adds methods for obtaining iterators over the keys or values of a SmallIntMap/TreeMap/TrieMap.

Closes #14376
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
…ping, r=HKalbasi

fix(rustdoc): don't escape double hashes outside of Rust code blocks

Fixes rust-lang#14376
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 3, 2025
This is a small refactor of `ConfVisitor`'s `visit_map` method.

It adds comments and reduces `match` nesting by adding `continue`
statements.

IMHO, the code is easier to read in this form. No one asked for this, so
I hope the maintainers agree it is an improvement.

changelog: none
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 3, 2025
This PR resolves rust-lang#11432 by checking that paths resolve in `disallowed_*`
configurations.

It also does some lightweight validation of definition kinds. For
example, only paths that resolve to `DefKind::Macro` definitions are
allowed in `disallowed_macro` configurations.

~The PR is currently two commits. The first is rust-lang#14376 (cc: @Jarcho),
which I submitted just a few days ago. The second commit is everything
else.~

Side note: For me, the most difficult part of this PR was getting the
spans of the individual `DisallowedPath` configurations. There is some
discussion at toml-rs/toml#840, if
interested.

changelog:  validate paths in `disallowed_*` configurations
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 a pull request may close this issue.

3 participants