diff --git a/compiler/noirc_frontend/src/hir/type_check/expr.rs b/compiler/noirc_frontend/src/hir/type_check/expr.rs
index fb66bdeae6e..b56e2dce2a9 100644
--- a/compiler/noirc_frontend/src/hir/type_check/expr.rs
+++ b/compiler/noirc_frontend/src/hir/type_check/expr.rs
@@ -126,7 +126,7 @@ impl<'interner> TypeChecker<'interner> {
}
}
HirLiteral::Bool(_) => Type::Bool,
- HirLiteral::Integer(_, _) => Type::polymorphic_integer_or_field(self.interner),
+ HirLiteral::Integer(_, _) => self.polymorphic_integer_or_field(),
HirLiteral::Str(string) => {
let len = Type::Constant(string.len() as u64);
Type::String(Box::new(len))
@@ -418,23 +418,28 @@ impl<'interner> TypeChecker<'interner> {
self.interner.select_impl_for_expression(function_ident_id, impl_kind);
}
Err(erroring_constraints) => {
- // Don't show any errors where try_get_trait returns None.
- // This can happen if a trait is used that was never declared.
- let constraints = erroring_constraints
- .into_iter()
- .map(|constraint| {
- let r#trait = self.interner.try_get_trait(constraint.trait_id)?;
- let mut name = r#trait.name.to_string();
- if !constraint.trait_generics.is_empty() {
- let generics = vecmap(&constraint.trait_generics, ToString::to_string);
- name += &format!("<{}>", generics.join(", "));
- }
- Some((constraint.typ, name))
- })
- .collect::