Skip to content

Commit 3e52b41

Browse files
committed
doclinks
1 parent 9190c8a commit 3e52b41

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

hugr-core/src/builder/dataflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl<B, T> DFGWrapper<B, T> {
152152
pub type FunctionBuilder<B> = DFGWrapper<B, BuildHandle<FuncID<true>>>;
153153

154154
impl FunctionBuilder<Hugr> {
155-
/// Initialize a builder for a [FuncDefn]-rooted HUGR; the function will be private.
155+
/// Initialize a builder for a [`FuncDefn`](ops::FuncDefn)-rooted HUGR; the function will be private.
156156
/// (See also [Self::new_pub], [Self::new_link_name].)
157157
///
158158
/// # Errors

hugr-core/src/hugr/validate.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,13 +709,17 @@ pub enum ValidationError<N: HugrNode> {
709709
/// Multiple nodes were exported using the same name from a [Module](super::Module)
710710
#[error("FuncDefn is exported under same name {link_name} as earlier node {:?}", children[0])]
711711
DuplicateExternalNames {
712-
/// The link_name of a [FuncDecl] or [FuncDefn](super::FuncDefn)
712+
/// The link_name of a [`FuncDecl`](crate::ops::FuncDecl) or [`FuncDefn`]
713713
link_name: String,
714714
/// Two nodes node exported under that name
715715
children: [N; 2],
716716
},
717-
/// A [FuncDecl], or `FuncDefn` with a [link_name](super::FuncDefn::link_name),
718-
/// was neither root nor child of a [Module] root
717+
/// A [`FuncDecl`], or [`FuncDefn`] with a [link_name],
718+
/// was neither root nor child of a [`Module`] root
719+
///
720+
/// [`FuncDecl`]: crate::ops::FuncDecl
721+
/// [link_name]: FuncDefn::link_name
722+
/// [`Module`]: crate::ops::Module
719723
#[error("Node {node} has a link_name but is neither root nor child of Module root")]
720724
LinkNameNotAtTopLevel {
721725
// The node exporting/importing the name

hugr-passes/src/dead_funcs.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ impl RemoveDeadFuncsPass {
9191
self
9292
}
9393

94-
/// Sets whether the exported [FuncDefn](hugr_core::ops::FuncDefn) children of a
95-
/// [Module](hugr_core::ops::Module) are included as entry points (yes by default)
94+
/// When the [HugrView::entrypoint] is a [Module](hugr_core::ops::Module),
95+
/// sets whether the exported [FuncDefn](hugr_core::ops::FuncDefn) children are
96+
/// included as entry points for reachability analysis. (Yes by default.)
9697
pub fn include_module_exports(mut self, include: bool) -> Self {
9798
self.include_exports = include;
9899
self
@@ -136,9 +137,13 @@ impl<H: HugrMut<Node = Node>> ComposablePass<H> for RemoveDeadFuncsPass {
136137
/// Deletes from the Hugr any functions that are not used by either [`Call`] or
137138
/// [`LoadFunction`] nodes in reachable parts.
138139
///
139-
/// For [`Module`]-rooted Hugrs, all top-level functions with [FuncDefn::link_name] set,
140+
/// For [`Module`]-rooted Hugrs, all top-level functions with [link_name] set,
140141
/// will be used as entry points.
141142
///
143+
/// [`Call`]: hugr_core::ops::OpType::Call
144+
/// [link_name]: hugr_core::ops::FuncDefn::link_name
145+
/// [`LoadFunction`]: hugr_core::ops::OpType::LoadFunction
146+
/// [`Module`]: hugr_core::ops::OpType::Module
142147
pub fn remove_dead_funcs(
143148
h: &mut impl HugrMut<Node = Node>,
144149
) -> Result<(), ValidatePassError<Node, RemoveDeadFuncsError>> {

0 commit comments

Comments
 (0)