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
4 changes: 1 addition & 3 deletions tooling/nargo_cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
// There's no "src/main.nr" here so it's trickier to make this work
"overlapping_dep_and_mod",
// bug
"poseidonsponge_x5_254",

Check warning on line 129 in tooling/nargo_cli/build.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (poseidonsponge)
// bug
"regression_5045",
// bug
Expand All @@ -143,14 +143,12 @@
/// These tests are ignored because of existing bugs in `nargo expand`.
/// As the bugs are fixed these tests should be removed from this list.
/// (some are ignored on purpose for the same reason as `IGNORED_NARGO_EXPAND_EXECUTION_TESTS`)
const IGNORED_NARGO_EXPAND_COMPILE_SUCCESS_EMPTY_TESTS: [&str; 15] = [
const IGNORED_NARGO_EXPAND_COMPILE_SUCCESS_EMPTY_TESTS: [&str; 14] = [
// There's no "src/main.nr" here so it's trickier to make this work
"overlapping_dep_and_mod",
// bug
"reexports",
// bug
"regression_4436",
// bug
"regression_7038",
// bug
"regression_7038_2",
Expand Down Expand Up @@ -676,7 +674,7 @@
writeln!(test_file, "}}").unwrap();
}

/// Here we check, for every program in `test_programs/exeuction_success`, that:

Check warning on line 677 in tooling/nargo_cli/build.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (exeuction)
/// 1. `nargo expand` works on it
/// 2. That the output of the original program is the same as the output of the expanded program
/// (that is, we run `nargo execute` on the original program and the expanded program and compare the output)
Expand Down
15 changes: 13 additions & 2 deletions tooling/nargo_cli/src/cli/expand_cmd/printer/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
}
}

fn show_hir_expression_id_maybe_inside_curlies(&mut self, expr_id: ExprId) {

Check warning on line 52 in tooling/nargo_cli/src/cli/expand_cmd/printer/hir.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (curlies)
let hir_expr = self.interner.expression(&expr_id);
let curlies = hir_expression_needs_parentheses(&hir_expr);

Check warning on line 54 in tooling/nargo_cli/src/cli/expand_cmd/printer/hir.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (curlies)
if curlies {

Check warning on line 55 in tooling/nargo_cli/src/cli/expand_cmd/printer/hir.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (curlies)
self.push('{');
}
self.show_hir_expression(hir_expr);
if curlies {

Check warning on line 59 in tooling/nargo_cli/src/cli/expand_cmd/printer/hir.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (curlies)
self.push('}');
}
}
Expand Down Expand Up @@ -254,7 +254,7 @@
self.show_type(&hir_lambda.return_type);
self.push_str(" ");
}
self.show_hir_expression_id_maybe_inside_curlies(hir_lambda.body);

Check warning on line 257 in tooling/nargo_cli/src/cli/expand_cmd/printer/hir.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (curlies)
}

fn show_hir_match(&mut self, hir_match: HirMatch) {
Expand Down Expand Up @@ -694,8 +694,19 @@
let definition = self.interner.definition(ident.id);
match definition.kind {
DefinitionKind::Function(func_id) => {
let use_import = true;
self.show_reference_to_module_def_id(ModuleDefId::FunctionId(func_id), use_import);
let func_meta = self.interner.function_meta(&func_id);
if func_meta.self_type.is_some() && func_meta.self_type == self.self_type {
// No need to fully-qualify the function name if its self type is the current self type
let name = self.interner.function_name(&func_id);
self.push_str("Self::");
self.push_str(name);
} else {
let use_import = true;
self.show_reference_to_module_def_id(
ModuleDefId::FunctionId(func_id),
use_import,
);
}
}
DefinitionKind::Global(global_id) => {
let global_info = self.interner.get_global(global_id);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading