mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 15:14:32 +00:00
Update chalk for RawId removal
This commit is contained in:
parent
1eeb7a79bb
commit
807a56bebf
3 changed files with 16 additions and 23 deletions
13
Cargo.lock
generated
13
Cargo.lock
generated
|
@ -129,7 +129,7 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
|||
[[package]]
|
||||
name = "chalk-derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=2939913fb7bb94ac2a6721087dc086be11410702#2939913fb7bb94ac2a6721087dc086be11410702"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=ea1725e6bcf1881ad6c8304941e2282f33d32d1d#ea1725e6bcf1881ad6c8304941e2282f33d32d1d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -139,7 +139,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "chalk-engine"
|
||||
version = "0.9.0"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=2939913fb7bb94ac2a6721087dc086be11410702#2939913fb7bb94ac2a6721087dc086be11410702"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=ea1725e6bcf1881ad6c8304941e2282f33d32d1d#ea1725e6bcf1881ad6c8304941e2282f33d32d1d"
|
||||
dependencies = [
|
||||
"chalk-macros",
|
||||
"rustc-hash",
|
||||
|
@ -148,18 +148,17 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "chalk-ir"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=2939913fb7bb94ac2a6721087dc086be11410702#2939913fb7bb94ac2a6721087dc086be11410702"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=ea1725e6bcf1881ad6c8304941e2282f33d32d1d#ea1725e6bcf1881ad6c8304941e2282f33d32d1d"
|
||||
dependencies = [
|
||||
"chalk-derive",
|
||||
"chalk-engine",
|
||||
"chalk-macros",
|
||||
"lalrpop-intern",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chalk-macros"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=2939913fb7bb94ac2a6721087dc086be11410702#2939913fb7bb94ac2a6721087dc086be11410702"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=ea1725e6bcf1881ad6c8304941e2282f33d32d1d#ea1725e6bcf1881ad6c8304941e2282f33d32d1d"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
@ -167,7 +166,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "chalk-rust-ir"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=2939913fb7bb94ac2a6721087dc086be11410702#2939913fb7bb94ac2a6721087dc086be11410702"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=ea1725e6bcf1881ad6c8304941e2282f33d32d1d#ea1725e6bcf1881ad6c8304941e2282f33d32d1d"
|
||||
dependencies = [
|
||||
"chalk-derive",
|
||||
"chalk-engine",
|
||||
|
@ -178,7 +177,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "chalk-solve"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=2939913fb7bb94ac2a6721087dc086be11410702#2939913fb7bb94ac2a6721087dc086be11410702"
|
||||
source = "git+https://github.com/rust-lang/chalk.git?rev=ea1725e6bcf1881ad6c8304941e2282f33d32d1d#ea1725e6bcf1881ad6c8304941e2282f33d32d1d"
|
||||
dependencies = [
|
||||
"chalk-derive",
|
||||
"chalk-engine",
|
||||
|
|
|
@ -21,9 +21,9 @@ ra_prof = { path = "../ra_prof" }
|
|||
ra_syntax = { path = "../ra_syntax" }
|
||||
test_utils = { path = "../test_utils" }
|
||||
|
||||
chalk-solve = { git = "https://github.com/rust-lang/chalk.git", rev = "2939913fb7bb94ac2a6721087dc086be11410702" }
|
||||
chalk-rust-ir = { git = "https://github.com/rust-lang/chalk.git", rev = "2939913fb7bb94ac2a6721087dc086be11410702" }
|
||||
chalk-ir = { git = "https://github.com/rust-lang/chalk.git", rev = "2939913fb7bb94ac2a6721087dc086be11410702" }
|
||||
chalk-solve = { git = "https://github.com/rust-lang/chalk.git", rev = "ea1725e6bcf1881ad6c8304941e2282f33d32d1d" }
|
||||
chalk-rust-ir = { git = "https://github.com/rust-lang/chalk.git", rev = "ea1725e6bcf1881ad6c8304941e2282f33d32d1d" }
|
||||
chalk-ir = { git = "https://github.com/rust-lang/chalk.git", rev = "ea1725e6bcf1881ad6c8304941e2282f33d32d1d" }
|
||||
|
||||
lalrpop-intern = "0.15.1"
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ impl chalk_ir::interner::Interner for Interner {
|
|||
type InternedGoal = Arc<GoalData<Self>>;
|
||||
type InternedGoals = Vec<Goal<Self>>;
|
||||
type InternedSubstitution = Vec<Parameter<Self>>;
|
||||
type Identifier = lalrpop_intern::InternedString;
|
||||
type DefId = InternId;
|
||||
|
||||
// FIXME: implement these
|
||||
|
@ -121,7 +122,7 @@ pub type StructId = chalk_ir::StructId<Interner>;
|
|||
pub type StructDatum = chalk_rust_ir::StructDatum<Interner>;
|
||||
pub type ImplId = chalk_ir::ImplId<Interner>;
|
||||
pub type ImplDatum = chalk_rust_ir::ImplDatum<Interner>;
|
||||
pub type AssociatedTyValueId = chalk_rust_ir::AssociatedTyValueId;
|
||||
pub type AssociatedTyValueId = chalk_rust_ir::AssociatedTyValueId<Interner>;
|
||||
pub type AssociatedTyValue = chalk_rust_ir::AssociatedTyValue<Interner>;
|
||||
|
||||
pub(super) trait ToChalk {
|
||||
|
@ -822,13 +823,6 @@ fn type_alias_associated_ty_value(
|
|||
Arc::new(value)
|
||||
}
|
||||
|
||||
fn id_from_chalk<T: InternKey>(chalk_id: chalk_ir::RawId) -> T {
|
||||
T::from_intern_id(InternId::from(chalk_id.index))
|
||||
}
|
||||
fn id_to_chalk<T: InternKey>(salsa_id: T) -> chalk_ir::RawId {
|
||||
chalk_ir::RawId { index: salsa_id.as_intern_id().as_u32() }
|
||||
}
|
||||
|
||||
impl From<StructId> for crate::TypeCtorId {
|
||||
fn from(struct_id: StructId) -> Self {
|
||||
InternKey::from_intern_id(struct_id.0)
|
||||
|
@ -853,14 +847,14 @@ impl From<crate::traits::GlobalImplId> for ImplId {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<chalk_rust_ir::AssociatedTyValueId> for crate::traits::AssocTyValueId {
|
||||
fn from(id: chalk_rust_ir::AssociatedTyValueId) -> Self {
|
||||
id_from_chalk(id.0)
|
||||
impl From<chalk_rust_ir::AssociatedTyValueId<Interner>> for crate::traits::AssocTyValueId {
|
||||
fn from(id: chalk_rust_ir::AssociatedTyValueId<Interner>) -> Self {
|
||||
Self::from_intern_id(id.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<crate::traits::AssocTyValueId> for chalk_rust_ir::AssociatedTyValueId {
|
||||
impl From<crate::traits::AssocTyValueId> for chalk_rust_ir::AssociatedTyValueId<Interner> {
|
||||
fn from(assoc_ty_value_id: crate::traits::AssocTyValueId) -> Self {
|
||||
chalk_rust_ir::AssociatedTyValueId(id_to_chalk(assoc_ty_value_id))
|
||||
chalk_rust_ir::AssociatedTyValueId(assoc_ty_value_id.as_intern_id())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue