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_loop_with_break() {
    let mut counter = 0;
    let result = loop {
        let temp = counter + 1;
        counter = temp;
        if counter >= 5 {
            break counter;
        }
    };
    assert_eq!(result, 5);
}

fn main() {
    test_loop_with_break();
}