This program (which, as far as I can tell, is ok?) seems to loop infinitely:
fn macros() {
macro_rules! if_ok(
($inp: expr) => (
match $inp {
Ok(move v) => { move v }
Err(move e) => { return Err(e); }
}
)
);
}
fn main() {
let r = Ok(2);
let p = if_ok!(move r);
assert p == 2;
}
This program (which, as far as I can tell, is ok?) seems to loop infinitely: