-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rewrite orphan_check_trait_ref
to use a TypeVisitor
#99552
Merged
Merged
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
rustbot
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Jul 21, 2022
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jul 21, 2022
oli-obk
reviewed
Jul 21, 2022
Comment on lines
+714
to
+716
// A bit of a hack, the `OrphanChecker` is only used to visit a `TraitRef`, so | ||
// the first type we visit is always the self type. | ||
self.in_self_ty = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be a bit cleaner to only visit the types that we care about... Tho since we don't implement TypeVisitor
for iterators this can be annoying, too.
The algorithm replicates the existing behaviour, so... @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
Jul 21, 2022
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Jul 21, 2022
Rewrite `orphan_check_trait_ref` to use a `TypeVisitor` The current impl is far more confusing than it has any right to be ✨ r? rust-lang/types
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Jul 21, 2022
Rewrite `orphan_check_trait_ref` to use a `TypeVisitor` The current impl is far more confusing than it has any right to be ✨ r? rust-lang/types
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Jul 21, 2022
Rewrite `orphan_check_trait_ref` to use a `TypeVisitor` The current impl is far more confusing than it has any right to be ✨ r? rust-lang/types
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 21, 2022
…askrgr Rollup of 11 pull requests Successful merges: - rust-lang#98707 (std: use futex-based locks on Fuchsia) - rust-lang#99413 (Add `PhantomData` marker for dropck to `BTreeMap`) - rust-lang#99454 (Add map_continue and continue_value combinators to ControlFlow) - rust-lang#99523 (Fix the stable version of `AsFd for Arc<T>` and `Box<T>`) - rust-lang#99526 (Normalize the arg spans to be within the call span) - rust-lang#99528 (couple of clippy::perf fixes) - rust-lang#99549 (Add regression test for rust-lang#52304) - rust-lang#99552 (Rewrite `orphan_check_trait_ref` to use a `TypeVisitor`) - rust-lang#99557 (Edit `rustc_index::vec::IndexVec::pick3_mut` docs) - rust-lang#99558 (Fix `remap_constness`) - rust-lang#99559 (Remove unused field in ItemKind::KeywordItem) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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.
The current impl is far more confusing than it has any right to be ✨
r? rust-lang/types