mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Don't implement Eq for CrateGraph
This commit is contained in:
parent
c8c4d73648
commit
cf9d93a5d6
1 changed files with 2 additions and 9 deletions
|
@ -67,7 +67,7 @@ impl SourceRoot {
|
||||||
/// Note that `CrateGraph` is build-system agnostic: it's a concept of the Rust
|
/// Note that `CrateGraph` is build-system agnostic: it's a concept of the Rust
|
||||||
/// language proper, not a concept of the build system. In practice, we get
|
/// language proper, not a concept of the build system. In practice, we get
|
||||||
/// `CrateGraph` by lowering `cargo metadata` output.
|
/// `CrateGraph` by lowering `cargo metadata` output.
|
||||||
#[derive(Debug, Clone, Default, PartialEq, Eq)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct CrateGraph {
|
pub struct CrateGraph {
|
||||||
arena: FxHashMap<CrateId, CrateData>,
|
arena: FxHashMap<CrateId, CrateData>,
|
||||||
}
|
}
|
||||||
|
@ -170,14 +170,7 @@ pub struct ProcMacro {
|
||||||
pub expander: Arc<dyn ProcMacroExpander>,
|
pub expander: Arc<dyn ProcMacroExpander>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Eq for ProcMacro {}
|
#[derive(Debug, Clone)]
|
||||||
impl PartialEq for ProcMacro {
|
|
||||||
fn eq(&self, other: &ProcMacro) -> bool {
|
|
||||||
self.name == other.name && Arc::ptr_eq(&self.expander, &other.expander)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
||||||
pub struct CrateData {
|
pub struct CrateData {
|
||||||
pub root_file_id: FileId,
|
pub root_file_id: FileId,
|
||||||
pub edition: Edition,
|
pub edition: Edition,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue