equal_types_with_storage takes type index

This commit is contained in:
Ayaz Hafiz 2022-10-24 17:35:09 -05:00
parent cca5f53e98
commit c53e08f63c
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 28 additions and 18 deletions

View file

@ -281,14 +281,12 @@ impl Constraints {
pub fn equal_types_with_storage(
&mut self,
typ: Type,
expected: Expected<Type>,
type_index: TypeOrVar,
expected_index: ExpectedTypeIndex,
category: Category,
region: Region,
storage_var: Variable,
) -> Constraint {
let type_index = self.push_type(typ);
let expected_index = Index::push_new(&mut self.expectations, expected.map(Cell::new));
let category_index = Self::push_category(self, category);
let equal = Constraint::Eq(Eq(type_index, expected_index, category_index, region));