-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
privacy: visit trait def id of projections #118715
Merged
bors
merged 1 commit into
rust-lang:master
from
davidtwco:issue-117997-privacy-visit-trait-ref-and-args
Dec 9, 2023
Merged
privacy: visit trait def id of projections #118715
bors
merged 1 commit into
rust-lang:master
from
davidtwco:issue-117997-privacy-visit-trait-ref-and-args
Dec 9, 2023
Conversation
This file contains 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
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 7, 2023
This comment was marked as resolved.
This comment was marked as resolved.
davidtwco
force-pushed
the
issue-117997-privacy-visit-trait-ref-and-args
branch
from
December 8, 2023 13:53
d83d03c
to
dcb112f
Compare
This comment has been minimized.
This comment has been minimized.
A refactoring in rust-lang#117076 changed the `DefIdVisitorSkeleton` to avoid calling `visit_projection_ty` for `ty::Projection` aliases, and instead just iterate over the args - this makes sense, as `visit_projection_ty` will indirectly visit all of the same args, but in doing so, will also create a `TraitRef` containing the trait's `DefId`, which also gets visited. The trait's `DefId` isn't visited when we only visit the arguments without separating them into `TraitRef` and own args first. Signed-off-by: David Wood <david@davidtw.co>
davidtwco
force-pushed
the
issue-117997-privacy-visit-trait-ref-and-args
branch
from
December 8, 2023 14:26
dcb112f
to
5d97724
Compare
@bors r+ |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 8, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 8, 2023
…it-trait-ref-and-args, r=TaKO8Ki privacy: visit trait def id of projections Fixes rust-lang#117997. A refactoring in rust-lang#117076 changed the `DefIdVisitorSkeleton` to avoid calling `visit_projection_ty` for `ty::Projection` aliases, and instead just iterate over the args - this makes sense, as `visit_projection_ty` will indirectly visit all of the same args, but in doing so, will also create a `TraitRef` containing the trait's `DefId`, which also gets visited. The trait's `DefId` isn't visited when we only visit the arguments without separating them into `TraitRef` and own args first. Eventually this influences the reachability set and whether a function is encoded into the metadata.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 8, 2023
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#117586 (Uplift the (new solver) canonicalizer into `rustc_next_trait_solver`) - rust-lang#118692 (remove redundant imports) - rust-lang#118694 (Add instance evaluation and methods to read an allocation in StableMIR) - rust-lang#118715 (privacy: visit trait def id of projections) - rust-lang#118730 (recurse into refs when comparing tys for diagnostics) - rust-lang#118736 (temporarily revert "ice on ambguity in mir typeck") r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 9, 2023
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#117586 (Uplift the (new solver) canonicalizer into `rustc_next_trait_solver`) - rust-lang#118502 (fix: correct the arg for 'suggest to use associated function syntax' diagnostic) - rust-lang#118694 (Add instance evaluation and methods to read an allocation in StableMIR) - rust-lang#118715 (privacy: visit trait def id of projections) - rust-lang#118730 (recurse into refs when comparing tys for diagnostics) - rust-lang#118736 (temporarily revert "ice on ambguity in mir typeck") r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 9, 2023
Rollup merge of rust-lang#118715 - davidtwco:issue-117997-privacy-visit-trait-ref-and-args, r=TaKO8Ki privacy: visit trait def id of projections Fixes rust-lang#117997. A refactoring in rust-lang#117076 changed the `DefIdVisitorSkeleton` to avoid calling `visit_projection_ty` for `ty::Projection` aliases, and instead just iterate over the args - this makes sense, as `visit_projection_ty` will indirectly visit all of the same args, but in doing so, will also create a `TraitRef` containing the trait's `DefId`, which also gets visited. The trait's `DefId` isn't visited when we only visit the arguments without separating them into `TraitRef` and own args first. Eventually this influences the reachability set and whether a function is encoded into the metadata.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Fixes #117997.
A refactoring in #117076 changed the
DefIdVisitorSkeleton
to avoid callingvisit_projection_ty
forty::Projection
aliases, and instead just iterate over the args - this makes sense, asvisit_projection_ty
will indirectly visit all of the same args, but in doing so, will also create aTraitRef
containing the trait'sDefId
, which also gets visited. The trait'sDefId
isn't visited when we only visit the arguments without separating them intoTraitRef
and own args first.Eventually this influences the reachability set and whether a function is encoded into the metadata.