Skip to content

Missing optimized MIR for an item #126012

@tmiasko

Description

@tmiasko
$ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium prioritybeta-acceptedAccepted for backporting to the compiler in the beta channel.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions