Fix doc tests imports

This commit is contained in:
Eduard S 2024-01-29 18:22:16 +00:00
parent 4c155be610
commit fe2e28ea35
6 changed files with 27 additions and 18 deletions

View File

@ -35,7 +35,7 @@ impl<V> Value<V> {
/// # Examples
///
/// ```
/// use halo2_proofs::circuit::Value;
/// use halo2_common::circuit::Value;
///
/// let v = Value::known(37);
/// ```
@ -646,7 +646,8 @@ impl<V> Value<V> {
/// If you have a `Value<F: Field>`, convert it to `Value<Assigned<F>>` 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<Assigned<F>> = v.into();

View File

@ -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::<Fp>::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<Advice>,
@ -1356,9 +1356,10 @@ impl<F: Field> From<Expression<F>> for Vec<Constraint<F>> {
/// 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::<Fp>::default();
/// let a = meta.advice_column();

View File

@ -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

View File

@ -182,12 +182,15 @@ impl<F: Field> Mul<F> for Value<F> {
/// # 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;

View File

@ -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;
///

View File

@ -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},
/// };
///