Make visit_map happy path more evident#14376
Merged
Jarcho merged 1 commit intorust-lang:masterfrom Mar 31, 2025
Merged
Conversation
Collaborator
87066a7 to
770d233
Compare
Contributor
Author
|
Sorry, one more nitpicky force push re the same comment. |
770d233 to
0af0445
Compare
Jarcho
approved these changes
Mar 31, 2025
Contributor
Jarcho
left a comment
There was a problem hiding this comment.
Looks a little easier to follow. Thank you.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a small refactor of
ConfVisitor'svisit_mapmethod.It adds comments and reduces
matchnesting by addingcontinuestatements.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