-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into kw/bb-binaries
* master: chore!: Remove keys from preprocessed artifacts (#2283) chore(noir): Release 0.10.5 (#2482) feat: Basic implementation of traits (#2368) fix: Implement constant folding during the mem2reg pass (#2464)
- Loading branch information
Showing
61 changed files
with
1,244 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.10.4" | ||
".": "0.10.5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ resolver = "2" | |
|
||
[workspace.package] | ||
# x-release-please-start-version | ||
version = "0.10.4" | ||
version = "0.10.5" | ||
# x-release-please-end | ||
authors = ["The Noir Team <[email protected]>"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
crates/nargo_cli/tests/compile_failure/dup_trait_declaration/Nargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "dup_trait_declaration" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = "0.9.0" | ||
|
||
[dependencies] |
2 changes: 2 additions & 0 deletions
2
crates/nargo_cli/tests/compile_failure/dup_trait_declaration/Prover.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
x = 1 | ||
y = 2 |
26 changes: 26 additions & 0 deletions
26
crates/nargo_cli/tests/compile_failure/dup_trait_declaration/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use dep::std; | ||
|
||
trait Default { | ||
fn default(x: Field, y: Field) -> Self; | ||
} | ||
|
||
struct Foo { | ||
bar: Field, | ||
array: [Field; 2], | ||
} | ||
|
||
impl Default for Foo { | ||
fn default(x: Field,y: Field) -> Self { | ||
Self { bar: x, array: [x,y] } | ||
} | ||
} | ||
|
||
// Duplicate trait declarations should not compile | ||
trait Default { | ||
fn default(x: Field) -> Self; | ||
} | ||
|
||
fn main(x: Field, y: Field) { | ||
let first = Foo::default(x,y); | ||
assert(first.bar == x); | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/nargo_cli/tests/compile_failure/dup_trait_implementation/Nargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "dup_trait_implementation" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = "0.9.0" | ||
|
||
[dependencies] |
2 changes: 2 additions & 0 deletions
2
crates/nargo_cli/tests/compile_failure/dup_trait_implementation/Prover.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
x = 1 | ||
y = 2 |
30 changes: 30 additions & 0 deletions
30
crates/nargo_cli/tests/compile_failure/dup_trait_implementation/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use dep::std; | ||
|
||
trait Default { | ||
fn default(x: Field, y: Field) -> Self; | ||
} | ||
|
||
struct Foo { | ||
bar: Field, | ||
array: [Field; 2], | ||
} | ||
|
||
// Duplicate trait implementations should not compile | ||
impl Default for Foo { | ||
fn default(x: Field,y: Field) -> Self { | ||
Self { bar: x, array: [x,y] } | ||
} | ||
} | ||
|
||
// Duplicate trait implementations should not compile | ||
impl Default for Foo { | ||
fn default(x: Field, y: Field) -> Self { | ||
Self { bar: y, array: [y,x] } | ||
} | ||
} | ||
|
||
|
||
fn main(x: Field, y: Field) { | ||
let first = Foo::default(x,y); | ||
assert(first.bar == x); | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/nargo_cli/tests/compile_failure/impl_struct_not_trait/Nargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "impl_struct_not_trait" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = "0.9.0" | ||
|
||
[dependencies] |
2 changes: 2 additions & 0 deletions
2
crates/nargo_cli/tests/compile_failure/impl_struct_not_trait/Prover.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
x = 1 | ||
y = 2 |
23 changes: 23 additions & 0 deletions
23
crates/nargo_cli/tests/compile_failure/impl_struct_not_trait/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use dep::std; | ||
|
||
struct Foo { | ||
bar: Field, | ||
array: [Field; 2], | ||
} | ||
|
||
struct Default { | ||
x: Field, | ||
z: Field, | ||
} | ||
|
||
// Default is struct not a trait | ||
impl Default for Foo { | ||
fn default(x: Field, y: Field) -> Self { | ||
Self { bar: x, array: [x,y] } | ||
} | ||
} | ||
|
||
fn main(x: Field, y: Field) { | ||
let first = Foo::default(x,y); | ||
assert(first.bar == x); | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/nargo_cli/tests/compile_failure/trait_missing_implementation/Nargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "traits" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = "0.1" | ||
|
||
[dependencies] |
Oops, something went wrong.