diff options
author | Florian Diebold <[email protected]> | 2020-03-27 17:56:18 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-04-10 14:04:06 +0100 |
commit | a0a80a41034b1240dc3e8fd794ae1d4f77714d99 (patch) | |
tree | 1daf136828992006de9e21784a89b2d14be61b74 /crates/ra_syntax | |
parent | 176f7f61175bc433c56083a758bd7a28a8ae31f8 (diff) |
Implement Chalk's debug methods using TLS
Chalk now panics if we don't implement these methods and run with CHALK_DEBUG,
so I thought I'd try to implement them 'properly'. Sadly, it seems impossible to
do without transmuting lifetimes somewhere. The problem is that we need a `&dyn
HirDatabase` to get names etc., which we can't just put into TLS. I thought I
could just use `scoped-tls`, but that doesn't support references to unsized
types. So I put the `&dyn` into another struct and put the reference to *that*
into the TLS, but I have to transmute the lifetime to 'static for that to work.
Diffstat (limited to 'crates/ra_syntax')
0 files changed, 0 insertions, 0 deletions