]> git.lizzy.rs Git - rust.git/commitdiff
rustc: Fix a call to with_path in trans_unboxing_shim
authorAlex Crichton <alex@alexcrichton.com>
Thu, 3 Jul 2014 15:20:04 +0000 (08:20 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 3 Jul 2014 15:20:04 +0000 (08:20 -0700)
This was causing lots of ICEs in cargo. I sadly wasn't ever able to reduce the
test case down, but I presume that's because it has to do with node id
collisions which are pretty difficult to turn up...

src/librustc/middle/trans/callee.rs

index 116b2e6b421b81e41e1c5a94064853528c57897a..0cc4a9223d49963bd0909253711d2f3c3d8fb806 100644 (file)
@@ -261,7 +261,7 @@ pub fn trans_unboxing_shim(bcx: &Block,
     let function_type =
         ty::mk_bare_fn(tcx, method.fty.clone()).subst(tcx, &substs);
 
-    let function_name = tcx.map.with_path(method_id.node, |path| {
+    let function_name = ty::with_path(tcx, method_id, |path| {
         link::mangle_internal_name_by_path_and_seq(path, "unboxing_shim")
     });
     let llfn = decl_internal_rust_fn(ccx,