]> git.lizzy.rs Git - rust.git/blob - src/test/pretty/disamb-stmt-expr.rs
Rollup merge of #86374 - bossmc:enable-static-pie-for-gnu, r=nagisa
[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() {}