blob: 094ca377e031bcec74d3c08e86a2c363b13f0ca1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
const fn foo() { (||{})() }
//~^ ERROR cannot call non-const closure
//~| ERROR erroneous constant used [const_err]
//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
const fn bad(input: fn()) {
input()
//~^ ERROR function pointer
}
fn main() {
}
|