From 1492fd076f7b0b0173a12d304175171a2c75048f Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Sat, 17 Aug 2024 05:10:23 -0700 Subject: [PATCH] chore: turn on associated type defaults (#87) --- halo2_proofs/src/lib.rs | 1 + halo2_proofs/src/plonk/circuit.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/halo2_proofs/src/lib.rs b/halo2_proofs/src/lib.rs index d670143b21..16b5ea34b2 100644 --- a/halo2_proofs/src/lib.rs +++ b/halo2_proofs/src/lib.rs @@ -10,6 +10,7 @@ // #![deny(unsafe_code)] #![allow(clippy::uninit_vec)] #![allow(clippy::too_many_arguments)] +#![feature(associated_type_defaults)] #[cfg(feature = "counter")] extern crate lazy_static; diff --git a/halo2_proofs/src/plonk/circuit.rs b/halo2_proofs/src/plonk/circuit.rs index 9d43aab734..c940a64472 100644 --- a/halo2_proofs/src/plonk/circuit.rs +++ b/halo2_proofs/src/plonk/circuit.rs @@ -794,7 +794,7 @@ pub trait Circuit { type FloorPlanner: FloorPlanner; /// Optional circuit configuration parameters. Requires the `circuit-params` feature. #[cfg(feature = "circuit-params")] - type Params: Default; + type Params: Default = (); /// Returns a copy of this circuit with no witness values (i.e. all witnesses set to /// `None`). For most circuits, this will be equal to `Self::default()`.