fully qualify exposed symbols

This commit is contained in:
Folkert 2020-11-10 14:06:48 +01:00
parent a48f244cc7
commit 0d51309eb9
2 changed files with 7 additions and 5 deletions

View file

@ -10,7 +10,9 @@ 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 {
format!("{}_{}", symbol.ident_string(interns), self.0)
let ident_string = symbol.ident_string(interns);
let module_string = interns.module_ids.get_name(symbol.module_id()).unwrap();
format!("{}_{}_{}", module_string, ident_string, self.0)
}
}