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
..
2020-08-13 17:33:38 +02:00
2020-08-13 17:58:27 +02:00
2020-08-13 10:36:04 +02:00
2020-08-13 17:58:27 +02:00
2020-08-13 17:58:27 +02:00
2020-08-14 15:23:27 +02:00
2020-08-13 16:29:33 +02:00
2020-08-14 15:23:27 +02:00
2020-08-13 17:58:27 +02:00
2020-08-13 10:36:04 +02:00
2020-08-13 18:50:21 +02:00
2020-08-13 17:58:27 +02:00
2020-08-13 17:58:27 +02:00
2020-08-13 16:29:33 +02:00
2020-08-13 17:58:27 +02:00
2020-08-14 15:23:27 +02:00
2020-08-13 17:58:27 +02:00
2020-08-13 18:50:21 +02:00
2020-08-13 17:58:27 +02:00
2020-08-14 02:03:54 +02:00
2020-08-13 17:58:27 +02:00