add a box in type Problem

This commit is contained in:
Folkert 2021-08-02 22:13:20 +02:00
parent 935464d7cf
commit 203c5b53be
2 changed files with 10 additions and 6 deletions

View File

@ -4491,10 +4491,14 @@ mod solve_expr {
#[test]
fn sizes() {
assert_eq!(std::mem::size_of::<roc_module::ident::TagName>(), 40);
assert_eq!(std::mem::size_of::<roc_types::subs::Descriptor>(), 136);
assert_eq!(std::mem::size_of::<roc_types::subs::Content>(), 120);
assert_eq!(std::mem::size_of::<roc_types::subs::FlatType>(), 112);
assert_eq!(std::mem::size_of::<roc_types::types::Problem>(), 104);
let query = (
std::mem::size_of::<roc_module::ident::TagName>(),
std::mem::size_of::<roc_types::subs::Descriptor>(),
std::mem::size_of::<roc_types::subs::Content>(),
std::mem::size_of::<roc_types::subs::FlatType>(),
std::mem::size_of::<roc_types::types::Problem>(),
);
assert_eq!(query, (40, 96, 80, 72, 64))
}
}

View File

@ -1116,7 +1116,7 @@ pub struct Alias {
#[derive(PartialEq, Eq, Debug, Clone, Hash)]
pub enum Problem {
CanonicalizationProblem,
CircularType(Symbol, ErrorType, Region),
CircularType(Symbol, Box<ErrorType>, Region),
CyclicAlias(Symbol, Region, Vec<Symbol>),
UnrecognizedIdent(InlinableString),
Shadowed(Region, Located<Ident>),