This commit is contained in:
Ayaz Hafiz 2022-07-04 23:04:41 -04:00 committed by ayazhafiz
parent 15afa36344
commit 4ef8ceef9e
No known key found for this signature in database
GPG key ID: B443F7A3030C9AED
5 changed files with 16 additions and 23 deletions

View file

@ -177,7 +177,7 @@ impl IntLitWidth {
}
fn is_signed(&self) -> bool {
return self.signedness_and_width().0 == IntSignedness::Signed;
self.signedness_and_width().0 == IntSignedness::Signed
}
pub fn type_str(&self) -> &'static str {

View file

@ -804,7 +804,7 @@ fn write_content<'a>(
Parens::Unnecessary,
);
}
buf.push_str(")");
buf.push(')');
}
Error => buf.push_str("<type mismatch>"),
}

View file

@ -3676,11 +3676,10 @@ fn content_to_err_type(
let err_type = var_to_err_type(subs, state, aliased_to);
// Lift RangedNumber up if needed.
match (symbol, &err_type) {
(Symbol::NUM_INT | Symbol::NUM_NUM | Symbol::NUM_INTEGER, ErrorType::Range(_)) => {
return err_type;
}
_ => {}
if let (Symbol::NUM_INT | Symbol::NUM_NUM | Symbol::NUM_INTEGER, ErrorType::Range(_)) =
(symbol, &err_type)
{
return err_type;
}
let mut err_args = Vec::with_capacity(args.len());