]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-56164.rs
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / issue-56164.rs
1 #![feature(const_fn)]
2
3 const fn foo() { (||{})() }
4 //~^ ERROR calls in constant functions are limited to constant functions, tuple structs and tuple
5 // variants
6
7 const fn bad(input: fn()) {
8     input()
9     //~^ ERROR function pointers are not allowed in const fn
10 }
11
12 fn main() {
13 }