summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/if-block-unreachable-expr.rs
blob: 4063a33708402aa0b52a8a7995200455411e736d (plain)
1
2
3
4
5
6
7
8
// check-pass

// This regressed from 1.20 -> 1.21 -- the condition is unreachable,
// but it's still an expression, and should parse fine.

fn main() {
    if { if true { return; } else { return; }; } {}
}