mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
rustc: Make the compiler no longer ICE on unused foreign constants
This commit is contained in:
parent
65b05a6ce8
commit
1f056eda8e
@ -794,7 +794,10 @@ fn trans_foreign_mod(ccx: @crate_ctxt,
|
||||
}
|
||||
}
|
||||
}
|
||||
ast::foreign_item_const(*) => {}
|
||||
ast::foreign_item_const(*) => {
|
||||
let ident = ccx.sess.parse_sess.interner.get(foreign_item.ident);
|
||||
ccx.item_symbols.insert(foreign_item.id, copy *ident);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +306,10 @@ struct lookup {
|
||||
};
|
||||
|
||||
let trt_methods = ty::trait_methods(tcx, trait_id);
|
||||
match vec::position(*trt_methods, |m| m.ident == self.m_name) {
|
||||
let match_fn: &fn(m: ty::method) -> bool = |m| {
|
||||
m.self_ty != ast::sty_static && m.ident == self.m_name
|
||||
};
|
||||
match vec::position(*trt_methods, match_fn) {
|
||||
None => {
|
||||
/* check next bound */
|
||||
trait_bnd_idx += 1u;
|
||||
|
Loading…
Reference in New Issue
Block a user