Skip to content

Commit

Permalink
fmt & clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher committed Mar 7, 2024
1 parent db6b1db commit e3885cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions compiler/noirc_frontend/src/hir/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,9 @@ fn check_if_type_is_valid_for_program_input(
errors: &mut Vec<TypeCheckError>,
) {
let meta = type_checker.interner.function_meta(&func_id);
if meta.is_entry_point {
if !param.1.is_valid_for_program_input() {
let span = param.0.span();
errors.push(TypeCheckError::InvalidTypeForEntryPoint { span });
}
if meta.is_entry_point && !param.1.is_valid_for_program_input() {
let span = param.0.span();
errors.push(TypeCheckError::InvalidTypeForEntryPoint { span });
}
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/hir_def/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ impl Type {
Type::Alias(alias, generics) => {
let alias = alias.borrow();
alias.get_type(generics).is_valid_for_program_input()
},
}

Type::Array(length, element) => {
length.is_valid_for_program_input() && element.is_valid_for_program_input()
Expand Down

0 comments on commit e3885cb

Please sign in to comment.