rust/tests/ui/consts/const-try-feature-gate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
208 B
Rust
Raw Normal View History

// gate-test-const_try
const fn t() -> Option<()> {
Some(())?;
//~^ error: `?` is not allowed in a `const fn`
//~| ERROR: cannot convert
//~| ERROR: cannot determine
None
}
fn main() {}