mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Improved IdentIds
This commit is contained in:
parent
ae04887cb1
commit
af6c3231f3
16 changed files with 142 additions and 143 deletions
|
@ -396,7 +396,7 @@ impl<'a> CodeGenHelp<'a> {
|
|||
}
|
||||
|
||||
fn create_symbol(&self, ident_ids: &mut IdentIds, debug_name: &str) -> Symbol {
|
||||
let ident_id = ident_ids.add(Ident::from(debug_name));
|
||||
let ident_id = ident_ids.add(&Ident::from(debug_name));
|
||||
Symbol::new(self.home, ident_id)
|
||||
}
|
||||
|
||||
|
|
|
@ -2774,7 +2774,7 @@ impl LayoutId {
|
|||
// Returns something like "foo#1" when given a symbol that interns to "foo"
|
||||
// and a LayoutId of 1.
|
||||
pub fn to_symbol_string(self, symbol: Symbol, interns: &Interns) -> String {
|
||||
let ident_string = symbol.ident_str(interns);
|
||||
let ident_string = symbol.as_str(interns);
|
||||
let module_string = interns.module_ids.get_name(symbol.module_id()).unwrap();
|
||||
format!("{}_{}_{}", module_string, ident_string, self.0)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue