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
17
18
use borrowscope_macro::trace_borrow;

#[trace_borrow]
fn test_match() {
    let value = Some(42);
    let result = match value {
        Some(x) => {
            let doubled = x * 2;
            doubled
        }
        None => 0,
    };
    assert_eq!(result, 84);
}

fn main() {
    test_match();
}