Folkert's suggestions

This commit is contained in:
ayazhafiz 2022-02-01 23:42:28 -05:00
parent df8113ce32
commit ae5766fdf5
3 changed files with 5 additions and 5 deletions

View file

@ -328,10 +328,10 @@ impl TypedNumericBound for NumericBound<FloatWidth> {
impl TypedNumericBound for NumericBound<NumWidth> { impl TypedNumericBound for NumericBound<NumWidth> {
fn concrete_num_type(&self) -> Option<Type> { fn concrete_num_type(&self) -> Option<Type> {
match *self { match self {
NumericBound::None => None, NumericBound::None => None,
NumericBound::Exact(NumWidth::Int(iw)) => NumericBound::Exact(iw).concrete_num_type(), NumericBound::Exact(NumWidth::Int(iw)) => NumericBound::Exact(*iw).concrete_num_type(),
NumericBound::Exact(NumWidth::Float(fw)) => NumericBound::Exact(fw).concrete_num_type(), NumericBound::Exact(NumWidth::Float(fw)) => NumericBound::Exact(*fw).concrete_num_type(),
} }
} }
} }

View file

@ -361,7 +361,7 @@ fn write_content(env: &Env, content: &Content, subs: &Subs, buf: &mut String, pa
let arg_var = subs[arg_var_index]; let arg_var = subs[arg_var_index];
let content = subs.get_content_without_compacting(arg_var); let content = subs.get_content_without_compacting(arg_var);
match *content { match content {
Alias(Symbol::NUM_BINARY32, _, _) => buf.push_str("F32"), Alias(Symbol::NUM_BINARY32, _, _) => buf.push_str("F32"),
Alias(Symbol::NUM_BINARY64, _, _) => buf.push_str("F64"), Alias(Symbol::NUM_BINARY64, _, _) => buf.push_str("F64"),
Alias(Symbol::NUM_DECIMAL, _, _) => buf.push_str("Dec"), Alias(Symbol::NUM_DECIMAL, _, _) => buf.push_str("Dec"),

View file

@ -940,7 +940,7 @@ fn to_expr_report<'b>(
region, region,
Some(expr_region), Some(expr_region),
alloc.text("This numeric literal is being used improperly:"), alloc.text("This numeric literal is being used improperly:"),
alloc.text("Here's it's been used as"), alloc.text("Here the value is used as a:"),
alloc.text("But its suffix says it's a:"), alloc.text("But its suffix says it's a:"),
None, None,
), ),