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.
1 parent be8450e commit 5eb960cCopy full SHA for 5eb960c
compiler/rustc_symbol_mangling/src/lib.rs
@@ -250,10 +250,18 @@ fn compute_symbol_name(
250
tcx.symbol_mangling_version(mangling_version_crate)
251
};
252
253
- match mangling_version {
+ let symbol = match mangling_version {
254
SymbolManglingVersion::Legacy => legacy::mangle(tcx, instance, instantiating_crate),
255
SymbolManglingVersion::V0 => v0::mangle(tcx, instance, instantiating_crate),
256
- }
+ };
257
+
258
+ debug_assert!(
259
+ rustc_demangle::try_demangle(&symbol).is_ok(),
260
+ "compute_symbol_name: `{}` cannot be demangled",
261
+ symbol
262
+ );
263
264
265
}
266
267
fn is_generic(substs: SubstsRef<'_>) -> bool {
0 commit comments