]> git.lizzy.rs Git - rust.git/commitdiff
typeck: remove dead code
authorJorge Aparicio <japaricious@gmail.com>
Sun, 4 Jan 2015 15:53:03 +0000 (10:53 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 22:22:16 +0000 (17:22 -0500)
src/librustc_typeck/check/closure.rs
src/librustc_typeck/check/regionck.rs
src/librustc_typeck/check/regionmanip.rs

index a1756dd6334dfdbaee999477277dc94b65e29d9a..7671ad36971ac768c4d4ecaa48e8bc2d936cc88f 100644 (file)
 use super::{check_fn, Expectation, FnCtxt};
 
 use astconv;
-use middle::infer;
 use middle::region::CodeExtent;
 use middle::subst;
 use middle::ty::{self, ToPolyTraitRef, Ty};
 use rscope::RegionScope;
 use syntax::abi;
 use syntax::ast;
-use syntax::ast::CaptureClause::*;
 use syntax::ast_util;
 use util::ppaux::Repr;
 
 pub fn check_expr_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
                                    expr: &ast::Expr,
-                                   capture: ast::CaptureClause,
+                                   _capture: ast::CaptureClause,
                                    opt_kind: Option<ast::UnboxedClosureKind>,
                                    decl: &ast::FnDecl,
                                    body: &ast::Block,
index 2adbd1f0a3f7f5dd92e17c489c7b789ac5dbd692..5a8263263808ee1eab07c18217294bfbac925867 100644 (file)
@@ -856,10 +856,8 @@ fn constrain_free_variables_in_by_ref_closure(
 
 fn constrain_callee(rcx: &mut Rcx,
                     callee_id: ast::NodeId,
-                    call_expr: &ast::Expr,
-                    callee_expr: &ast::Expr) {
-    let call_region = ty::ReScope(CodeExtent::from_node_id(call_expr.id));
-
+                    _call_expr: &ast::Expr,
+                    _callee_expr: &ast::Expr) {
     let callee_ty = rcx.resolve_node_type(callee_id);
     match callee_ty.sty {
         ty::ty_bare_fn(..) => { }
index e73fa195b04484b6c49ba4ce4ba89e8e9a3115a2..7a9961e750c217fb30deed5c03beea4257fa5263 100644 (file)
@@ -319,22 +319,6 @@ fn accumulate_from_adt(&mut self,
         }
     }
 
-    fn accumulate_from_closure_ty(&mut self,
-                                  ty: Ty<'tcx>,
-                                  c: &ty::ClosureTy<'tcx>)
-    {
-        match c.store {
-            ty::RegionTraitStore(r_b, _) => {
-                self.push_region_constraint_from_top(r_b);
-            }
-            ty::UniqTraitStore => { }
-        }
-
-        let required_region_bounds =
-            ty::object_region_bounds(self.tcx, None, c.bounds.builtin_bounds);
-        self.accumulate_from_object_ty(ty, c.bounds.region_bound, required_region_bounds);
-    }
-
     fn accumulate_from_object_ty(&mut self,
                                  ty: Ty<'tcx>,
                                  region_bound: ty::Region,