-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustdoc: Clean AST + JSON types: Yeet WherePredicate::EqPredicate #141368
Copy link
Copy link
Open
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
rustdoc::clean::types::WherePredicate::EqPredicaterustdoc_json_types::WherePredicate::EqPredicateWhile equality bounds/predicates
$type = $typeand$type == $type(#20041) are syntactically legal and stable (if cfg'ed out), they get rejected during AST validation (which is a pass rustdoc does run) and more importantly they're not on track to becoming part of the language / being implemented anytime soon — if ever.rustc_hir::hir::WherePredicateKind::EqPredicate) should in theory never reach rustdoc's cleaning procedures. Instead of lowering them to a cleaned counterpart, we should justpanic!()/bug!()on them (or delay a bug if it turns out they're smh. reachable and return some dummy cleaned type).rustc_type_ir::predicate::ProjectionPredicate) but these don't correspond to the aforementioned "standalone" predicates but to associated item bindings / equality constraints (as in e.g.,Iterator<Item = ()>). However, we resugar these back to their assoc item binding form, so they should never actually reach HTML/JSON rendering (assuming the resugaring step never fails).EqPredicateswhich prevents us from removing that enum variant for now.