@@ -1493,8 +1493,9 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
14931493
14941494 let ty = cx. tcx . type_of ( item. owner_id ) . skip_binder ( ) ;
14951495 if ty. has_inherent_projections ( ) {
1496- // Bounds of type aliases that contain opaque types or inherent projections are respected.
1497- // E.g: `type X = impl Trait;`, `type X = (impl Trait, Y);`, `type X = Type::Inherent;`.
1496+ // Bounds of type aliases that contain opaque types or inherent projections are
1497+ // respected. E.g: `type X = impl Trait;`, `type X = (impl Trait, Y);`, `type X =
1498+ // Type::Inherent;`.
14981499 return ;
14991500 }
15001501
@@ -2209,7 +2210,8 @@ impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements {
22092210 hir_generics. span . shrink_to_hi ( ) . to ( where_span)
22102211 } ;
22112212
2212- // Due to macro expansions, the `full_where_span` might not actually contain all predicates.
2213+ // Due to macro expansions, the `full_where_span` might not actually contain all
2214+ // predicates.
22132215 if where_lint_spans. iter ( ) . all ( |& sp| full_where_span. contains ( sp) ) {
22142216 lint_spans. push ( full_where_span) ;
22152217 } else {
@@ -2586,7 +2588,8 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
25862588 } ;
25872589 // So we have at least one potentially inhabited variant. Might we have two?
25882590 let Some ( second_variant) = potential_variants. next ( ) else {
2589- // There is only one potentially inhabited variant. So we can recursively check that variant!
2591+ // There is only one potentially inhabited variant. So we can recursively
2592+ // check that variant!
25902593 return variant_find_init_error (
25912594 cx,
25922595 ty,
@@ -2596,10 +2599,10 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
25962599 init,
25972600 ) ;
25982601 } ;
2599- // So we have at least two potentially inhabited variants.
2600- // If we can prove that we have at least two *definitely* inhabited variants,
2601- // then we have a tag and hence leaving this uninit is definitely disallowed.
2602- // (Leaving it zeroed could be okay, depending on which variant is encoded as zero tag.)
2602+ // So we have at least two potentially inhabited variants. If we can prove that
2603+ // we have at least two *definitely* inhabited variants, then we have a tag and
2604+ // hence leaving this uninit is definitely disallowed. (Leaving it zeroed could
2605+ // be okay, depending on which variant is encoded as zero tag.)
26032606 if init == InitKind :: Uninit {
26042607 let definitely_inhabited = ( first_variant. 1 as usize )
26052608 + ( second_variant. 1 as usize )
@@ -2810,7 +2813,8 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
28102813
28112814 let mut found_labels = Vec :: new ( ) ;
28122815
2813- // A semicolon might not actually be specified as a separator for all targets, but it seems like LLVM accepts it always
2816+ // A semicolon might not actually be specified as a separator for all targets, but
2817+ // it seems like LLVM accepts it always.
28142818 let statements = template_str. split ( |c| matches ! ( c, '\n' | ';' ) ) ;
28152819 for statement in statements {
28162820 // If there's a comment, trim it from the statement
@@ -2823,7 +2827,8 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
28232827 let mut chars = possible_label. chars ( ) ;
28242828
28252829 let Some ( start) = chars. next ( ) else {
2826- // Empty string means a leading ':' in this section, which is not a label.
2830+ // Empty string means a leading ':' in this section, which is not a
2831+ // label.
28272832 break ' label_loop;
28282833 } ;
28292834
@@ -2840,12 +2845,15 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
28402845
28412846 // Labels continue with ASCII alphanumeric characters, _, or $
28422847 for c in chars {
2843- // Inside a template format arg, any character is permitted for the puproses of label detection
2844- // because we assume that it can be replaced with some other valid label string later.
2845- // `options(raw)` asm blocks cannot have format args, so they are excluded from this special case.
2848+ // Inside a template format arg, any character is permitted for the
2849+ // puproses of label detection because we assume that it can be
2850+ // replaced with some other valid label string later. `options(raw)`
2851+ // asm blocks cannot have format args, so they are excluded from this
2852+ // special case.
28462853 if !raw && in_bracket {
28472854 if c == '{' {
2848- // Nested brackets are not allowed in format args, this cannot be a label.
2855+ // Nested brackets are not allowed in format args, this cannot
2856+ // be a label.
28492857 break ' label_loop;
28502858 }
28512859
@@ -2858,7 +2866,8 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
28582866 in_bracket = true ;
28592867 } else {
28602868 if !( c. is_ascii_alphanumeric ( ) || matches ! ( c, '_' | '$' ) ) {
2861- // The potential label had an invalid character inside it, it cannot be a label.
2869+ // The potential label had an invalid character inside it, it
2870+ // cannot be a label.
28622871 break ' label_loop;
28632872 }
28642873 }
@@ -2877,7 +2886,8 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
28772886 . into_iter ( )
28782887 . filter_map ( |label| find_label_span ( label) )
28792888 . collect :: < Vec < Span > > ( ) ;
2880- // If there were labels but we couldn't find a span, combine the warnings and use the template span
2889+ // If there were labels but we couldn't find a span, combine the warnings and
2890+ // use the template span.
28812891 let target_spans: MultiSpan =
28822892 if spans. len ( ) > 0 { spans. into ( ) } else { ( * template_span) . into ( ) } ;
28832893
0 commit comments