You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Query docs show return types as <query_name as QueryConfig<TyCtxt<'tcx>>>::Stored #77459
This makes the docs really hard to read: you have to click on hir_crate, open impl<'tcx> QueryConfig<TyCtxt<'tcx>> for hir_crate, and know that Value is what actually matters, not Stored. This is super confusing and not documented anywhere. We should find a way to just put &'tcx Crate<'tcx> directly in the return type instead.
Maybe the fix should be for rustdoc to turn <X as Y>::Assoc into the actual type that describes? That would make the standard library docs easier to read too.
This was fixed for rustc by #79525. I guess we can reuse this as the tracking issue for enabling normalize-docs globally? I'm not planning to work on it myself but I'd love to remove the feature gate.
Activity
jyn514 commentedon Oct 2, 2020
TyCtxtAthas the same problem: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/struct.TyCtxtAt.html#method.hir_cratejyn514 commentedon Oct 2, 2020
I'm not sure what's going on with
Storedhere:eval_to_const_value_rawreturnsEvalToConstValueResult(not a borrow), whilegenerics_ofreturns&ty::Generics(a borrow). However in the query file both of them are listed as returning an owned value.jyn514 commentedon Oct 2, 2020
I think the difference is that
generics_ofusesArenaCache, which returns a borrow? ughjyn514 commentedon Oct 2, 2020
Maybe the fix should be for rustdoc to turn
<X as Y>::Associnto the actual type that describes? That would make the standard library docs easier to read too.Auto merge of rust-lang#77467 - jyn514:query-docs, r=oli-obk
jyn514 commentedon Nov 28, 2020
Re-opening this until I fix #79459 properly.
Rollup merge of rust-lang#79516 - jyn514:cleanup-trait-solver, r=Aaro…
Rollup merge of rust-lang#79525 - jyn514:feature-gate-normalize, r=Gu…
Rollup merge of rust-lang#79525 - jyn514:feature-gate-normalize, r=Gu…
jyn514 commentedon Dec 12, 2020
This was fixed for rustc by #79525. I guess we can reuse this as the tracking issue for enabling
normalize-docsglobally? I'm not planning to work on it myself but I'd love to remove the feature gate.jyn514 commentedon Mar 2, 2021
Closing this in favor of #82692, which has proper links and such so it's clear what this is blocked on.