From 82dd2fb3f5d3e06fcd0cc32639dcee9d775e07f6 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Tue, 21 Mar 2023 15:06:43 -0600 Subject: [PATCH] Make `Error` a non_exhaustive type. --- halo2_proofs/CHANGELOG.md | 1 + halo2_proofs/src/plonk/error.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/halo2_proofs/CHANGELOG.md b/halo2_proofs/CHANGELOG.md index abea99f848..f9aa832df7 100644 --- a/halo2_proofs/CHANGELOG.md +++ b/halo2_proofs/CHANGELOG.md @@ -57,6 +57,7 @@ and this project adheres to Rust's notion of `Column` variant. - `query_fixed` now no longer takes a `Rotation` argument, and can only be used to query the current rotation. + - `Error` is now a [`non_exhaustive`](https://doc.rust-lang.org/reference/attributes/type_system.html) type. ## [0.2.0] - 2022-06-23 ### Added diff --git a/halo2_proofs/src/plonk/error.rs b/halo2_proofs/src/plonk/error.rs index 6f0b780122..527dcdf38d 100644 --- a/halo2_proofs/src/plonk/error.rs +++ b/halo2_proofs/src/plonk/error.rs @@ -6,6 +6,7 @@ use super::{Any, Column}; /// This is an error that could occur during proving or circuit synthesis. // TODO: these errors need to be cleaned up +#[non_exhaustive] #[derive(Debug)] pub enum Error { /// This is an error that can occur during synthesis of the circuit, for