Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: updated "HirFunction::unsafe_from_expr" to "HirFunction::unchecked_from_expr" #823

Merged
merged 2 commits into from
Feb 12, 2023
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
2 changes: 1 addition & 1 deletion crates/noirc_frontend/src/hir/resolution/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl<'a> Resolver<'a> {
FunctionKind::Normal => {
let expr_id = self.intern_block(func.def.body);
self.interner.push_expr_location(expr_id, func.def.span, self.file);
HirFunction::unsafe_from_expr(expr_id)
HirFunction::unchecked_from_expr(expr_id)
}
};

Expand Down
2 changes: 1 addition & 1 deletion crates/noirc_frontend/src/hir/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ mod test {
interner.push_expr_location(expr_id, Span::single_char(0), file);

// Create function to enclose the let statement
let func = HirFunction::unsafe_from_expr(expr_id);
let func = HirFunction::unchecked_from_expr(expr_id);
let func_id = interner.push_fn(func);

let name = HirIdent {
Expand Down
2 changes: 1 addition & 1 deletion crates/noirc_frontend/src/hir_def/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl HirFunction {

// This function is marked as unsafe because
// the expression kind is not being checked
pub const fn unsafe_from_expr(expr_id: ExprId) -> HirFunction {
pub const fn unchecked_from_expr(expr_id: ExprId) -> HirFunction {
HirFunction(expr_id)
}

Expand Down