prevent clone for all function signatures

This commit is contained in:
Folkert 2022-03-13 22:35:56 +01:00
parent ceb69ace4d
commit e8bf5fa378
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 36 additions and 6 deletions

View file

@ -529,6 +529,18 @@ impl Constraints {
Constraint::Store(type_index, variable, string_index, line_number)
}
pub fn store_index(
&mut self,
type_index: EitherIndex<Type, Variable>,
variable: Variable,
filename: &'static str,
line_number: u32,
) -> Constraint {
let string_index = Index::push_new(&mut self.strings, filename);
Constraint::Store(type_index, variable, string_index, line_number)
}
}
roc_error_macros::assert_sizeof_default!(Constraint, 3 * 8);