topo 0.13.2

Tools for incrementally computing repeated callgraphs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use topo::*;

#[test]
fn invoke_test_topo() {
    #[topo::nested]
    fn unique_id() -> CallId {
        CallId::current()
    }

    topo::call(|| {
        let mut prev = unique_id();
        for _ in 0..10 {
            let current = unique_id();
            assert_ne!(prev, current, "each CallId must be unique");
            prev = current;
        }
    });
}