blob: 426534deb67e703d05b0286b650ade8963ffa2d9 [file] [log] [blame]
// Regression test for #69615.
#![feature(const_trait_impl, effects)]
#[const_trait]
pub trait MyTrait {
fn method(&self) -> Option<()>;
}
impl const MyTrait for () {
fn method(&self) -> Option<()> {
Some(())?; //~ ERROR `?` is not allowed in a `const fn`
None
}
}
fn main() {}