File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -609,15 +609,17 @@ pub fn each_lint(sess: session::Session,
609
609
// Check from a list of attributes if it contains the appropriate
610
610
// `#[level(lintname)]` attribute (e.g. `#[allow(dead_code)]).
611
611
pub fn contains_lint ( attrs : & [ ast:: Attribute ] ,
612
- level : level , lintname : & ' static str ) -> bool {
612
+ level : level ,
613
+ lintname : & ' static str )
614
+ -> bool {
613
615
let level_name = level_to_str ( level) ;
614
- for attr in attrs. iter ( ) . filter ( |m| level_name == m. name ( ) ) {
616
+ for attr in attrs. iter ( ) . filter ( |m| m. name ( ) . equiv ( & level_name ) ) {
615
617
if attr. meta_item_list ( ) . is_none ( ) {
616
618
continue
617
619
}
618
620
let list = attr. meta_item_list ( ) . unwrap ( ) ;
619
621
for meta_item in list. iter ( ) {
620
- if lintname == meta_item. name ( ) {
622
+ if meta_item. name ( ) . equiv ( & lintname ) {
621
623
return true ;
622
624
}
623
625
}
Original file line number Diff line number Diff line change @@ -482,7 +482,7 @@ pub fn declare_tydesc(ccx: &CrateContext, t: ty::t) -> @tydesc_info {
482
482
} ) ;
483
483
484
484
let ty_name = token:: intern_and_get_ident ( ppaux:: ty_to_str ( ccx. tcx , t) ) ;
485
- let ty_name = C_estr_slice ( ccx, ty_name) ;
485
+ let ty_name = C_str_slice ( ccx, ty_name) ;
486
486
487
487
let inf = @tydesc_info {
488
488
ty : t,
You can’t perform that action at this time.
0 commit comments