various updates

This commit is contained in:
Folkert 2022-11-03 17:01:56 +01:00
parent ade5e6de26
commit 134de80150
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
14 changed files with 55 additions and 141 deletions

View file

@ -99,14 +99,11 @@ impl DerivedModule {
exposed_by_module: &ExposedByModule,
key: DeriveKey,
) -> &(Symbol, Def, SpecializationLambdaSets) {
match self.map.get(&key) {
Some(entry) => {
// rustc won't let us return an immutable reference *and* continue using
// `self.map` immutably below, but this is safe, because we are not returning
// an immutable reference to the entry.
return unsafe { std::mem::transmute(entry) };
}
None => {}
if let Some(entry) = self.map.get(&key) {
// rustc won't let us return an immutable reference *and* continue using
// `self.map` immutably below, but this is safe, because we are not returning
// an immutable reference to the entry.
return unsafe { std::mem::transmute(entry) };
}
let ident_id = if cfg!(debug_assertions) || cfg!(feature = "debug-derived-symbols") {