pub trait HygieneRemapper<T> {
// Required methods
fn stable_hash(
&self,
t: T,
hcx: &mut impl StableHashCtxt,
hasher: &mut StableHasher,
);
fn len(&self) -> usize;
fn first_non_det_index_mut(&mut self) -> &mut Option<T>;
fn first_non_det_index(&self) -> u32;
// Provided methods
fn commit_end_of_determinism(&mut self)
where T: From<u32> { ... }
fn remapping_results(
&self,
hcx: &mut impl StableHashCtxt,
) -> HygieneRemappingResults<T>
where T: From<u32> + Hash + Eq + Copy { ... }
}Expand description
Includes common logic for remapping both expansion ids and syntax contexts. FIXME: this solution does not take into account syntax contexts and expansion ids that are allocated during metadata encoding, if we will have non-determinism there this remapping will not help as it is constructed before metadata encoding.
Required Methods§
fn stable_hash( &self, t: T, hcx: &mut impl StableHashCtxt, hasher: &mut StableHasher, )
fn len(&self) -> usize
fn first_non_det_index_mut(&mut self) -> &mut Option<T>
fn first_non_det_index(&self) -> u32
Provided Methods§
fn commit_end_of_determinism(&mut self)
fn remapping_results( &self, hcx: &mut impl StableHashCtxt, ) -> HygieneRemappingResults<T>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".