diff --git a/src/libcore/stackwalk.rs b/src/libcore/stackwalk.rs index be5f89893684..ebf36e4e09ab 100644 --- a/src/libcore/stackwalk.rs +++ b/src/libcore/stackwalk.rs @@ -93,7 +93,10 @@ pub mod rustrt { pub mod rusti { #[abi = "rust-intrinsic"] pub extern "rust-intrinsic" { + #[cfg(stage0)] pub fn frame_address(f: &once fn(x: *u8)); + #[cfg(not(stage0))] + pub fn frame_address(+f: &once fn(x: *u8)); } } diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index edd3a295bf92..053b03bf6d7f 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -1259,14 +1259,6 @@ pub fn mach_sty(cfg: @session::config, t: t) -> sty { } pub fn default_arg_mode_for_ty(tcx: ctxt, ty: ty::t) -> ast::rmode { - // FIXME(#2202) --- We retain by-ref for &fn things to workaround a - // memory leak that otherwise results when @fn is upcast to &fn. - match ty::get(ty).sty { - ty::ty_closure(ClosureTy {sigil: ast::BorrowedSigil, _}) => { - return ast::by_ref; - } - _ => {} - } return if tcx.legacy_modes { if type_is_borrowed(ty) { // the old mode default was ++ for things like &ptr, but to be diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index f81c7bb8524d..c6ab5affd108 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -3496,7 +3496,7 @@ pub fn check_intrinsic_type(ccx: @mut CrateCtxt, it: @ast::foreign_item) { output: ty::mk_nil() } }); - (0u, ~[arg(ast::by_ref, fty)], ty::mk_nil()) + (0u, ~[arg(ast::by_copy, fty)], ty::mk_nil()) } ~"morestack_addr" => { (0u, ~[], ty::mk_nil_ptr(ccx.tcx))