1 // compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0
5 // We want to make sure that closures get 'internal' linkage instead of
6 // 'weak_odr' when they are not shared between codegen units
7 // FIXME(eddyb) `legacy` mangling uses `{{closure}}`, while `v0`
8 // uses `{closure#0}`, switch to the latter once `legacy` is gone.
9 // CHECK-LABEL: ; internalize_closures::main::{{.*}}closure
10 // CHECK-NEXT: ; Function Attrs:
11 // CHECK-NEXT: define internal
12 let c = |x:i32| { x + 1 };