diff --git a/crates/nargo_cli/tests/compile_failure/brillig_assert_fail/src/main.nr b/crates/nargo_cli/tests/compile_failure/brillig_assert_fail/src/main.nr index 320369c7b67..801a818c816 100644 --- a/crates/nargo_cli/tests/compile_failure/brillig_assert_fail/src/main.nr +++ b/crates/nargo_cli/tests/compile_failure/brillig_assert_fail/src/main.nr @@ -8,4 +8,4 @@ fn main(x: Field) { unconstrained fn conditional(x : bool) -> Field { assert(x); 1 -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/compile_success_empty/brillig_to_bits/src/main.nr b/crates/nargo_cli/tests/compile_success_empty/brillig_to_bits/src/main.nr index 65b0e5ca86c..a2ab0d4bc5a 100644 --- a/crates/nargo_cli/tests/compile_success_empty/brillig_to_bits/src/main.nr +++ b/crates/nargo_cli/tests/compile_success_empty/brillig_to_bits/src/main.nr @@ -21,4 +21,4 @@ unconstrained fn main() { assert(be_bit == le_bit); } -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/compile_success_empty/closure_explicit_types/src/main.nr b/crates/nargo_cli/tests/compile_success_empty/closure_explicit_types/src/main.nr index 1db36dcdd77..13187adefea 100644 --- a/crates/nargo_cli/tests/compile_success_empty/closure_explicit_types/src/main.nr +++ b/crates/nargo_cli/tests/compile_success_empty/closure_explicit_types/src/main.nr @@ -57,4 +57,4 @@ fn main() { let y: u32 = 30; let z: u64 = 40; assert(accepts_closure3(|| y as u64 + z) == 70); -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/compile_success_empty/comptime_sort/src/main.nr b/crates/nargo_cli/tests/compile_success_empty/comptime_sort/src/main.nr index 72b05044331..f8bd38654c0 100644 --- a/crates/nargo_cli/tests/compile_success_empty/comptime_sort/src/main.nr +++ b/crates/nargo_cli/tests/compile_success_empty/comptime_sort/src/main.nr @@ -1,3 +1,4 @@ + fn main() { let unsorted: [u8; 3] = [3,1,2]; let sorted = unsorted.sort(); diff --git a/crates/nargo_cli/tests/compile_success_empty/higher_order_fn_selector/src/main.nr b/crates/nargo_cli/tests/compile_success_empty/higher_order_fn_selector/src/main.nr index 767cff0c409..e1a13919f4c 100644 --- a/crates/nargo_cli/tests/compile_success_empty/higher_order_fn_selector/src/main.nr +++ b/crates/nargo_cli/tests/compile_success_empty/higher_order_fn_selector/src/main.nr @@ -1,4 +1,3 @@ -use dep::std; fn g(x: &mut Field) -> () { *x *= 2; diff --git a/crates/nargo_cli/tests/compile_success_empty/ret_fn_ret_cl/src/main.nr b/crates/nargo_cli/tests/compile_success_empty/ret_fn_ret_cl/src/main.nr index d3a3346b541..a368dc58529 100644 --- a/crates/nargo_cli/tests/compile_success_empty/ret_fn_ret_cl/src/main.nr +++ b/crates/nargo_cli/tests/compile_success_empty/ret_fn_ret_cl/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - fn f(x: Field) -> Field { x + 1 } diff --git a/crates/nargo_cli/tests/compile_success_empty/to_bits/src/main.nr b/crates/nargo_cli/tests/compile_success_empty/to_bits/src/main.nr index feeb5089d13..65ff9dcac01 100644 --- a/crates/nargo_cli/tests/compile_success_empty/to_bits/src/main.nr +++ b/crates/nargo_cli/tests/compile_success_empty/to_bits/src/main.nr @@ -1,4 +1,3 @@ -use dep::std; fn main() { let field = 1000; @@ -21,4 +20,4 @@ fn main() { assert(be_bit == le_bit); } -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/6_array/src/main.nr b/crates/nargo_cli/tests/execution_success/6_array/src/main.nr index 3b98a2b99bb..cfdcf34d3ad 100644 --- a/crates/nargo_cli/tests/execution_success/6_array/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/6_array/src/main.nr @@ -7,7 +7,7 @@ fn main(x: [u32; 5], y: [u32; 5], mut z: u32, t: u32) { c = z*z*y[i]; z -= c; } - assert(z==0); //y[4]=0, so c and z are always 0 + assert(z == 0); //y[4]=0, so c and z are always 0 //Test 2: c = 2301 as u32; @@ -16,7 +16,7 @@ fn main(x: [u32; 5], y: [u32; 5], mut z: u32, t: u32) { c = z*z*x[i]; z += x[i]*y[i] - c; } - assert(z==3814912846); + assert(z == 3814912846); //Test 3: c = 2300001 as u32; @@ -28,7 +28,7 @@ fn main(x: [u32; 5], y: [u32; 5], mut z: u32, t: u32) { z *= c; } } - assert(z==41472); + assert(z == 41472); //Test 4: z = y[4]; @@ -38,7 +38,7 @@ fn main(x: [u32; 5], y: [u32; 5], mut z: u32, t: u32) { z += x[i+j] - y[i+j]; } } - assert(z ==11539); + assert(z == 11539); //Test 5: let cc = if z < 1 { x } else { y }; diff --git a/crates/nargo_cli/tests/execution_success/7_function/src/main.nr b/crates/nargo_cli/tests/execution_success/7_function/src/main.nr index 26ecf6dda28..c664a791636 100644 --- a/crates/nargo_cli/tests/execution_success/7_function/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/7_function/src/main.nr @@ -1,6 +1,4 @@ //Tests for function calling -use dep::std; - fn f1(mut x: Field) -> Field { x = x + 1; x = f2(x); diff --git a/crates/nargo_cli/tests/execution_success/8_integration/src/main.nr b/crates/nargo_cli/tests/execution_success/8_integration/src/main.nr index 56b02650c27..52f53efd3aa 100644 --- a/crates/nargo_cli/tests/execution_success/8_integration/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/8_integration/src/main.nr @@ -279,5 +279,5 @@ fn main(a: [u32; 100], b: [u32; 100], c: [u32; 4], mut d: [u32; 4], m: [u8; 32]) sha_hash = iterate3(sha_hash); let h6 = test6(m); - assert(h6[0]== 523008072); //31.. 3800709683 + assert(h6[0] == 523008072); //31.. 3800709683 } diff --git a/crates/nargo_cli/tests/execution_success/9_conditional/src/main.nr b/crates/nargo_cli/tests/execution_success/9_conditional/src/main.nr index 48ac639ecf0..c1091304e03 100644 --- a/crates/nargo_cli/tests/execution_success/9_conditional/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/9_conditional/src/main.nr @@ -79,7 +79,7 @@ fn main(a: u32, mut c: [u32; 4], x: [u8; 5], result: pub [u8; 32]){ } } } - assert(c1==1); + assert(c1 == 1); //Regression for Issue #579 let result1_true = test(true); @@ -143,7 +143,7 @@ fn main(a: u32, mut c: [u32; 4], x: [u8; 5], result: pub [u8; 32]){ } assert(y == result[0]); c = sort(c); - assert(c[0]==0); + assert(c[0] == 0); //test 1 let mut x: u32 = 0; diff --git a/crates/nargo_cli/tests/execution_success/array_dynamic/src/main.nr b/crates/nargo_cli/tests/execution_success/array_dynamic/src/main.nr index 69e5fdc93db..db8f10b27e9 100644 --- a/crates/nargo_cli/tests/execution_success/array_dynamic/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/array_dynamic/src/main.nr @@ -29,4 +29,4 @@ fn dyn_array(mut x: [u32; 5], y: Field, z: Field) { x[y] = 0; } assert(x[4] == 109); -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/array_len/src/main.nr b/crates/nargo_cli/tests/execution_success/array_len/src/main.nr index ac9811e021e..3e9d3603311 100644 --- a/crates/nargo_cli/tests/execution_success/array_len/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/array_len/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - fn len_plus_1(array: [T; N]) -> Field { array.len() + 1 } diff --git a/crates/nargo_cli/tests/execution_success/assert_statement/src/main.nr b/crates/nargo_cli/tests/execution_success/assert_statement/src/main.nr index 7dab317d924..4ac9dd26c02 100644 --- a/crates/nargo_cli/tests/execution_success/assert_statement/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/assert_statement/src/main.nr @@ -3,4 +3,4 @@ // The features being tested is assertion fn main(x : Field, y : Field) { assert(x == y); -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/bool_not/src/main.nr b/crates/nargo_cli/tests/execution_success/bool_not/src/main.nr index d6b4d7a9fad..a0afe770121 100644 --- a/crates/nargo_cli/tests/execution_success/bool_not/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/bool_not/src/main.nr @@ -1,4 +1,3 @@ -use dep::std; fn main(x: u1) { assert(!x == 0); } diff --git a/crates/nargo_cli/tests/execution_success/bool_or/src/main.nr b/crates/nargo_cli/tests/execution_success/bool_or/src/main.nr index 4a74027e4aa..87d7e870063 100644 --- a/crates/nargo_cli/tests/execution_success/bool_or/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/bool_or/src/main.nr @@ -1,4 +1,3 @@ -use dep::std; fn main(x: u1, y: u1) { assert(x | y == 1); diff --git a/crates/nargo_cli/tests/execution_success/brillig_assert/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_assert/src/main.nr index 320369c7b67..801a818c816 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_assert/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_assert/src/main.nr @@ -8,4 +8,4 @@ fn main(x: Field) { unconstrained fn conditional(x : bool) -> Field { assert(x); 1 -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_calls_array/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_calls_array/src/main.nr index 39b2ad1582c..3af825c38f9 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_calls_array/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_calls_array/src/main.nr @@ -30,4 +30,4 @@ unconstrained fn another_entry_point(x: [u32; 3]) { assert(x[0] == 1); assert(x[1] == 2); assert(x[2] == 3); -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_conditional/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_conditional/src/main.nr index 4ddd351ad04..3755dd93c01 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_conditional/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_conditional/src/main.nr @@ -11,4 +11,4 @@ unconstrained fn conditional(x : bool) -> Field { }else { 5 } -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_ecdsa/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_ecdsa/src/main.nr index 978f2c3db4d..9b4627adf40 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_ecdsa/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_ecdsa/src/main.nr @@ -9,4 +9,4 @@ fn main(hashed_message : [u8;32], pub_key_x : [u8;32], pub_key_y : [u8;32], sign unconstrained fn ecdsa(hashed_message : [u8;32], pub_key_x : [u8;32], pub_key_y : [u8;32], signature : [u8;64]) -> bool { std::ecdsa_secp256k1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message) -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/src/main.nr index bae24b8c4b1..d0985a9012d 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/src/main.nr @@ -29,8 +29,6 @@ unconstrained fn wrapper_with_struct(my_struct: MyStruct, param: u32) -> u32 { func(param) } - - fn increment_acir(x: u32) -> u32 { x + 1 -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_identity_function/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_identity_function/src/main.nr index 5ad4e913e92..f711c5e86ba 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_identity_function/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_identity_function/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - struct myStruct { foo: Field, foo_arr: [Field; 2], @@ -32,4 +30,4 @@ unconstrained fn identity_array(arr : [Field; 2]) -> [Field; 2] { unconstrained fn identity_struct(s : myStruct) -> myStruct { s -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_keccak/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_keccak/src/main.nr index 96c8178381c..fcc2a772d10 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_keccak/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_keccak/src/main.nr @@ -24,4 +24,4 @@ fn main(x: Field, result: [u8; 32]) { unconstrained fn keccak256(data: [u8; N], msg_len: u32) -> [u8; 32] { std::hash::keccak256(data, msg_len) -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_nested_slices/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/src/main.nr index f239d94fdc1..3d8a6748ccf 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_nested_slices/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/src/main.nr @@ -1,6 +1,4 @@ use dep::std::slice; -use dep::std; - // Tests nested slice passing to/from functions unconstrained fn push_back_to_slice(slice: [T], item: T) -> [T] { slice.push_back(item) diff --git a/crates/nargo_cli/tests/execution_success/brillig_not/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_not/src/main.nr index bc94810efb9..0466649f67c 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_not/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_not/src/main.nr @@ -8,4 +8,4 @@ fn main(x: Field, y : Field) { unconstrained fn not_operator(x : bool) -> bool { !x -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr index 4455acc02f8..403956bc23d 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr @@ -1,6 +1,4 @@ use dep::std::slice; -use dep::std; - unconstrained fn main(x: Field, y: Field) { let mut slice: [Field] = [y, x]; assert(slice.len() == 2); diff --git a/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/src/main.nr index 508725407d0..d1e1cb9c9a5 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - unconstrained fn main(x : Field) -> pub [u8; 31] { // The result of this byte array will be big-endian let byte_array = x.to_be_bytes(31); diff --git a/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/src/main.nr index 964f4b49bf5..08986867dfc 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/src/main.nr @@ -24,4 +24,4 @@ unconstrained fn main(x : Field, _y: Field) { assert(p_bits[100] == z_bits[100]); _y.to_le_bits(std::field::modulus_num_bits() as u32); -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/src/main.nr index a72b13dcdf5..1b1315ea411 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - unconstrained fn main(x : Field) -> pub [u8; 31] { // The result of this byte array will be little-endian let byte_array = x.to_le_bytes(31); diff --git a/crates/nargo_cli/tests/execution_success/closures_mut_ref/src/main.nr b/crates/nargo_cli/tests/execution_success/closures_mut_ref/src/main.nr index ae990e004fd..1f439a3b43d 100644 --- a/crates/nargo_cli/tests/execution_success/closures_mut_ref/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/closures_mut_ref/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - fn main(mut x: Field) { let one = 1; let add1 = |z| { diff --git a/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/src/main.nr b/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/src/main.nr index dfac8673b38..2512531cb04 100644 --- a/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/src/main.nr @@ -1,6 +1,5 @@ use dep::std; - fn main(message : [u8;38],hashed_message : [u8;32], pub_key_x : [u8;32], pub_key_y : [u8;32], signature : [u8;64]) { // Hash the message, since secp256k1 expects a hashed_message let expected= std::hash::sha256(message); @@ -8,4 +7,4 @@ fn main(message : [u8;38],hashed_message : [u8;32], pub_key_x : [u8;32], pub_key let valid_signature = std::ecdsa_secp256k1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message); assert(valid_signature); -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/src/main.nr b/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/src/main.nr index 058f4ca8fb1..e81d84fd902 100644 --- a/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/src/main.nr @@ -1,7 +1,6 @@ use dep::std; - fn main(hashed_message : [u8;32], pub_key_x : [u8;32], pub_key_y : [u8;32], signature : [u8;64]) { let valid_signature = std::ecdsa_secp256r1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message); assert(valid_signature); -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/eddsa/src/main.nr b/crates/nargo_cli/tests/execution_success/eddsa/src/main.nr index 8de38011aaf..870a20fe01a 100644 --- a/crates/nargo_cli/tests/execution_success/eddsa/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/eddsa/src/main.nr @@ -2,8 +2,6 @@ use dep::std::compat; use dep::std::ec::consts::te::baby_jubjub; use dep::std::hash; use dep::std::eddsa::eddsa_poseidon_verify; -use dep::std; - fn main(msg: pub Field, _priv_key_a: Field, _priv_key_b: Field) { // Skip this test for non-bn254 backends if compat::is_bn254() { @@ -52,4 +50,4 @@ fn main(msg: pub Field, _priv_key_a: Field, _priv_key_b: Field) { // User A's signature over the message can't be used with another message assert(!eddsa_poseidon_verify(pub_key_a.x, pub_key_a.y, s_a, r8_a.x, r8_a.y, msg + 1)); } -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/global_consts/src/baz.nr b/crates/nargo_cli/tests/execution_success/global_consts/src/baz.nr index e52efc52eae..626477a89d0 100644 --- a/crates/nargo_cli/tests/execution_success/global_consts/src/baz.nr +++ b/crates/nargo_cli/tests/execution_success/global_consts/src/baz.nr @@ -2,4 +2,4 @@ fn from_baz(x : [Field; crate::foo::MAGIC_NUMBER]) { for i in 0..crate::foo::MAGIC_NUMBER { assert(x[i] == crate::foo::MAGIC_NUMBER); }; -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/global_consts/src/foo.nr b/crates/nargo_cli/tests/execution_success/global_consts/src/foo.nr index 2db74fb1ff7..6aa27be61ca 100644 --- a/crates/nargo_cli/tests/execution_success/global_consts/src/foo.nr +++ b/crates/nargo_cli/tests/execution_success/global_consts/src/foo.nr @@ -8,4 +8,4 @@ fn from_foo(x : [Field; bar::N]) { for i in 0..bar::N { assert(x[i] == bar::N); }; -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/global_consts/src/main.nr b/crates/nargo_cli/tests/execution_success/global_consts/src/main.nr index 13b9159b480..b4c72d1cff9 100644 --- a/crates/nargo_cli/tests/execution_success/global_consts/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/global_consts/src/main.nr @@ -78,18 +78,16 @@ fn arrays_neq(a: [Field; M], b: [Field; M]) { } mod mysubmodule { - use dep::std; + global N: Field = 10; + global L: Field = 50; - global N: Field = 10; - global L: Field = 50; - - fn my_bool_or(x: u1, y: u1) { - assert(x | y == 1); - } + fn my_bool_or(x: u1, y: u1) { + assert(x | y == 1); + } - fn my_helper() -> Field { - let N: Field = 15; // Like in Rust, local variables override globals - let x = N; - x - } + fn my_helper() -> Field { + let N: Field = 15; // Like in Rust, local variables override globals + let x = N; + x + } } diff --git a/crates/nargo_cli/tests/execution_success/higher_order_functions/src/main.nr b/crates/nargo_cli/tests/execution_success/higher_order_functions/src/main.nr index 782b6af998e..0216b4070fb 100644 --- a/crates/nargo_cli/tests/execution_success/higher_order_functions/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/higher_order_functions/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - fn main() -> pub Field { let f = if 3 * 7 > 200 as u32 { foo } else { bar }; assert(f()[1] == 2); diff --git a/crates/nargo_cli/tests/execution_success/if_else_chain/src/main.nr b/crates/nargo_cli/tests/execution_success/if_else_chain/src/main.nr index 5105c18c7de..f83ba2dde0e 100644 --- a/crates/nargo_cli/tests/execution_success/if_else_chain/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/if_else_chain/src/main.nr @@ -1,4 +1,3 @@ - fn main(a: u32, mut c: [u32; 4]){ if a == c[0] { assert(c[0] == 0); diff --git a/crates/nargo_cli/tests/execution_success/integer_array_indexing/src/main.nr b/crates/nargo_cli/tests/execution_success/integer_array_indexing/src/main.nr index e89e2ffbb80..1e0ec518b9f 100644 --- a/crates/nargo_cli/tests/execution_success/integer_array_indexing/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/integer_array_indexing/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - global ARRAY_LEN: u32 = 3; fn main(arr: [Field; ARRAY_LEN], x: u32) -> pub Field { diff --git a/crates/nargo_cli/tests/execution_success/modulus/src/main.nr b/crates/nargo_cli/tests/execution_success/modulus/src/main.nr index 4a13a6e06ba..bb1a0ff5478 100644 --- a/crates/nargo_cli/tests/execution_success/modulus/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/modulus/src/main.nr @@ -24,4 +24,4 @@ fn main(bn254_modulus_be_bytes : [u8; 32], bn254_modulus_be_bits : [u1; 254]) -> } modulus_size -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/pred_eq/src/main.nr b/crates/nargo_cli/tests/execution_success/pred_eq/src/main.nr index c7986cb7af3..d1e79a3e408 100644 --- a/crates/nargo_cli/tests/execution_success/pred_eq/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/pred_eq/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - fn main(x: Field, y: Field) { let p = x == y; assert(p == true); diff --git a/crates/nargo_cli/tests/execution_success/signed_division/src/main.nr b/crates/nargo_cli/tests/execution_success/signed_division/src/main.nr index 22f0109ad1e..7bc6d7fc936 100644 --- a/crates/nargo_cli/tests/execution_success/signed_division/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/signed_division/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - // Testing signed integer division: // 7/3 = 2 // -7/3 = -2 @@ -13,8 +11,8 @@ fn main(mut x: i32, mut y: i32, mut z: i32) { let minus_x = 0-x; let minus_z = 0-z; let minus_y = 0-y; - assert(x+minus_x==0); - assert(z+minus_z==0); + assert(x+minus_x == 0); + assert(z+minus_z == 0); assert(minus_x / y == minus_z); // -7/-3 = 2 diff --git a/crates/nargo_cli/tests/execution_success/simple_radix/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_radix/src/main.nr index 4d07d8bd368..9ce6d86f13a 100644 --- a/crates/nargo_cli/tests/execution_success/simple_radix/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/simple_radix/src/main.nr @@ -1,7 +1,5 @@ // Simple program to test to_radix -use dep::std; - fn main(x : Field) { let bits = x.to_le_bits(3); assert(bits[0] == 0); diff --git a/crates/nargo_cli/tests/execution_success/simple_shift_left_right/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_shift_left_right/src/main.nr index 1bcbbde2eb5..f12b2d8bf20 100644 --- a/crates/nargo_cli/tests/execution_success/simple_shift_left_right/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/simple_shift_left_right/src/main.nr @@ -5,4 +5,4 @@ fn main(x : u32) { let z = x >> 4; let t = x << 4; assert(z == t >> 8); -} \ No newline at end of file +} diff --git a/crates/nargo_cli/tests/execution_success/struct/src/main.nr b/crates/nargo_cli/tests/execution_success/struct/src/main.nr index a6d3eddd8d5..5e3530e8364 100644 --- a/crates/nargo_cli/tests/execution_success/struct/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/struct/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - struct Foo { bar: Field, array: [Field; 2], diff --git a/crates/nargo_cli/tests/execution_success/struct_fields_ordering/src/main.nr b/crates/nargo_cli/tests/execution_success/struct_fields_ordering/src/main.nr index 0d6e411addf..5d4aa7c5a1e 100644 --- a/crates/nargo_cli/tests/execution_success/struct_fields_ordering/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/struct_fields_ordering/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - // Note that fields are not in alphabetical order. // We want to check that this ordering is maintained struct myStruct { diff --git a/crates/nargo_cli/tests/execution_success/struct_inputs/src/main.nr b/crates/nargo_cli/tests/execution_success/struct_inputs/src/main.nr index fe77ed6eee6..68858d98998 100644 --- a/crates/nargo_cli/tests/execution_success/struct_inputs/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/struct_inputs/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - mod foo; struct myStruct { diff --git a/crates/nargo_cli/tests/execution_success/submodules/src/main.nr b/crates/nargo_cli/tests/execution_success/submodules/src/main.nr index 9bfe382663f..3b8807ddb37 100644 --- a/crates/nargo_cli/tests/execution_success/submodules/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/submodules/src/main.nr @@ -6,8 +6,6 @@ fn main(x: u1, y: u1) { } mod mysubmodule { - use dep::std; - fn my_bool_or(x: u1, y: u1) { assert(x | y == 1); } diff --git a/crates/nargo_cli/tests/execution_success/to_be_bytes/src/main.nr b/crates/nargo_cli/tests/execution_success/to_be_bytes/src/main.nr index f5831e8c524..20e932c5073 100644 --- a/crates/nargo_cli/tests/execution_success/to_be_bytes/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/to_be_bytes/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - fn main(x : Field) -> pub [u8; 31] { // The result of this byte array will be big-endian let byte_array = x.to_be_bytes(31); diff --git a/crates/nargo_cli/tests/execution_success/to_le_bytes/src/main.nr b/crates/nargo_cli/tests/execution_success/to_le_bytes/src/main.nr index afa665923bf..9d7eb403083 100644 --- a/crates/nargo_cli/tests/execution_success/to_le_bytes/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/to_le_bytes/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - fn main(x : Field) -> pub [u8; 31] { // The result of this byte array will be little-endian let byte_array = x.to_le_bytes(31); diff --git a/crates/nargo_cli/tests/execution_success/tuples/src/main.nr b/crates/nargo_cli/tests/execution_success/tuples/src/main.nr index 45d8380372b..bfc943dfc07 100644 --- a/crates/nargo_cli/tests/execution_success/tuples/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/tuples/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - fn main(x: Field, y: Field) { let pair = (x, y); assert(pair.0 == 1); diff --git a/crates/nargo_cli/tests/execution_success/type_aliases/src/main.nr b/crates/nargo_cli/tests/execution_success/type_aliases/src/main.nr index 6cfafc91b7d..85a40c739e2 100644 --- a/crates/nargo_cli/tests/execution_success/type_aliases/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/type_aliases/src/main.nr @@ -1,5 +1,3 @@ -use dep::std; - type Foo = [T; 2]; type Bar = Field; diff --git a/crates/nargo_cli/tests/test_libraries/bin_dep/src/main.nr b/crates/nargo_cli/tests/test_libraries/bin_dep/src/main.nr index 882a9c70056..d469d3aafcb 100644 --- a/crates/nargo_cli/tests/test_libraries/bin_dep/src/main.nr +++ b/crates/nargo_cli/tests/test_libraries/bin_dep/src/main.nr @@ -1,4 +1,3 @@ - fn call_dep1_then_dep2(x : Field, y : Field) { assert(x == y); }