Remove the optional salsa dependency from the AST crate (#14363)

This commit is contained in:
Micha Reiser 2024-11-15 17:46:04 +01:00 committed by GitHub
parent 9f3235a37f
commit 2b58705cc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 3 additions and 21 deletions

View file

@ -26,7 +26,6 @@ is-macro = { workspace = true }
itertools = { workspace = true }
memchr = { workspace = true }
rustc-hash = { workspace = true }
salsa = { workspace = true, optional = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
@ -39,7 +38,6 @@ serde = [
"dep:ruff_cache",
"compact_str/serde",
]
salsa = ["dep:salsa"]
[lints]
workspace = true

View file

@ -205,21 +205,6 @@ impl schemars::JsonSchema for Name {
}
}
#[cfg(feature = "salsa")]
impl salsa::plumbing::interned::Lookup<Name> for &str {
fn hash<H: Hasher>(&self, h: &mut H) {
std::hash::Hash::hash(self, h);
}
fn eq(&self, data: &Name) -> bool {
self == data
}
fn into_owned(self) -> Name {
Name::new(self)
}
}
/// A representation of a qualified name, like `typing.List`.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct QualifiedName<'a>(SegmentsVec<'a>);