mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 14:33:29 +00:00
a0a80a4103
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.
34 lines
976 B
TOML
34 lines
976 B
TOML
[package]
|
|
edition = "2018"
|
|
name = "ra_hir_ty"
|
|
version = "0.1.0"
|
|
authors = ["rust-analyzer developers"]
|
|
|
|
[lib]
|
|
doctest = false
|
|
|
|
[dependencies]
|
|
arrayvec = "0.5.1"
|
|
smallvec = "1.2.0"
|
|
ena = "0.13.1"
|
|
log = "0.4.8"
|
|
rustc-hash = "1.1.0"
|
|
|
|
stdx = { path = "../stdx" }
|
|
|
|
hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
|
|
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
|
|
ra_arena = { path = "../ra_arena" }
|
|
ra_db = { path = "../ra_db" }
|
|
ra_prof = { path = "../ra_prof" }
|
|
ra_syntax = { path = "../ra_syntax" }
|
|
test_utils = { path = "../test_utils" }
|
|
|
|
scoped-tls = "1"
|
|
|
|
chalk-solve = { git = "https://github.com/rust-lang/chalk.git", rev = "039fc904a05f8cb3d0c682c9a57a63dda7a35356" }
|
|
chalk-rust-ir = { git = "https://github.com/rust-lang/chalk.git", rev = "039fc904a05f8cb3d0c682c9a57a63dda7a35356" }
|
|
chalk-ir = { git = "https://github.com/rust-lang/chalk.git", rev = "039fc904a05f8cb3d0c682c9a57a63dda7a35356" }
|
|
|
|
[dev-dependencies]
|
|
insta = "0.15.0"
|