Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer

This commit is contained in:
Ben Kimock 2025-02-15 15:18:19 -05:00
parent 1d7cf0ff40
commit 4cf21866e8
50 changed files with 152 additions and 67 deletions

View file

@ -11,6 +11,7 @@ rustc-demangle = "0.1.21"
rustc_abi = { path = "../rustc_abi" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_middle = { path = "../rustc_middle" }
rustc_session = { path = "../rustc_session" }

View file

@ -1,6 +1,7 @@
use std::fmt::Write;
use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_hashes::Hash64;
use rustc_hir::def_id::CrateNum;
use rustc_middle::ty::{Instance, TyCtxt};

View file

@ -1,7 +1,8 @@
use std::fmt::{self, Write};
use std::mem::{self, discriminant};
use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_hashes::Hash64;
use rustc_hir::def_id::{CrateNum, DefId};
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
use rustc_middle::bug;