rustdoc: Clean AST + JSON types: Yeet WherePredicate::EqPredicate
#141368
Labels
A-rustdoc-json
Area: Rustdoc JSON backend
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
S-blocked
Status: Blocked on something else such as an RFC or other implementation work.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
rustdoc::clean::types::WherePredicate::EqPredicate
rustdoc_json_types::WherePredicate::EqPredicate
While equality bounds/predicates
$type = $type
and$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).EqPredicates
which prevents us from removing that type for now.The text was updated successfully, but these errors were encountered: