Skip to content

Commit

Permalink
Use main crate in doc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed May 28, 2024
1 parent b2ef149 commit 0f23521
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions hugr-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ regex-syntax = { workspace = true }
assert_cmd = { workspace = true }
predicates = { workspace = true }
assert_fs = { workspace = true }

# Required for documentation examples
hugr = { path = "../hugr" }
2 changes: 1 addition & 1 deletion hugr-core/src/builder/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use crate::{
/// | Exit |
/// +------------+
/// */
/// use hugr_core::{
/// use hugr::{
/// builder::{BuildError, CFGBuilder, Container, Dataflow, HugrBuilder},
/// extension::{prelude, ExtensionSet},
/// ops, type_row,
Expand Down
2 changes: 1 addition & 1 deletion hugr-core/src/ops/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub enum Value {
#[cfg_attr(not(miri), doc = "```")] // this doctest depends on typetag, so fails with miri
#[cfg_attr(miri, doc = "```ignore")]
/// use serde::{Serialize,Deserialize};
/// use hugr_core::{
/// use hugr::{
/// types::Type,ops::constant::{OpaqueValue, ValueName, CustomConst, CustomSerialized},
/// extension::{ExtensionSet, prelude::{USIZE_T, ConstUsize}},
/// std_extensions::arithmetic::int_types};
Expand Down
2 changes: 1 addition & 1 deletion hugr-core/src/ops/constant/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use super::ValueName;
#[cfg_attr(not(miri), doc = "```")] // this doctest depends on typetag, so fails with miri
#[cfg_attr(miri, doc = "```ignore")]
/// use serde::{Serialize,Deserialize};
/// use hugr_core::{
/// use hugr::{
/// types::Type,ops::constant::{OpaqueValue, ValueName, CustomConst},
/// extension::ExtensionSet, std_extensions::arithmetic::int_types};
/// use serde_json::json;
Expand Down

0 comments on commit 0f23521

Please sign in to comment.