rust/crates
bors[bot] c2594daf29
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](https://github.com/rust-lang/chalk/issues/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 <wilcokusee@gmail.com>
2020-08-14 17:02:55 +00:00
..
arena Rename ra_arena 2020-08-12 16:22:05 +02:00
assists Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
base_db Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
cfg Rename ra_cfg -> cfg 2020-08-13 10:36:04 +02:00
expect Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
flycheck Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
hir Rename hypothetical -> speculative 2020-08-14 15:23:27 +02:00
hir_def Rename ra_hir_def -> hir_def 2020-08-13 16:29:33 +02:00
hir_expand Rename ra_hir_expand -> hir_expand 2020-08-13 16:29:33 +02:00
hir_ty Only print chalk programs with CHALK_PRINT 2020-08-14 14:52:07 +02:00
ide Rename hypothetical -> speculative 2020-08-14 15:23:27 +02:00
ide_db Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
mbe Rename ra_mbe -> mbe 2020-08-13 10:36:04 +02:00
parser Better recovery in use foo::; 2020-08-13 18:50:21 +02:00
paths Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
proc_macro_api Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
proc_macro_srv Rename ra_proc_macro -> proc_macro_api 2020-08-13 12:39:27 +02:00
profile Rename ra_prof -> profile 2020-08-12 16:35:29 +02:00
project_model Rename ra_db -> base_db 2020-08-13 16:29:33 +02:00
rust-analyzer Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
ssr Rename hypothetical -> speculative 2020-08-14 15:23:27 +02:00
stdx Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
syntax Better recovery in use foo::; 2020-08-13 18:50:21 +02:00
test_utils Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
text_edit Rename ra_text_edit -> text_edit 2020-08-12 17:03:06 +02:00
toolchain Rename ra_toolchain -> toolchain 2020-08-12 16:52:28 +02:00
tt Rename ra_tt -> tt 2020-08-12 16:46:54 +02:00
vfs Sophisticate Windows path encoding 2020-08-14 02:03:54 +02:00
vfs-notify Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00