blob: 67083e1a39b5d0e1397ce97aa9118297638fbc1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// The `?` operator is still not const-evaluatable because it calls `From::from` on the error
// variant.
const fn opt() -> Option<i32> {
let x = Some(2);
x?;
//~^ ERROR: `?` is not allowed
//~| ERROR: `?` is not allowed
None
}
fn main() {}
|