From fe2e28ea35bb051a2d70da2d74ccba4689334923 Mon Sep 17 00:00:00 2001 From: Eduard S Date: Mon, 29 Jan 2024 18:22:16 +0000 Subject: [PATCH] Fix doc tests imports --- common/src/circuit/value.rs | 5 +++-- common/src/plonk/circuit.rs | 19 ++++++++++--------- frontend/src/circuit.rs | 2 +- frontend/src/dev.rs | 9 ++++++--- frontend/src/dev/gates.rs | 6 ++++-- frontend/src/dev/tfp.rs | 4 +++- 6 files changed, 27 insertions(+), 18 deletions(-) diff --git a/common/src/circuit/value.rs b/common/src/circuit/value.rs index 5ec5942c..20f81d53 100644 --- a/common/src/circuit/value.rs +++ b/common/src/circuit/value.rs @@ -35,7 +35,7 @@ impl Value { /// # Examples /// /// ``` - /// use halo2_proofs::circuit::Value; + /// use halo2_common::circuit::Value; /// /// let v = Value::known(37); /// ``` @@ -646,7 +646,8 @@ impl Value { /// If you have a `Value`, convert it to `Value>` first: /// ``` /// # use halo2curves::pasta::pallas::Base as F; - /// use halo2_proofs::{circuit::Value, plonk::Assigned}; + /// use halo2_common::circuit::Value; + /// use halo2_middleware::plonk::Assigned; /// /// let v = Value::known(F::from(2)); /// let v: Value> = v.into(); diff --git a/common/src/plonk/circuit.rs b/common/src/plonk/circuit.rs index 26e4a1b5..43bcf755 100644 --- a/common/src/plonk/circuit.rs +++ b/common/src/plonk/circuit.rs @@ -267,9 +267,9 @@ impl SealedPhase for super::ThirdPhase { /// /// Selectors can be used to conditionally enable (portions of) gates: /// ``` -/// use halo2_proofs::poly::Rotation; +/// use halo2_middleware::poly::Rotation; /// # use halo2curves::pasta::Fp; -/// # use halo2_proofs::plonk::ConstraintSystem; +/// # use halo2_common::plonk::ConstraintSystem; /// /// # let mut meta = ConstraintSystem::::default(); /// let a = meta.advice_column(); @@ -290,12 +290,12 @@ impl SealedPhase for super::ThirdPhase { /// Selectors are disabled on all rows by default, and must be explicitly enabled on each /// row when required: /// ``` -/// use halo2_proofs::{ -/// circuit::{Chip, Layouter, Value}, -/// plonk::{Advice, Column, Error, Selector}, -/// }; +/// use halo2_middleware::circuit::Advice; +/// use halo2_common::circuit::{Chip, Layouter, Value}; +/// use halo2_common::plonk::circuit::{Column, Selector}; +/// use halo2_common::plonk::Error; /// use halo2_middleware::ff::Field; -/// # use halo2_proofs::plonk::Fixed; +/// # use halo2_middleware::circuit::Fixed; /// /// struct Config { /// a: Column, @@ -1356,9 +1356,10 @@ impl From> for Vec> { /// A set of polynomial constraints with a common selector. /// /// ``` -/// use halo2_proofs::{plonk::{Constraints, Expression}, poly::Rotation}; +/// use halo2_common::{plonk::{Constraints, Expression}}; +/// use halo2_middleware::poly::Rotation; /// use halo2curves::pasta::Fp; -/// # use halo2_proofs::plonk::ConstraintSystem; +/// # use halo2_common::plonk::ConstraintSystem; /// /// # let mut meta = ConstraintSystem::::default(); /// let a = meta.advice_column(); diff --git a/frontend/src/circuit.rs b/frontend/src/circuit.rs index c4288f56..09b66da2 100644 --- a/frontend/src/circuit.rs +++ b/frontend/src/circuit.rs @@ -16,7 +16,7 @@ use std::collections::HashMap; use std::fmt::Debug; use std::ops::RangeTo; -mod floor_planner; +pub mod floor_planner; mod table_layouter; // Re-exports from common diff --git a/frontend/src/dev.rs b/frontend/src/dev.rs index 2dd615cc..ba0e7d67 100644 --- a/frontend/src/dev.rs +++ b/frontend/src/dev.rs @@ -182,12 +182,15 @@ impl Mul for Value { /// # Examples /// /// ``` -/// use halo2_proofs::{ +/// use halo2_frontend::{ /// circuit::{Layouter, SimpleFloorPlanner, Value}, /// dev::{FailureLocation, MockProver, VerifyFailure}, -/// plonk::{Advice, Any, Circuit, Column, ConstraintSystem, Error, Selector}, -/// poly::Rotation, /// }; +/// use halo2_common::{ +/// plonk::{circuit::Column, Circuit, ConstraintSystem, Error, Selector}, +/// }; +/// use halo2_middleware::circuit::{Advice, Any}; +/// use halo2_middleware::poly::Rotation; /// use halo2_middleware::ff::PrimeField; /// use halo2curves::pasta::Fp; /// const K: u32 = 5; diff --git a/frontend/src/dev/gates.rs b/frontend/src/dev/gates.rs index 2d6e43c1..732ec7ee 100644 --- a/frontend/src/dev/gates.rs +++ b/frontend/src/dev/gates.rs @@ -27,11 +27,13 @@ struct Gate { /// /// ``` /// use halo2_middleware::ff::Field; -/// use halo2_proofs::{ +/// use halo2_middleware::poly::Rotation; +/// use halo2_frontend::{ /// circuit::{Layouter, SimpleFloorPlanner}, /// dev::CircuitGates, +/// }; +/// use halo2_common::{ /// plonk::{Circuit, ConstraintSystem, Error}, -/// poly::Rotation, /// }; /// use halo2curves::pasta::pallas; /// diff --git a/frontend/src/dev/tfp.rs b/frontend/src/dev/tfp.rs index 8729d33a..ff3dd5b6 100644 --- a/frontend/src/dev/tfp.rs +++ b/frontend/src/dev/tfp.rs @@ -30,9 +30,11 @@ use halo2_middleware::plonk::Assigned; /// /// ``` /// use halo2_middleware::ff::Field; -/// use halo2_proofs::{ +/// use halo2_frontend::{ /// circuit::{floor_planner, Layouter, Value}, /// dev::TracingFloorPlanner, +/// }; +/// use halo2_common::{ /// plonk::{Circuit, ConstraintSystem, Error}, /// }; ///