Skip to content

Commit 8d0d752

Browse files
author
Jorge Aparicio
committed
typeck: remove dead code
1 parent 6438261 commit 8d0d752

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

src/librustc_typeck/check/closure.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,18 @@
1313
use super::{check_fn, Expectation, FnCtxt};
1414

1515
use astconv;
16-
use middle::infer;
1716
use middle::region::CodeExtent;
1817
use middle::subst;
1918
use middle::ty::{self, ToPolyTraitRef, Ty};
2019
use rscope::RegionScope;
2120
use syntax::abi;
2221
use syntax::ast;
23-
use syntax::ast::CaptureClause::*;
2422
use syntax::ast_util;
2523
use util::ppaux::Repr;
2624

2725
pub fn check_expr_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
2826
expr: &ast::Expr,
29-
capture: ast::CaptureClause,
27+
_capture: ast::CaptureClause,
3028
opt_kind: Option<ast::UnboxedClosureKind>,
3129
decl: &ast::FnDecl,
3230
body: &ast::Block,

src/librustc_typeck/check/regionck.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -856,10 +856,8 @@ fn check_expr_fn_block(rcx: &mut Rcx,
856856

857857
fn constrain_callee(rcx: &mut Rcx,
858858
callee_id: ast::NodeId,
859-
call_expr: &ast::Expr,
860-
callee_expr: &ast::Expr) {
861-
let call_region = ty::ReScope(CodeExtent::from_node_id(call_expr.id));
862-
859+
_call_expr: &ast::Expr,
860+
_callee_expr: &ast::Expr) {
863861
let callee_ty = rcx.resolve_node_type(callee_id);
864862
match callee_ty.sty {
865863
ty::ty_bare_fn(..) => { }

src/librustc_typeck/check/regionmanip.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -319,22 +319,6 @@ impl<'a, 'tcx> Wf<'a, 'tcx> {
319319
}
320320
}
321321

322-
fn accumulate_from_closure_ty(&mut self,
323-
ty: Ty<'tcx>,
324-
c: &ty::ClosureTy<'tcx>)
325-
{
326-
match c.store {
327-
ty::RegionTraitStore(r_b, _) => {
328-
self.push_region_constraint_from_top(r_b);
329-
}
330-
ty::UniqTraitStore => { }
331-
}
332-
333-
let required_region_bounds =
334-
ty::object_region_bounds(self.tcx, None, c.bounds.builtin_bounds);
335-
self.accumulate_from_object_ty(ty, c.bounds.region_bound, required_region_bounds);
336-
}
337-
338322
fn accumulate_from_object_ty(&mut self,
339323
ty: Ty<'tcx>,
340324
region_bound: ty::Region,

0 commit comments

Comments
 (0)