mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
exported_symbols_cache: ensure we do not overwrite anything
This commit is contained in:
@@ -194,7 +194,7 @@ fn lookup_exported_symbol(
|
||||
|
||||
let instance = instance_and_crate.map(|ic| ic.0);
|
||||
// Cache it and load its MIR, if found.
|
||||
this.machine.exported_symbols_cache.insert(link_name, instance);
|
||||
this.machine.exported_symbols_cache.try_insert(link_name, instance).unwrap();
|
||||
instance.map(|instance| this.load_mir(instance.def, None)).transpose()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user