mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
9 lines
172 B
Rust
9 lines
172 B
Rust
|
fn create_some() -> Option<u8> {
|
||
|
Some(1)
|
||
|
}
|
||
|
|
||
|
const FOO: Option<u8> = create_some();
|
||
|
//~^ ERROR cannot call non-const fn `create_some` in constants [E0015]
|
||
|
|
||
|
fn main() {}
|