borrowscope-macro 0.1.1

Procedural macros for BorrowScope ownership tracking
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use borrowscope_macro::trace_borrow;

#[trace_borrow]
fn test_nested_closures() {
    let x = 10;
    let outer = |y| {
        let inner = |z| x + y + z;
        inner(5)
    };
    let result = outer(20);
    assert_eq!(result, 35);
}

fn main() {
    test_nested_closures();
}