aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-03-27 17:56:18 +0000
committerFlorian Diebold <[email protected]>2020-04-10 14:04:06 +0100
commita0a80a41034b1240dc3e8fd794ae1d4f77714d99 (patch)
tree1daf136828992006de9e21784a89b2d14be61b74 /crates/ra_parser/src/grammar
parent176f7f61175bc433c56083a758bd7a28a8ae31f8 (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_parser/src/grammar')
0 files changed, 0 insertions, 0 deletions