Skip to content

Commit

Permalink
Make closures use stable symbol names.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister authored and nikomatsakis committed Mar 25, 2016
1 parent c77f44e commit 6f60c9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/librustc_trans/trans/closure.rs
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

use arena::TypedArena;
use back::link::{self, mangle_internal_name_by_path_and_seq};
use back::{link, symbol_names};
use llvm::{ValueRef, get_param, get_params};
use middle::def_id::DefId;
use middle::infer;
Expand Down Expand Up @@ -152,8 +152,7 @@ fn get_or_create_closure_declaration<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
return llfn;
}

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

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

0 comments on commit 6f60c9e

Please sign in to comment.