Skip to content

Commit

Permalink
Rename search function
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher committed Sep 16, 2024
1 parent 07b3182 commit b5e9983
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/elaborator/comptime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl<'context> Elaborator<'context> {
// If the function is varargs, push the type of the last slice element N times
// to account for N extra arguments.
let modifiers = interpreter.elaborator.interner.function_modifiers(&function);
let is_varargs = modifiers.attributes.is_varargs();
let is_varargs = modifiers.attributes.has_varargs();
let varargs_type = if is_varargs { parameters.pop() } else { None };

let varargs_elem_type = varargs_type.as_ref().and_then(|t| t.slice_element_type());
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/hir/comptime/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl<'local, 'interner> Interpreter<'local, 'interner> {
// This will affect where `Expression::resolve`, `Quoted::as_type`, and similar functions resolve.
let mut old_function = self.current_function;
let modifiers = self.elaborator.interner.function_modifiers(&function);
if !modifiers.attributes.is_use_callers_scope() {
if !modifiers.attributes.has_use_callers_scope() {
self.current_function = Some(function);
}

Expand Down
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,11 +698,11 @@ impl Attributes {
self.function.as_ref().map_or(false, |func_attribute| func_attribute.is_no_predicates())
}

pub fn is_varargs(&self) -> bool {
pub fn has_varargs(&self) -> bool {
self.secondary.iter().any(|attr| matches!(attr, SecondaryAttribute::Varargs))
}

pub fn is_use_callers_scope(&self) -> bool {
pub fn has_use_callers_scope(&self) -> bool {
self.secondary.iter().any(|attr| matches!(attr, SecondaryAttribute::UseCallersScope))
}
}
Expand Down

0 comments on commit b5e9983

Please sign in to comment.