flow-span 0.1.0-rc.5

Source positions, source files, the identifier interner, and the places in a run.
Documentation
//! The index domain this module's own container tests are written against.
//!
//! One shared domain rather than one per module: the containers are generic
//! over `I` and prove nothing extra by each inventing its own index type, and a
//! single declaration keeps the generated inherent items in one place.
#![allow(
    dead_code,
    reason = "the container tests exercise the trait surface, not every generated inherent item"
)]

use crate::newtype_index;

newtype_index! {
    /// A node of the domain the container tests index over.
    pub(crate) struct Node;
}

/// Returns the index naming `position`.
pub(crate) fn node(position: usize) -> Node {
    use crate::Idx as _;
    Node::from_usize(position)
}