Skip to content

Commit dcb01ff

Browse files
committed
middle: typeck: check: remove dead code
1 parent 39f839d commit dcb01ff

File tree

1 file changed

+0
-46
lines changed
  • src/librustc/middle/typeck/check

1 file changed

+0
-46
lines changed

src/librustc/middle/typeck/check/mod.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -510,27 +510,6 @@ fn check_fn<'a>(ccx: &'a CrateCtxt<'a>,
510510
fcx
511511
}
512512

513-
pub fn check_no_duplicate_fields(tcx: &ty::ctxt,
514-
fields: Vec<(ast::Ident, Span)>) {
515-
let mut field_names = HashMap::new();
516-
517-
for p in fields.iter() {
518-
let (id, sp) = *p;
519-
let orig_sp = field_names.find(&id).map(|x| *x);
520-
match orig_sp {
521-
Some(orig_sp) => {
522-
tcx.sess.span_err(sp, format!("duplicate field name {} in record type declaration",
523-
token::get_ident(id)));
524-
tcx.sess.span_note(orig_sp, "first declaration of this field occurred here");
525-
break;
526-
}
527-
None => {
528-
field_names.insert(id, sp);
529-
}
530-
}
531-
}
532-
}
533-
534513
pub fn check_struct(ccx: &CrateCtxt, id: ast::NodeId, span: Span) {
535514
let tcx = ccx.tcx;
536515

@@ -1010,10 +989,6 @@ impl<'a> FnCtxt<'a> {
1010989
}
1011990
}
1012991

1013-
pub fn block_region(&self) -> ty::Region {
1014-
ty::ReScope(self.region_lb.get())
1015-
}
1016-
1017992
#[inline]
1018993
pub fn write_ty(&self, node_id: ast::NodeId, ty: ty::t) {
1019994
debug!("write_ty({}, {}) in fcx {}",
@@ -1100,18 +1075,6 @@ impl<'a> FnCtxt<'a> {
11001075
}
11011076
}
11021077

1103-
pub fn node_ty_substs(&self, id: ast::NodeId) -> ty::substs {
1104-
match self.inh.node_type_substs.borrow().find(&id) {
1105-
Some(ts) => (*ts).clone(),
1106-
None => {
1107-
self.tcx().sess.bug(
1108-
format!("no type substs for node {}: {} in fcx {}",
1109-
id, self.tcx().map.node_to_str(id),
1110-
self.tag()));
1111-
}
1112-
}
1113-
}
1114-
11151078
pub fn method_ty_substs(&self, id: ast::NodeId) -> ty::substs {
11161079
match self.inh.method_map.borrow().find(&MethodCall::expr(id)) {
11171080
Some(method) => method.substs.clone(),
@@ -1167,11 +1130,6 @@ impl<'a> FnCtxt<'a> {
11671130
}
11681131
}
11691132

1170-
pub fn can_mk_assignty(&self, sub: ty::t, sup: ty::t)
1171-
-> Result<(), ty::type_err> {
1172-
infer::can_mk_coercety(self.infcx(), sub, sup)
1173-
}
1174-
11751133
pub fn mk_eqty(&self,
11761134
a_is_expected: bool,
11771135
origin: infer::TypeOrigin,
@@ -3300,10 +3258,6 @@ pub fn check_block_no_value(fcx: &FnCtxt, blk: &ast::Block) {
33003258
}
33013259
}
33023260

3303-
pub fn check_block(fcx0: &FnCtxt, blk: &ast::Block) {
3304-
check_block_with_expected(fcx0, blk, None)
3305-
}
3306-
33073261
pub fn check_block_with_expected(fcx: &FnCtxt,
33083262
blk: &ast::Block,
33093263
expected: Option<ty::t>) {

0 commit comments

Comments
 (0)