2016-05-13 20:47:32 -04:00
|
|
|
// In the current version of the collector that still has to support
|
2018-05-08 16:10:16 +03:00
|
|
|
// legacy-codegen, closures do not generate their own MonoItems, so we are
|
|
|
|
// ignoring this test until MIR codegen has taken over completely
|
2016-05-13 20:47:32 -04:00
|
|
|
// ignore-test
|
|
|
|
|
2018-05-08 16:10:16 +03:00
|
|
|
// compile-flags:-Zprint-mono-items=eager
|
2015-11-02 14:46:39 +01:00
|
|
|
|
|
|
|
#![deny(dead_code)]
|
2017-12-22 15:31:51 +01:00
|
|
|
#![feature(start)]
|
2015-11-02 14:46:39 +01:00
|
|
|
|
|
|
|
// aux-build:cgu_extern_closures.rs
|
|
|
|
extern crate cgu_extern_closures;
|
|
|
|
|
2018-05-08 16:10:16 +03:00
|
|
|
//~ MONO_ITEM fn cross_crate_closures::start[0]
|
2017-12-22 15:31:51 +01:00
|
|
|
#[start]
|
|
|
|
fn start(_: isize, _: *const *const u8) -> isize {
|
2015-11-02 14:46:39 +01:00
|
|
|
|
2018-05-08 16:10:16 +03:00
|
|
|
//~ MONO_ITEM fn cgu_extern_closures::inlined_fn[0]
|
|
|
|
//~ MONO_ITEM fn cgu_extern_closures::inlined_fn[0]::{{closure}}[0]
|
2015-11-02 14:46:39 +01:00
|
|
|
let _ = cgu_extern_closures::inlined_fn(1, 2);
|
|
|
|
|
2018-05-08 16:10:16 +03:00
|
|
|
//~ MONO_ITEM fn cgu_extern_closures::inlined_fn_generic[0]<i32>
|
|
|
|
//~ MONO_ITEM fn cgu_extern_closures::inlined_fn_generic[0]::{{closure}}[0]<i32>
|
2015-11-02 14:46:39 +01:00
|
|
|
let _ = cgu_extern_closures::inlined_fn_generic(3, 4, 5i32);
|
|
|
|
|
2016-05-05 21:11:41 +02:00
|
|
|
// Nothing should be generated for this call, we just link to the instance
|
2015-11-02 14:46:39 +01:00
|
|
|
// in the extern crate.
|
|
|
|
let _ = cgu_extern_closures::non_inlined_fn(6, 7);
|
2017-12-22 15:31:51 +01:00
|
|
|
|
|
|
|
0
|
2015-11-02 14:46:39 +01:00
|
|
|
}
|
|
|
|
|
2018-05-08 16:10:16 +03:00
|
|
|
//~ MONO_ITEM drop-glue i8
|