summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/issue-56164.rs
blob: df3e3bf902809c40875e6f274f5fcd15bf0ef4d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
const fn foo() { (||{})() }
//~^ ERROR cannot call non-const closure
//~| ERROR erroneous constant used

const fn bad(input: fn()) {
    input()
    //~^ ERROR function pointer calls are not allowed
}

fn main() {
}