Skip to content

Commit cbbc820

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 171829 b: refs/heads/beta c: 8a6d7a6 h: refs/heads/master i: 171827: a2b8e5c v: v3
1 parent a40da6a commit cbbc820

File tree

6 files changed

+4
-45
lines changed

6 files changed

+4
-45
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b5571ed71a5879c0495a982506258d5d267744ed
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 4e9c50e081f92cbf45df7f8ecbff3b05e26abf36
34+
refs/heads/beta: 8a6d7a68b17542f67086d014720d13e3dc320d51
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/beta/src/librustc/metadata/tydecode.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,6 @@ fn parse_ty_<'a, 'tcx, F>(st: &mut PState<'a, 'tcx>, conv: &mut F) -> Ty<'tcx> w
506506
st.pos = st.pos + 1u;
507507
return ty::mk_tup(tcx, params);
508508
}
509-
'f' => {
510-
return ty::mk_closure(tcx, parse_closure_ty_(st, conv));
511-
}
512509
'F' => {
513510
let def_id = parse_def_(st, NominalType, conv);
514511
return ty::mk_bare_fn(tcx, Some(def_id),

branches/beta/src/librustc/middle/ty.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,10 +2738,6 @@ pub fn mk_nil<'tcx>(cx: &ctxt<'tcx>) -> Ty<'tcx> {
27382738
mk_tup(cx, Vec::new())
27392739
}
27402740

2741-
pub fn mk_closure<'tcx>(cx: &ctxt<'tcx>, fty: ClosureTy<'tcx>) -> Ty<'tcx> {
2742-
panic!("stub");
2743-
}
2744-
27452741
pub fn mk_bare_fn<'tcx>(cx: &ctxt<'tcx>,
27462742
opt_def_id: Option<ast::DefId>,
27472743
fty: &'tcx BareFnTy<'tcx>) -> Ty<'tcx> {

branches/beta/src/librustc_driver/test.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -277,26 +277,6 @@ impl<'a, 'tcx> Env<'a, 'tcx> {
277277
ty::mk_tup(self.infcx.tcx, vec![ty1, ty2])
278278
}
279279

280-
pub fn t_closure(&self,
281-
input_tys: &[Ty<'tcx>],
282-
output_ty: Ty<'tcx>,
283-
region_bound: ty::Region)
284-
-> Ty<'tcx>
285-
{
286-
ty::mk_closure(self.infcx.tcx, ty::ClosureTy {
287-
unsafety: ast::Unsafety::Normal,
288-
onceness: ast::Many,
289-
store: ty::RegionTraitStore(region_bound, ast::MutMutable),
290-
bounds: ty::region_existential_bound(region_bound),
291-
sig: ty::Binder(ty::FnSig {
292-
inputs: input_tys.to_vec(),
293-
output: ty::FnConverging(output_ty),
294-
variadic: false,
295-
}),
296-
abi: abi::Rust,
297-
})
298-
}
299-
300280
pub fn t_param(&self, space: subst::ParamSpace, index: u32) -> Ty<'tcx> {
301281
let name = format!("T{}", index);
302282
ty::mk_param(self.infcx.tcx, space, index, token::intern(name[]))
@@ -780,19 +760,6 @@ fn escaping() {
780760
assert!(!ty::type_has_escaping_regions(t_param));
781761
let t_fn = env.t_fn(&[t_param], env.t_nil());
782762
assert!(!ty::type_has_escaping_regions(t_fn));
783-
784-
// t_fn = |&int|+'a
785-
let t_fn = env.t_closure(&[t_rptr_bound1], env.t_nil(), env.re_free(0, 1));
786-
assert!(!ty::type_has_escaping_regions(t_fn));
787-
788-
// t_fn = |&int|+'a (where &int has depth 2)
789-
let t_fn = env.t_closure(&[t_rptr_bound2], env.t_nil(), env.re_free(0, 1));
790-
assert!(ty::type_has_escaping_regions(t_fn));
791-
792-
// t_fn = |&int|+&int
793-
let t_fn = env.t_closure(&[t_rptr_bound1], env.t_nil(),
794-
env.re_late_bound_with_debruijn(1, ty::DebruijnIndex::new(1)));
795-
assert!(ty::type_has_escaping_regions(t_fn));
796763
})
797764
}
798765

branches/beta/src/librustc_trans/trans/closure.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ pub fn trans_unboxed_closure<'blk, 'tcx>(
530530
// of the closure expression.
531531
let typer = NormalizingUnboxedClosureTyper::new(bcx.tcx());
532532
let function_type = typer.unboxed_closure_type(closure_id, bcx.fcx.param_substs);
533-
let function_type = ty::mk_closure(bcx.tcx(), function_type);
534533

535534
let freevars: Vec<ty::Freevar> =
536535
ty::with_freevars(bcx.tcx(), id, |fv| fv.iter().map(|&fv| fv).collect());
@@ -543,8 +542,8 @@ pub fn trans_unboxed_closure<'blk, 'tcx>(
543542
bcx.fcx.param_substs,
544543
id,
545544
&[],
546-
ty::ty_fn_ret(function_type),
547-
ty::ty_fn_abi(function_type),
545+
function_type.sig.0.output,
546+
function_type.abi,
548547
ClosureEnv::new(freevars[],
549548
UnboxedClosure(freevar_mode)));
550549

branches/beta/src/librustc_typeck/check/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn check_boxed_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
316316
abi::Rust,
317317
expected_sig);
318318
let fn_sig = fn_ty.sig.clone();
319-
let fty = ty::mk_closure(tcx, fn_ty);
319+
let fty = panic!("stub");
320320
debug!("check_expr_fn fty={}", fcx.infcx().ty_to_string(fty));
321321

322322
fcx.write_ty(expr.id, fty);

0 commit comments

Comments
 (0)