mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Add extra commentabout unsafe usage
This commit is contained in:
parent
d9d0d0c0af
commit
ad974dd473
1 changed files with 1 additions and 0 deletions
|
@ -261,6 +261,7 @@ where
|
|||
let layout_map = self.layout_map();
|
||||
for arg in *arguments {
|
||||
if let Some(layout) = layout_map.get(arg) {
|
||||
// This is safe because every value in the map is always set with a valid layout and cannot be null.
|
||||
arg_layouts.push(unsafe { *(*layout) });
|
||||
} else {
|
||||
return Err(format!("the argument, {:?}, has no know layout", arg));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue