Commit 6cf1c2c
committed
Add
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]: #135232tcx.visible_traits() and use it for producing diagnostics1 parent fb7ec2f commit 6cf1c2c
File tree
5 files changed
+23
-4
lines changed- compiler
- rustc_hir_analysis/src/hir_ty_lowering
- rustc_middle/src
- query
- ty
- rustc_passes/src
- rustc_trait_selection/src/error_reporting/traits
5 files changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2128 | 2128 | | |
2129 | 2129 | | |
2130 | 2130 | | |
| 2131 | + | |
| 2132 | + | |
2131 | 2133 | | |
2132 | 2134 | | |
2133 | 2135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2078 | 2078 | | |
2079 | 2079 | | |
2080 | 2080 | | |
| 2081 | + | |
2081 | 2082 | | |
2082 | 2083 | | |
2083 | 2084 | | |
2084 | 2085 | | |
2085 | 2086 | | |
2086 | 2087 | | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
2087 | 2098 | | |
2088 | 2099 | | |
2089 | 2100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2189 | 2189 | | |
2190 | 2190 | | |
2191 | 2191 | | |
2192 | | - | |
| 2192 | + | |
2193 | 2193 | | |
2194 | 2194 | | |
2195 | 2195 | | |
| |||
0 commit comments