halve the number of lookups into References

This commit is contained in:
Folkert 2022-04-20 20:22:52 +02:00
parent b557929276
commit 9d17a075d9
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
4 changed files with 5 additions and 9 deletions

View file

@ -302,8 +302,7 @@ pub fn canonicalize_module_defs<'a>(
// See if any of the new idents we defined went unused.
// If any were unused and also not exposed, report it.
for (symbol, region) in symbols_introduced {
if !output.references.has_value_lookup(symbol)
&& !output.references.has_type_lookup(symbol)
if !output.references.has_type_or_value_lookup(symbol)
&& !exposed_symbols.contains(&symbol)
&& !scope.abilities_store.is_specialization_name(symbol)
{