@@ -466,7 +466,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
466466 let spans = sess. psess . gated_spans . spans . borrow ( ) ;
467467 macro_rules! gate_all {
468468 ( $feature: ident, $explain: literal $( , $help: literal) ?) => {
469- for & span in spans. get( & sym:: $feature) . into_iter ( ) . flatten ( ) {
469+ for & span in spans. get( & sym:: $feature) . into_flat_iter ( ) {
470470 gate!( visitor, $feature, span, $explain $( , $help) ?) ;
471471 }
472472 } ;
@@ -527,13 +527,13 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
527527 ) ;
528528
529529 // `associated_const_equality` will be stabilized as part of `min_generic_const_args`.
530- for & span in spans. get ( & sym:: associated_const_equality) . into_iter ( ) . flatten ( ) {
530+ for & span in spans. get ( & sym:: associated_const_equality) . into_flat_iter ( ) {
531531 gate ! ( visitor, min_generic_const_args, span, "associated const equality is incomplete" ) ;
532532 }
533533
534534 // `mgca_type_const_syntax` is part of `min_generic_const_args` so if
535535 // either or both are enabled we don't need to emit a feature error.
536- for & span in spans. get ( & sym:: mgca_type_const_syntax) . into_iter ( ) . flatten ( ) {
536+ for & span in spans. get ( & sym:: mgca_type_const_syntax) . into_flat_iter ( ) {
537537 if visitor. features . min_generic_const_args ( )
538538 || visitor. features . mgca_type_const_syntax ( )
539539 || span. allows_unstable ( sym:: min_generic_const_args)
@@ -561,13 +561,13 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
561561 // it does **not** mean "`T` doesn't implement `Bound` (positively or negatively)"!
562562 // The latter would be a SemVer hazard!
563563 if !sess. opts . unstable_opts . internal_testing_features || !visitor. features . negative_bounds ( ) {
564- for & span in spans. get ( & sym:: negative_bounds) . into_iter ( ) . flatten ( ) {
564+ for & span in spans. get ( & sym:: negative_bounds) . into_flat_iter ( ) {
565565 sess. dcx ( ) . emit_err ( diagnostics:: NegativeBoundUnsupported { span } ) ;
566566 }
567567 }
568568
569569 if !visitor. features . never_patterns ( ) {
570- for & span in spans. get ( & sym:: never_patterns) . into_iter ( ) . flatten ( ) {
570+ for & span in spans. get ( & sym:: never_patterns) . into_flat_iter ( ) {
571571 if span. allows_unstable ( sym:: never_patterns) {
572572 continue ;
573573 }
@@ -585,7 +585,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
585585 }
586586
587587 // Yield exprs can be enabled either by `yield_expr`, by `coroutines` or by `gen_blocks`.
588- for & span in spans. get ( & sym:: yield_expr) . into_iter ( ) . flatten ( ) {
588+ for & span in spans. get ( & sym:: yield_expr) . into_flat_iter ( ) {
589589 if ( !visitor. features . coroutines ( ) && !span. allows_unstable ( sym:: coroutines) )
590590 && ( !visitor. features . gen_blocks ( ) && !span. allows_unstable ( sym:: gen_blocks) )
591591 && ( !visitor. features . yield_expr ( ) && !span. allows_unstable ( sym:: yield_expr) )
@@ -607,7 +607,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
607607
608608 macro_rules! soft_gate_all_legacy_dont_use {
609609 ( $feature: ident, $explain: literal) => {
610- for & span in spans. get( & sym:: $feature) . into_iter ( ) . flatten ( ) {
610+ for & span in spans. get( & sym:: $feature) . into_flat_iter ( ) {
611611 if !visitor. features. $feature( ) && !span. allows_unstable( sym:: $feature) {
612612 feature_warn( & visitor. sess, sym:: $feature, span, $explain) ;
613613 }
@@ -625,7 +625,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
625625 soft_gate_all_legacy_dont_use ! ( try_blocks, "`try` blocks are unstable" ) ;
626626 // tidy-alphabetical-end
627627
628- for & span in spans. get ( & sym:: min_specialization) . into_iter ( ) . flatten ( ) {
628+ for & span in spans. get ( & sym:: min_specialization) . into_flat_iter ( ) {
629629 if !visitor. features . specialization ( )
630630 && !visitor. features . min_specialization ( )
631631 && !span. allows_unstable ( sym:: specialization)
0 commit comments