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

macro_rules! create_vec {
    ($($x:expr),*) => {
        vec![$($x),*]
    };
}

#[trace_borrow]
fn test_nested_macros() {
    let v = create_vec![1, 2, 3];
    assert_eq!(v.len(), 3);
}

fn main() {
    test_nested_macros();
}