Commit c2594da
Merge #5347
5347: Chalk writer integration r=flodiebold a=detrumi
~~This adds a `rust-analyzer dump-chalk` command, similar to analysis-stats, which writes out the whole chalk progam (see [chalk#365](rust-lang/chalk#365) for more info about the .chalk writer)~~
Write out chalk programs in debug output if chalk debugging is active (using `CHALK_DEBUG`).
Example output:
```
[DEBUG ra_hir_ty::traits] solve(UCanonical { canonical: Canonical { value: InEnvironment { environment: Env([]), goal: Implemented(SeparatorTraitRef(?)) }, binders: [] }, universes: 1 }) => None
[INFO ra_hir_ty::traits] trait_solve_query(Implements(fn min<?0.0>(?0.0, ?0.0) -> ?0.0: Deref))
[DEBUG ra_hir_ty::traits] solve goal: UCanonical { canonical: Canonical { value: InEnvironment { environment: Env([]), goal: Implemented(SeparatorTraitRef(?)) }, binders: [U0 with kind type] }, universes: 1 }
[DEBUG ra_hir_ty::traits::chalk] impls_for_trait Deref
[DEBUG ra_hir_ty::traits::chalk] impls_for_trait returned 0 impls
[DEBUG ra_hir_ty::traits::chalk] trait_datum Ord
[DEBUG ra_hir_ty::traits::chalk] trait Ord = Name(Text("Ord"))
[DEBUG ra_hir_ty::traits] chalk program:
#[upstream]
#[non_enumerable]
#[object_safe]
trait Ord {}
#[upstream]
#[non_enumerable]
#[object_safe]
#[lang(sized)]
trait Sized {}
fn fn_0<_1_0>(arg_0: _1_0, arg_1: _1_0) -> _1_0
where
_1_0: Ord;
#[upstream]
#[non_enumerable]
#[object_safe]
trait Deref {
type Assoc_1829: Sized;
}
[DEBUG ra_hir_ty::traits] solve(UCanonical { canonical: Canonical { value: InEnvironment { environment: Env([]), goal: Implemented(SeparatorTraitRef(?)) }, binders: [U0 with kind type] }, universes: 1 }) => None
[INFO ra_hir_ty::traits] trait_solve_query(Implements(?0.0: Ord))
```
Co-authored-by: Wilco Kusee <[email protected]>2 files changed
+30
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
173 | 179 | | |
| 180 | + | |
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
178 | 185 | | |
| 186 | + | |
| 187 | + | |
179 | 188 | | |
180 | 189 | | |
181 | 190 | | |
182 | 191 | | |
183 | 192 | | |
184 | 193 | | |
185 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
186 | 199 | | |
187 | 200 | | |
188 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
245 | 246 | | |
246 | | - | |
247 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
248 | 251 | | |
249 | | - | |
250 | | - | |
| 252 | + | |
| 253 | + | |
251 | 254 | | |
252 | | - | |
253 | | - | |
| 255 | + | |
| 256 | + | |
254 | 257 | | |
255 | | - | |
256 | | - | |
| 258 | + | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| |||
0 commit comments