Skip to content

Conversation

@smoelius
Copy link
Contributor

@smoelius smoelius commented Mar 8, 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

@rustbot
Copy link
Collaborator

rustbot commented Mar 8, 2025

r? @Jarcho

rustbot has assigned @Jarcho.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 8, 2025
@smoelius smoelius force-pushed the visit-map-happy-path branch 2 times, most recently from 87066a7 to 770d233 Compare March 8, 2025 21:29
@smoelius
Copy link
Contributor Author

smoelius commented Mar 8, 2025

Sorry, one more nitpicky force push re the same comment.

Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a little easier to follow. Thank you.

@Jarcho Jarcho added this pull request to the merge queue Mar 31, 2025
Merged via the queue into rust-lang:master with commit bb0d09b Mar 31, 2025
11 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Apr 1, 2025
This PR resolves #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 #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
@smoelius smoelius deleted the visit-map-happy-path branch April 12, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants