/// Right now this takes the form of a hex-encoded opaque hash value.
pub fn generate_unique_id_string(self, tcx: TyCtxt<'tcx>) -> String {
let mut hasher = StableHasher::new();
- let mut hcx = tcx.create_stable_hashing_context();
- hcx.while_hashing_spans(false, |hcx| self.hash_stable(hcx, &mut hasher));
+ tcx.with_stable_hashing_context(|mut hcx| {
+ hcx.while_hashing_spans(false, |hcx| self.hash_stable(hcx, &mut hasher))
+ });
hasher.finish::<Fingerprint>().to_hex()
}
pub enum Stub<'ll> {
Struct,
Union,
- VtableTy { vtable_holder: &'ll DIType },
+ VTableTy { vtable_holder: &'ll DIType },
}
pub struct StubInfo<'ll, 'tcx> {
let unique_type_id_str = unique_type_id.generate_unique_id_string(cx.tcx);
let metadata = match kind {
- Stub::Struct | Stub::VtableTy { .. } => {
+ Stub::Struct | Stub::VTableTy { .. } => {
let vtable_holder = match kind {
- Stub::VtableTy { vtable_holder } => Some(vtable_holder),
+ Stub::VTableTy { vtable_holder } => Some(vtable_holder),
_ => None,
};
unsafe {