mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Expand on some comments
This commit is contained in:
parent
7a6625e979
commit
ad3c4207ba
1 changed files with 6 additions and 0 deletions
|
@ -116,6 +116,9 @@ impl<'a> Procs<'a> {
|
|||
.unwrap_or_else(|err| panic!("TODO turn fn_var into a RuntimeError {:?}", err));
|
||||
|
||||
// if we've already specialized this one, no further work is needed.
|
||||
//
|
||||
// NOTE: this #[allow(clippy::map_entry)] here is for correctness!
|
||||
// Changing it to use .entry() would necessarily make it incorrect.
|
||||
#[allow(clippy::map_entry)]
|
||||
if !self.specialized.contains_key(&(symbol, layout.clone())) {
|
||||
let pending = PendingSpecialization {
|
||||
|
@ -1531,6 +1534,9 @@ pub fn specialize_all<'a>(
|
|||
for (layout, pending) in by_layout.drain() {
|
||||
// If we've already seen this (Symbol, Layout) combination before,
|
||||
// don't try to specialize it again. If we do, we'll loop forever!
|
||||
//
|
||||
// NOTE: this #[allow(clippy::map_entry)] here is for correctness!
|
||||
// Changing it to use .entry() would necessarily make it incorrect.
|
||||
#[allow(clippy::map_entry)]
|
||||
if !procs.specialized.contains_key(&(name, layout.clone())) {
|
||||
// TODO should pending_procs hold a Rc<Proc>?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue