Closed
Description
The following ICEs (example by @eddyb):
#![feature(const_fn)]
const fn nested(x: (for<'a> fn(&'a ()), String)) -> (fn(&'static ()), String) {
x
}
pub const TEST: (fn(&'static ()), String) = nested((|_x| (), String::new()));
fn main() {}
shows
thread 'rustc' panicked at 'type mismatch when copying!
src: (for<'r> fn(&'r ()), std::string::String),
dest: (fn(&()), std::string::String)', /rustc/853c4774e26ea97b45fe74de9a6f68e526784323/src/libstd/macros.rs:16:9
This means that the check here is wrong. It might be possible to also trigger this without nightly features through const_prop.