Skip to content

Commit

Permalink
chore: Re-enable missing-docs lint (#876)
Browse files Browse the repository at this point in the history
#868 didn't actually enable the lints in `quantinuum-hugr` when the
config was moved to the workspace.
  • Loading branch information
aborgna-q authored Mar 13, 2024
1 parent 46a7fba commit db1d11c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions quantinuum-hugr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ description = "Quantinuum's Hierarchical Unified Graph Representation"
keywords = ["Quantum", "Quantinuum"]
categories = ["compilers"]

[lints]
workspace = true

[lib]
name = "hugr"
bench = false
Expand Down
1 change: 1 addition & 0 deletions quantinuum-hugr/benches/bench_main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Benchmarks
#[allow(dead_code)]
mod benchmarks;

Expand Down
6 changes: 6 additions & 0 deletions quantinuum-hugr/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub enum BuildError {
EntryBuiltError(Node),
/// Node was expected to have a certain type but was found to not.
#[error("Node with index {node:?} does not have type {op_desc:?} as expected.")]
#[allow(missing_docs)]
UnexpectedType {
/// Index of node where error occurred.
node: Node,
Expand All @@ -163,6 +164,7 @@ pub enum BuildError {

/// Invalid wires when setting outputs
#[error("Found an error while setting the outputs of a {} container, {container_node}. {error}", .container_op.name())]
#[allow(missing_docs)]
OutputWiring {
container_op: OpType,
container_node: Node,
Expand All @@ -174,6 +176,7 @@ pub enum BuildError {
///
/// The internal error message already contains the node index.
#[error("Got an input wire while adding a {} to the circuit. {error}", .op.name())]
#[allow(missing_docs)]
OperationWiring {
op: OpType,
#[source]
Expand All @@ -187,13 +190,15 @@ pub enum BuildError {
pub enum BuilderWiringError {
/// Tried to copy a linear type.
#[error("Cannot copy linear type {typ} from output {src_offset} of node {src}")]
#[allow(missing_docs)]
NoCopyLinear {
typ: Type,
src: Node,
src_offset: Port,
},
/// The ancestors of an inter-graph edge are not related.
#[error("Cannot connect an inter-graph edge between unrelated nodes. Tried connecting {src} ({src_offset}) with {dst} ({dst_offset}).")]
#[allow(missing_docs)]
NoRelationIntergraph {
src: Node,
src_offset: Port,
Expand All @@ -202,6 +207,7 @@ pub enum BuilderWiringError {
},
/// Inter-Graph edges can only carry copyable data.
#[error("Inter-graph edges cannot carry non-copyable data {typ}. Tried connecting {src} ({src_offset}) with {dst} ({dst_offset}).")]
#[allow(missing_docs)]
NonCopyableIntergraph {
src: Node,
src_offset: Port,
Expand Down

0 comments on commit db1d11c

Please sign in to comment.