Add tcx.visible_traits()
and use it for producing diagnostics
Add an alternative to `tcx.all_traits()` that only shows traits that the user might be able to use, for diagnostic purposes. With this available, make use of it for diagnostics including associated type errors, which is part of the problem with [1]. Includes a few comment updates for related API. [1]: https://github.com/rust-lang/rust/issues/135232
This commit is contained in:
parent
9c34253762
commit
2da9accab9
5 changed files with 23 additions and 4 deletions
|
@ -2128,6 +2128,8 @@ rustc_queries! {
|
|||
eval_always
|
||||
desc { "calculating the stability index for the local crate" }
|
||||
}
|
||||
/// All available crates in the graph, including those that should not be user-facing
|
||||
/// (such as private crates).
|
||||
query crates(_: ()) -> &'tcx [CrateNum] {
|
||||
eval_always
|
||||
desc { "fetching all foreign CrateNum instances" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue