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

10 lines
144 B
Rust
Raw Normal View History

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