@@ -746,7 +746,7 @@ pub enum sty {
746746 ty_ptr( mt ) ,
747747 ty_rptr( Region , mt ) ,
748748 ty_bare_fn( BareFnTy ) ,
749- ty_closure( ClosureTy ) ,
749+ ty_closure( ~ ClosureTy ) ,
750750 ty_trait( ~TyTrait ) ,
751751 ty_struct( DefId , substs ) ,
752752 ty_tup( Vec < t > ) ,
@@ -1407,7 +1407,7 @@ pub fn mk_mut_unboxed_vec(cx: &ctxt, ty: t) -> t {
14071407pub fn mk_tup ( cx : & ctxt , ts : Vec < t > ) -> t { mk_t ( cx, ty_tup ( ts) ) }
14081408
14091409pub fn mk_closure ( cx : & ctxt , fty : ClosureTy ) -> t {
1410- mk_t ( cx, ty_closure ( fty) )
1410+ mk_t ( cx, ty_closure ( ~ fty) )
14111411}
14121412
14131413pub fn mk_bare_fn ( cx : & ctxt , fty : BareFnTy ) -> t {
@@ -2149,7 +2149,7 @@ pub fn type_contents(cx: &ctxt, ty: t) -> TypeContents {
21492149 }
21502150
21512151 ty_closure( ref c) => {
2152- closure_contents ( cx, c)
2152+ closure_contents ( cx, * c)
21532153 }
21542154
21552155 ty_box( typ) => {
@@ -2870,7 +2870,7 @@ pub fn ty_region(tcx: &ctxt,
28702870pub fn replace_fn_sig ( cx : & ctxt , fsty : & sty , new_sig : FnSig ) -> t {
28712871 match * fsty {
28722872 ty_bare_fn( ref f) => mk_bare_fn ( cx, BareFnTy { sig : new_sig, ..* f} ) ,
2873- ty_closure( ref f) => mk_closure ( cx, ClosureTy { sig : new_sig, ..* f} ) ,
2873+ ty_closure( ref f) => mk_closure ( cx, ClosureTy { sig : new_sig, ..* * f} ) ,
28742874 ref s => {
28752875 cx. sess . bug (
28762876 format ! ( "ty_fn_sig() called on non-fn type: {:?}" , s) ) ;
@@ -2888,7 +2888,7 @@ pub fn replace_closure_return_type(tcx: &ctxt, fn_type: t, ret_type: t) -> t {
28882888 ty:: ty_closure( ref fty) => {
28892889 ty:: mk_closure ( tcx, ClosureTy {
28902890 sig : FnSig { output : ret_type, ..fty. sig . clone ( ) } ,
2891- ..( * fty) . clone ( )
2891+ ..( * * fty) . clone ( )
28922892 } )
28932893 }
28942894 _ => {
@@ -3140,7 +3140,7 @@ pub fn adjust_ty(cx: &ctxt,
31403140 ty:: mk_closure ( cx, ClosureTy {
31413141 sigil : BorrowedSigil ,
31423142 region : r,
3143- ..( * fty) . clone ( )
3143+ ..( * * fty) . clone ( )
31443144 } )
31453145 }
31463146
0 commit comments