]> git.lizzy.rs Git - rust.git/blob - src/test/pretty/disamb-stmt-expr.rs
Add 'src/tools/miri/' from commit '75dd959a3a40eb5b4574f8d2e23aa6efbeb33573'
[rust.git] / src / test / pretty / disamb-stmt-expr.rs
1 // pp-exact
2
3 // Here we check that the parentheses around the body of `wsucc()` are
4 // preserved.  They are needed to disambiguate `{return n+1}; - 0` from
5 // `({return n+1}-0)`.
6
7 fn id<F>(f: F) -> isize where F: Fn() -> isize { f() }
8
9 fn wsucc(_n: isize) -> isize { id(|| { 1 }) - 0 }
10 fn main() {}