1
Fork 0

Add HashStable_NoContext to simplify HashStable implementations in rustc_type_ir

This commit is contained in:
Michael Goulet 2023-11-04 17:02:54 +00:00
parent baf4abff31
commit 426bc70ad6
10 changed files with 69 additions and 291 deletions

View file

@ -59,9 +59,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
/// Requirements for a `StableHashingContext` to be used in this crate.
/// This is a hack to allow using the `HashStable_Generic` derive macro
/// instead of implementing everything in `rustc_middle`.
pub trait HashStableContext:
rustc_type_ir::HashStableContext + rustc_span::HashStableContext
{
pub trait HashStableContext: rustc_span::HashStableContext {
fn hash_attr(&mut self, _: &ast::Attribute, hasher: &mut StableHasher);
}