Rewrite orphan_check_trait_ref to use a TypeVisitor#99552
Merged
bors merged 2 commits intorust-lang:masterfrom Jul 21, 2022
Merged
Rewrite orphan_check_trait_ref to use a TypeVisitor#99552bors merged 2 commits intorust-lang:masterfrom
orphan_check_trait_ref to use a TypeVisitor#99552bors merged 2 commits intorust-lang:masterfrom
Conversation
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; |
Contributor
There was a problem hiding this comment.
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.
Contributor
|
The algorithm replicates the existing behaviour, so... @bors r+ |
Collaborator
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
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.
The current impl is far more confusing than it has any right to be ✨
r? rust-lang/types