summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-try-feature-gate.rs
blob: 0839c23a0b99bb7b66b03e5d4526c3489cca08ec (plain)
1
2
3
4
5
6
7
8
9
// gate-test-const_try

const fn t() -> Option<()> {
    Some(())?;
    //~^ error: `?` is not allowed in a `const fn`
    None
}

fn main() {}