Closed
Description
rustc 1.41.0-nightly (ded5ee001 2019-11-13)
#![feature(const_fn)]
use core::mem::ManuallyDrop;
const fn check() -> impl Fn() {
const fn my_function() {
}
my_function
}
const fn main() {
let function = check();
function(); //<--- error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants
let _e = ManuallyDrop::new(function);
}