-
Couldn't load subscription status.
- Fork 13.9k
Rewrite orphan_check_trait_ref to use a TypeVisitor
#99552
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
Conversation
| // 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+ |
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
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
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
…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
The current impl is far more confusing than it has any right to be ✨
r? rust-lang/types