.hash_stable(&mut hcx, &mut hasher);
(&tcx.crate_disambiguator(instantiating_crate)).hash_stable(&mut hcx, &mut hasher);
}
+
+ let is_vtable_shim = instance.is_vtable_shim();
+ is_vtable_shim.hash_stable(&mut hcx, &mut hasher);
});
// 64 bits should be enough to avoid collisions.
let hash = get_symbol_hash(tcx, def_id, instance, instance_ty, substs);
- SymbolPathBuffer::from_interned(tcx.def_symbol_name(def_id)).finish(hash)
+ let mut buf = SymbolPathBuffer::from_interned(tcx.def_symbol_name(def_id));
+
+ if instance.is_vtable_shim() {
+ buf.push("{{vtable-shim}}");
+ }
+
+ buf.finish(hash)
}
// Follow C++ namespace-mangling style, see
-error: symbol-name(_ZN5impl13foo3Foo3bar17h8da62e6147ff602fE)
+error: symbol-name(_ZN5impl13foo3Foo3bar17h99c48478d64a0eb0E)
--> $DIR/impl1.rs:18:9
|
LL | #[rustc_symbol_name] //~ ERROR _ZN5impl13foo3Foo3bar
LL | #[rustc_item_path] //~ ERROR item-path(foo::Foo::bar)
| ^^^^^^^^^^^^^^^^^^
-error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h374cb8f6185db9b4E)
+error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17hebf13830acf865d9E)
--> $DIR/impl1.rs:28:9
|
LL | #[rustc_symbol_name] //~ ERROR _ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz