Closed
Description
$ cat a.rs
pub static A: fn() -> fn() = {
#[inline(never)]
fn f() {}
#[inline(always)]
|| -> fn() { f }
};
$ cat b.rs
static A: fn() -> fn () = a::A;
fn main() { A()() }
$ rustc a.rs --crate-type=lib
$ rustc b.rs --extern a -L.
error: missing optimized MIR for an item in the crate `a`
|
note: missing optimized MIR for this item (was the crate `a` compiled with `--emit=metadata`?)
--> /.../a.rs:3:5
|
3 | fn f() {}
| ^^^^^^
error: aborting due to 1 previous error
Regression in c563f2e (#122371 cc @oli-obk @tmiasko).
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged