Skip to content

Commit 0a63030

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 170735 b: refs/heads/try c: 8a6d7a6 h: refs/heads/master i: 170733: eabb228 170731: ecfab05 170727: 9c6b74e 170719: 9b940d2 v: v3
1 parent 3edf274 commit 0a63030

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 73a25f55ad748b4d3516417c711b99ce446591af
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 5b3cd3900ceda838f5798c30ab96ceb41f962534
5-
refs/heads/try: 4e9c50e081f92cbf45df7f8ecbff3b05e26abf36
5+
refs/heads/try: 8a6d7a68b17542f67086d014720d13e3dc320d51
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/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/try/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/try/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/try/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/try/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)