blob: 80a4442de2cba7332df2d0d4ce4787f02d9db52f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Regression test for #69615.
#![feature(const_trait_impl)]
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() {}
|