Skip to content

Commit 9521586

Browse files
authored
chore: remove unconstrained generics from trait impls (#17075)
This fixes things for noir-lang/noir#9871 @nventuro
2 parents 007f622 + 30dc950 commit 9521586

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

.test_patterns.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ tests:
293293
error_regex: "ContractFunctionExecutionError: The contract function"
294294
owners:
295295
- *mitch
296+
- regex: "e2e_p2p/inactivity_slash_with_consecutive_epochs.test.ts"
297+
error_regex: "only slashes validator inactive for N consecutive epochs"
298+
owners:
299+
- *palla
300+
296301
# Nightly GKE tests
297302
- regex: "spartan/bootstrap.sh"
298303
owners:

noir-projects/aztec-nr/aztec/src/macros/utils.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub trait AsStrQuote {
213213
fn as_str_quote(self) -> (Self, u32);
214214
}
215215

216-
impl<let N: u32, Env> AsStrQuote for Quoted {
216+
impl AsStrQuote for Quoted {
217217
// Used to convert an arbitrary quoted type into a quoted string, removing whitespace between tokens
218218
comptime fn as_str_quote(self) -> (Quoted, u32) {
219219
let tokens = self.tokens();

noir-projects/aztec-nr/aztec/src/state_vars/delayed_public_mutable.nr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ pub struct DelayedPublicMutable<T, let InitialDelay: u64, Context> {
2121
storage_slot: Field,
2222
}
2323

24-
// This will make the Aztec macros require that T implements the Packable and Eq traits, and allocate `M` storage
24+
// This will make the Aztec macros require that T implements the Packable and Eq traits, and allocate `M + 1` storage
2525
// slots to this state variable.
26-
impl<T, let InitialDelay: u64, Context, let M: u32> HasStorageSlot<M> for DelayedPublicMutable<T, InitialDelay, Context>
26+
impl<T, let InitialDelay: u64, Context, let M: u32> HasStorageSlot<M + 1> for DelayedPublicMutable<T, InitialDelay, Context>
2727
where
28-
WithHash<DelayedPublicMutableValues<T, InitialDelay>, _>: Packable<N = M>,
28+
DelayedPublicMutableValues<T, InitialDelay>: Packable<N = M>,
2929
{
3030
fn get_storage_slot(self) -> Field {
3131
self.storage_slot

noir-projects/aztec-nr/aztec/src/state_vars/public_immutable.nr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ pub struct PublicImmutable<T, Context> {
6969
}
7070
// docs:end:public_immutable_struct
7171

72-
/// `WithHash<T>` stores both the packed value (using O fields) and its hash (1 field), requiring O = M + 1 total
72+
/// `PublicImmutable` stores both the packed value (using M fields) and its hash (1 field), requiring M + 1 total
7373
/// fields.
74-
impl<T, Context, let M: u32, let O: u32> HasStorageSlot<O> for PublicImmutable<T, Context>
74+
impl<T, Context, let M: u32> HasStorageSlot<M + 1> for PublicImmutable<T, Context>
7575
where
76-
WithHash<T, M>: Packable<N = O>,
76+
T: Packable<N = M>,
7777
{
7878
fn get_storage_slot(self) -> Field {
7979
self.storage_slot

0 commit comments

Comments
 (0)