Rollup merge of #100221 - compiler-errors:impossible-trait-items, r=lcnr,notriddle,camelid

Don't document impossible to call default trait items on impls

Closes #100176

This only skips documenting _default_ trait items on impls, not ones that are written inside the impl block. This is a conservative approach, since I think we should document all items written in an impl block (I guess unless hidden or whatever), but the existence of this new query I added makes this easy to extend to other rustdoc cases.
This commit is contained in:
Dylan DPC 2022-08-09 17:34:54 +05:30 committed by GitHub
commit d910e5376b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 113 additions and 1 deletions

View file

@ -1956,6 +1956,14 @@ rustc_queries! {
}
}
query is_impossible_method(key: (DefId, DefId)) -> bool {
desc { |tcx|
"checking if {} is impossible to call within {}",
tcx.def_path_str(key.1),
tcx.def_path_str(key.0),
}
}
query method_autoderef_steps(
goal: CanonicalTyGoal<'tcx>
) -> MethodAutoderefStepsResult<'tcx> {