Merge pull request #2766 from rtfeldman/simplify-identids

simplify IdentIds
This commit is contained in:
Richard Feldman 2022-03-22 20:23:56 -04:00 committed by GitHub
commit 750fbf2dcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 42 deletions

View file

@ -87,7 +87,7 @@ impl<'a> Env<'a> {
if module_id == self.home {
match self.ident_ids.get_id(&ident) {
Some(ident_id) => {
let symbol = Symbol::new(module_id, *ident_id);
let symbol = Symbol::new(module_id, ident_id);
if is_type_name {
self.qualified_type_lookups.insert(symbol);
@ -112,7 +112,7 @@ impl<'a> Env<'a> {
match self.dep_idents.get(&module_id) {
Some(exposed_ids) => match exposed_ids.get_id(&ident) {
Some(ident_id) => {
let symbol = Symbol::new(module_id, *ident_id);
let symbol = Symbol::new(module_id, ident_id);
if is_type_name {
self.qualified_type_lookups.insert(symbol);

View file

@ -203,7 +203,7 @@ impl Scope {
// when the value was exposed in the module header,
// use that existing IdentId. Otherwise, create a fresh one.
let ident_id = match exposed_ident_ids.get_id(&ident) {
Some(ident_id) => *ident_id,
Some(ident_id) => ident_id,
None => all_ident_ids.add(ident.clone()),
};