]>
git.proxmox.com Git - rustc.git/blob - src/test/codegen-units/item-collection/non-generic-closures.rs
1 // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // In the current version of the collector that still has to support
12 // legacy-trans, closures do not generate their own TransItems, so we are
13 // ignoring this test until MIR trans has taken over completely
16 // ignore-tidy-linelength
17 // compile-flags:-Zprint-trans-items=eager
21 //~ TRANS_ITEM fn non_generic_closures::temporary[0]
23 //~ TRANS_ITEM fn non_generic_closures::temporary[0]::{{closure}}[0]
29 //~ TRANS_ITEM fn non_generic_closures::assigned_to_variable_but_not_executed[0]
30 fn assigned_to_variable_but_not_executed() {
31 //~ TRANS_ITEM fn non_generic_closures::assigned_to_variable_but_not_executed[0]::{{closure}}[0]
37 //~ TRANS_ITEM fn non_generic_closures::assigned_to_variable_executed_directly[0]
38 fn assigned_to_variable_executed_indirectly() {
39 //~ TRANS_ITEM fn non_generic_closures::assigned_to_variable_executed_directly[0]::{{closure}}[0]
46 //~ TRANS_ITEM fn non_generic_closures::assigned_to_variable_executed_indirectly[0]
47 fn assigned_to_variable_executed_directly() {
48 //~ TRANS_ITEM fn non_generic_closures::assigned_to_variable_executed_indirectly[0]::{{closure}}[0]
55 //~ TRANS_ITEM fn non_generic_closures::main[0]
58 assigned_to_variable_but_not_executed();
59 assigned_to_variable_executed_directly();
60 assigned_to_variable_executed_indirectly();
63 //~ TRANS_ITEM fn non_generic_closures::run_closure[0]
64 fn run_closure(f
: &Fn(i32)) {