pub(super) fn depends_on_same_id<'g, G: GraphAssert<'g>>(graph: G, query_id: G::Id) {
    graph.assert_depends_on(
        query_id,
        query_id,
        DependencyDirection::Forward,
        "depends_on for same ID returns true",
    );
    assert!(
        !graph
            .directly_depends_on(query_id, query_id)
            .expect("valid ID"),
        "directly_depends_on for same ID returns false",
    );
}
Test depends_on and directly_depends_on semantics with the same ID.
guppy/tests/graph-tests/proptest_helpers.rs