librustc: Fix merge fallout.

This commit is contained in:
Patrick Walton 2014-01-13 15:06:50 -08:00 committed by Huon Wilson
parent a0646ae3a4
commit 0327d8a073
2 changed files with 6 additions and 4 deletions

View file

@ -609,15 +609,17 @@ pub fn each_lint(sess: session::Session,
// Check from a list of attributes if it contains the appropriate
// `#[level(lintname)]` attribute (e.g. `#[allow(dead_code)]).
pub fn contains_lint(attrs: &[ast::Attribute],
level: level, lintname: &'static str) -> bool {
level: level,
lintname: &'static str)
-> bool {
let level_name = level_to_str(level);
for attr in attrs.iter().filter(|m| level_name == m.name()) {
for attr in attrs.iter().filter(|m| m.name().equiv(&level_name)) {
if attr.meta_item_list().is_none() {
continue
}
let list = attr.meta_item_list().unwrap();
for meta_item in list.iter() {
if lintname == meta_item.name() {
if meta_item.name().equiv(&lintname) {
return true;
}
}

View file

@ -482,7 +482,7 @@ pub fn declare_tydesc(ccx: &CrateContext, t: ty::t) -> @tydesc_info {
});
let ty_name = token::intern_and_get_ident(ppaux::ty_to_str(ccx.tcx, t));
let ty_name = C_estr_slice(ccx, ty_name);
let ty_name = C_str_slice(ccx, ty_name);
let inf = @tydesc_info {
ty: t,