mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Merge branch 'trunk' of github.com:rtfeldman/roc into str-split
This commit is contained in:
commit
415a37a891
86 changed files with 5156 additions and 2360 deletions
|
@ -288,14 +288,18 @@ impl fmt::Debug for ModuleId {
|
|||
.lock()
|
||||
.expect("Failed to acquire lock for Debug reading from DEBUG_MODULE_ID_NAMES, presumably because a thread panicked.");
|
||||
|
||||
match names.get(&self.0) {
|
||||
Some(str_ref) => write!(f, "{}", str_ref.clone()),
|
||||
None => {
|
||||
panic!(
|
||||
"Could not find a Debug name for module ID {} in {:?}",
|
||||
self.0, names,
|
||||
);
|
||||
if PRETTY_PRINT_DEBUG_SYMBOLS {
|
||||
match names.get(&self.0) {
|
||||
Some(str_ref) => write!(f, "{}", str_ref.clone()),
|
||||
None => {
|
||||
panic!(
|
||||
"Could not find a Debug name for module ID {} in {:?}",
|
||||
self.0, names,
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -376,7 +380,7 @@ pub struct IdentId(u32);
|
|||
///
|
||||
/// Each module name is stored twice, for faster lookups.
|
||||
/// Since these are interned strings, this shouldn't result in many total allocations in practice.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub struct IdentIds {
|
||||
by_ident: MutMap<InlinableString, IdentId>,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue