2023-01-07 05:37:40 +00:00
|
|
|
fn create_some() -> Option<u8> {
|
|
|
|
Some(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
const FOO: Option<u8> = create_some();
|
2024-12-23 21:49:48 +00:00
|
|
|
//~^ ERROR cannot call non-const function `create_some` in constants [E0015]
|
2023-01-07 05:37:40 +00:00
|
|
|
|
|
|
|
fn main() {}
|