Skip to content

Commit 6f60c9e

Browse files
michaelwoeristernikomatsakis
authored andcommitted
Make closures use stable symbol names.
1 parent c77f44e commit 6f60c9e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustc_trans/trans/closure.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use arena::TypedArena;
12-
use back::link::{self, mangle_internal_name_by_path_and_seq};
12+
use back::{link, symbol_names};
1313
use llvm::{ValueRef, get_param, get_params};
1414
use middle::def_id::DefId;
1515
use middle::infer;
@@ -152,8 +152,7 @@ fn get_or_create_closure_declaration<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
152152
return llfn;
153153
}
154154

155-
let path = tcx.def_path(closure_id);
156-
let symbol = mangle_internal_name_by_path_and_seq(path, "closure");
155+
let symbol = symbol_names::exported_name(ccx, &instance);
157156

158157
// Compute the rust-call form of the closure call method.
159158
let infcx = infer::normalizing_infer_ctxt(tcx, &tcx.tables, ProjectionMode::Any);

0 commit comments

Comments
 (0)