@@ -259,7 +259,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
259
259
method_id. node) ;
260
260
if is_private &&
261
261
( container_id. crate != local_crate ||
262
- !privileged_items. iter( ) . any_ ( |x| x == & ( container_id. node) ) ) {
262
+ !privileged_items. iter( ) . any ( |x| x == & ( container_id. node) ) ) {
263
263
tcx. sess. span_err( span,
264
264
fmt!( "method `%s` is private" ,
265
265
token:: ident_to_str( name) ) ) ;
@@ -287,7 +287,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
287
287
def_fn( def_id, _) => {
288
288
if def_id. crate == local_crate {
289
289
if local_item_is_private( span, def_id. node) &&
290
- !privileged_items. iter( ) . any_ ( |x| x == & def_id. node) {
290
+ !privileged_items. iter( ) . any ( |x| x == & def_id. node) {
291
291
tcx. sess. span_err( span,
292
292
fmt!( "function `%s` is private" ,
293
293
token:: ident_to_str( path. idents. last( ) ) ) ) ;
@@ -332,7 +332,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
332
332
provided( method)
333
333
if method. vis == private &&
334
334
!privileged_items. iter( )
335
- . any_ ( |x| x == & ( trait_id. node) ) => {
335
+ . any ( |x| x == & ( trait_id. node) ) => {
336
336
tcx. sess. span_err( span,
337
337
fmt!( "method `%s` is private" ,
338
338
token:: ident_to_str( & method
@@ -417,7 +417,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
417
417
base) ) ) . sty {
418
418
ty_struct( id, _)
419
419
if id. crate != local_crate || !privileged_items. iter( )
420
- . any_ ( |x| x == & ( id. node) ) => {
420
+ . any ( |x| x == & ( id. node) ) => {
421
421
debug!( "(privacy checking) checking field access" ) ;
422
422
check_field( expr. span, id, ident) ;
423
423
}
@@ -430,7 +430,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
430
430
base) ) ) . sty {
431
431
ty_struct( id, _)
432
432
if id. crate != local_crate ||
433
- !privileged_items. iter( ) . any_ ( |x| x == & ( id. node) ) => {
433
+ !privileged_items. iter( ) . any ( |x| x == & ( id. node) ) => {
434
434
match method_map. find( & expr. id) {
435
435
None => {
436
436
tcx. sess. span_bug( expr. span,
@@ -456,7 +456,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
456
456
match ty:: get( ty:: expr_ty( tcx, expr) ) . sty {
457
457
ty_struct( id, _) => {
458
458
if id. crate != local_crate ||
459
- !privileged_items. iter( ) . any_ ( |x| x == & ( id. node) ) {
459
+ !privileged_items. iter( ) . any ( |x| x == & ( id. node) ) {
460
460
for ( * fields) . iter( ) . advance |field| {
461
461
debug!( "(privacy checking) checking \
462
462
field in struct literal") ;
@@ -467,7 +467,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
467
467
}
468
468
ty_enum( id, _) => {
469
469
if id. crate != local_crate ||
470
- !privileged_items. iter( ) . any_ ( |x| x == & ( id. node) ) {
470
+ !privileged_items. iter( ) . any ( |x| x == & ( id. node) ) {
471
471
match tcx. def_map. get_copy( & expr. id) {
472
472
def_variant( _, variant_id) => {
473
473
for ( * fields) . iter( ) . advance |field| {
@@ -504,7 +504,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
504
504
match ty:: get( ty:: expr_ty( tcx, operand) ) . sty {
505
505
ty_enum( id, _) => {
506
506
if id. crate != local_crate ||
507
- !privileged_items. iter( ) . any_ ( |x| x == & ( id. node) ) {
507
+ !privileged_items. iter( ) . any ( |x| x == & ( id. node) ) {
508
508
check_variant( expr. span, id) ;
509
509
}
510
510
}
@@ -522,7 +522,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
522
522
match ty:: get( ty:: pat_ty( tcx, pattern) ) . sty {
523
523
ty_struct( id, _) => {
524
524
if id. crate != local_crate ||
525
- !privileged_items. iter( ) . any_ ( |x| x == & ( id. node) ) {
525
+ !privileged_items. iter( ) . any ( |x| x == & ( id. node) ) {
526
526
for fields. iter( ) . advance |field| {
527
527
debug!( "(privacy checking) checking \
528
528
struct pattern") ;
@@ -533,7 +533,7 @@ pub fn check_crate<'mm>(tcx: ty::ctxt,
533
533
}
534
534
ty_enum( enum_id, _) => {
535
535
if enum_id. crate != local_crate ||
536
- !privileged_items. iter( ) . any_ ( |x| x == & enum_id. node) {
536
+ !privileged_items. iter( ) . any ( |x| x == & enum_id. node) {
537
537
match tcx. def_map. find( & pattern. id) {
538
538
Some ( & def_variant( _, variant_id) ) => {
539
539
for fields. iter( ) . advance |field| {
0 commit comments