mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
some more unchecked operations
This commit is contained in:
parent
a1894195d3
commit
f1e1c45f2f
2 changed files with 7 additions and 5 deletions
|
@ -3092,12 +3092,10 @@ fn deep_copy_var_help(
|
|||
// avoid making multiple copies of the variable we are instantiating.
|
||||
//
|
||||
// Need to do this before recursively copying to avoid looping.
|
||||
subs.modify(var, |desc| {
|
||||
desc.mark = Mark::NONE;
|
||||
desc.copy = copy.into();
|
||||
});
|
||||
subs.set_mark_unchecked(var, Mark::NONE);
|
||||
subs.set_copy_unchecked(var, copy.into());
|
||||
|
||||
let content = *subs.get_content_without_compacting(var);
|
||||
let content = *subs.get_content_unchecked(var);
|
||||
|
||||
let actual_copy = subs.fresh(make_descriptor(content));
|
||||
debug_assert_eq!(copy, actual_copy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue