rust/tests/ui/error-codes/E0015.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
172 B
Rust
Raw Normal View History

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() {}