We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 22973a8 + 5eb960c commit 63cfbf5Copy full SHA for 63cfbf5
compiler/rustc_symbol_mangling/src/lib.rs
@@ -246,10 +246,18 @@ fn compute_symbol_name(
246
tcx.symbol_mangling_version(mangling_version_crate)
247
};
248
249
- match mangling_version {
+ let symbol = match mangling_version {
250
SymbolManglingVersion::Legacy => legacy::mangle(tcx, instance, instantiating_crate),
251
SymbolManglingVersion::V0 => v0::mangle(tcx, instance, instantiating_crate),
252
- }
+ };
253
+
254
+ debug_assert!(
255
+ rustc_demangle::try_demangle(&symbol).is_ok(),
256
+ "compute_symbol_name: `{}` cannot be demangled",
257
+ symbol
258
+ );
259
260
261
}
262
263
fn is_generic(substs: SubstsRef<'_>) -> bool {
0 commit comments