about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-04-01 10:39:02 -0400
committerCorey Richardson <corey@octayn.net>2014-04-02 11:17:23 -0400
commitdcb01ff573b5f4404d2e4ef6700dca63e91f0eb4 (patch)
tree1d6d5e014b91a2cdcd03e9e17d08ceb82d4a5810 /src
parent39f839d9ee2cbef25de4f3a4fca514f5ed8a313d (diff)
downloadrust-dcb01ff573b5f4404d2e4ef6700dca63e91f0eb4.tar.gz
rust-dcb01ff573b5f4404d2e4ef6700dca63e91f0eb4.zip
middle: typeck: check: remove dead code
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/typeck/check/mod.rs46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs
index 9aa98ee5f8e..b357810d526 100644
--- a/src/librustc/middle/typeck/check/mod.rs
+++ b/src/librustc/middle/typeck/check/mod.rs
@@ -510,27 +510,6 @@ fn check_fn<'a>(ccx: &'a CrateCtxt<'a>,
     fcx
 }
 
-pub fn check_no_duplicate_fields(tcx: &ty::ctxt,
-                                 fields: Vec<(ast::Ident, Span)>) {
-    let mut field_names = HashMap::new();
-
-    for p in fields.iter() {
-        let (id, sp) = *p;
-        let orig_sp = field_names.find(&id).map(|x| *x);
-        match orig_sp {
-            Some(orig_sp) => {
-                tcx.sess.span_err(sp, format!("duplicate field name {} in record type declaration",
-                                              token::get_ident(id)));
-                tcx.sess.span_note(orig_sp, "first declaration of this field occurred here");
-                break;
-            }
-            None => {
-                field_names.insert(id, sp);
-            }
-        }
-    }
-}
-
 pub fn check_struct(ccx: &CrateCtxt, id: ast::NodeId, span: Span) {
     let tcx = ccx.tcx;
 
@@ -1010,10 +989,6 @@ impl<'a> FnCtxt<'a> {
         }
     }
 
-    pub fn block_region(&self) -> ty::Region {
-        ty::ReScope(self.region_lb.get())
-    }
-
     #[inline]
     pub fn write_ty(&self, node_id: ast::NodeId, ty: ty::t) {
         debug!("write_ty({}, {}) in fcx {}",
@@ -1100,18 +1075,6 @@ impl<'a> FnCtxt<'a> {
         }
     }
 
-    pub fn node_ty_substs(&self, id: ast::NodeId) -> ty::substs {
-        match self.inh.node_type_substs.borrow().find(&id) {
-            Some(ts) => (*ts).clone(),
-            None => {
-                self.tcx().sess.bug(
-                    format!("no type substs for node {}: {} in fcx {}",
-                            id, self.tcx().map.node_to_str(id),
-                            self.tag()));
-            }
-        }
-    }
-
     pub fn method_ty_substs(&self, id: ast::NodeId) -> ty::substs {
         match self.inh.method_map.borrow().find(&MethodCall::expr(id)) {
             Some(method) => method.substs.clone(),
@@ -1167,11 +1130,6 @@ impl<'a> FnCtxt<'a> {
         }
     }
 
-    pub fn can_mk_assignty(&self, sub: ty::t, sup: ty::t)
-                           -> Result<(), ty::type_err> {
-        infer::can_mk_coercety(self.infcx(), sub, sup)
-    }
-
     pub fn mk_eqty(&self,
                    a_is_expected: bool,
                    origin: infer::TypeOrigin,
@@ -3300,10 +3258,6 @@ pub fn check_block_no_value(fcx: &FnCtxt, blk: &ast::Block)  {
     }
 }
 
-pub fn check_block(fcx0: &FnCtxt, blk: &ast::Block)  {
-    check_block_with_expected(fcx0, blk, None)
-}
-
 pub fn check_block_with_expected(fcx: &FnCtxt,
                                  blk: &ast::Block,
                                  expected: Option<ty::t>) {