rust/tests/ui/consts/issue-56164.rs

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

11 lines
181 B
Rust
Raw Normal View History

const fn foo() { (||{})() }
//~^ ERROR cannot call non-const closure
const fn bad(input: fn()) {
input()
//~^ ERROR function pointer calls are not allowed
}
fn main() {
}