Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compiler/noirc_frontend/src/elaborator/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ impl Elaborator<'_> {
self.interner.get_type(type_id)
}

pub(super) fn get_trait_mut(&mut self, trait_id: TraitId) -> &mut Trait {
self.interner.get_trait_mut(trait_id)
pub(super) fn get_trait(&mut self, trait_id: TraitId) -> &Trait {
self.interner.get_trait(trait_id)
}

/// For each [crate::elaborator::LambdaContext] on the lambda stack with a scope index higher than that
Expand Down Expand Up @@ -159,12 +159,12 @@ impl Elaborator<'_> {
}

/// Lookup a given trait by name/path.
pub(crate) fn lookup_trait_or_error(&mut self, path: TypedPath) -> Option<&mut Trait> {
pub(crate) fn lookup_trait_or_error(&mut self, path: TypedPath) -> Option<&Trait> {
let location = path.location;
match self.resolve_path_or_error(path, PathResolutionTarget::Type) {
Ok(item) => {
if let PathResolutionItem::Trait(trait_id) = item {
Some(self.get_trait_mut(trait_id))
Some(self.get_trait(trait_id))
} else {
self.push_err(ResolverError::Expected {
expected: "trait",
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/elaborator/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ impl Elaborator<'_> {
return Vec::new();
};

let the_trait = self.get_trait_mut(trait_id);
let the_trait = self.get_trait(trait_id);

if the_trait.associated_types.len() > bound.trait_generics.named_args.len() {
let trait_name = the_trait.name.to_string();
Expand Down
Loading