This commit is contained in:
Folkert 2022-04-26 11:33:26 +02:00
parent 25561ff757
commit d3ef35d935
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 14 additions and 14 deletions

View file

@ -225,7 +225,7 @@ impl Scope {
region,
};
let ident_id = all_ident_ids.add(&ident);
let ident_id = all_ident_ids.add_ident(&ident);
let symbol = Symbol::new(self.home, ident_id);
self.symbols.insert(symbol, region);
@ -273,7 +273,7 @@ impl Scope {
) -> Result<(Symbol, Option<Symbol>), (Region, Loc<Ident>, Symbol)> {
match self.idents.get(&ident) {
Some(&(original_symbol, original_region)) => {
let shadow_ident_id = all_ident_ids.add(&ident);
let shadow_ident_id = all_ident_ids.add_ident(&ident);
let shadow_symbol = Symbol::new(self.home, shadow_ident_id);
self.symbols.insert(shadow_symbol, region);
@ -315,7 +315,7 @@ impl Scope {
// use that existing IdentId. Otherwise, create a fresh one.
let ident_id = match exposed_ident_ids.get_id(&ident) {
Some(ident_id) => ident_id,
None => all_ident_ids.add(&ident),
None => all_ident_ids.add_ident(&ident),
};
let symbol = Symbol::new(self.home, ident_id);
@ -330,7 +330,7 @@ impl Scope {
///
/// Used for record guards like { x: Just _ }
pub fn ignore(&mut self, ident: &Ident, all_ident_ids: &mut IdentIds) -> Symbol {
let ident_id = all_ident_ids.add(ident);
let ident_id = all_ident_ids.add_ident(ident);
Symbol::new(self.home, ident_id)
}