librustc: Fix merge fallout.
This commit is contained in:
parent
a0646ae3a4
commit
0327d8a073
2 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue