@@ -1658,8 +1658,8 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
16581658
16591659 use self :: ast:: { PatKind , RangeSyntax :: DotDotDot } ;
16601660
1661- /// If `pat` is a `...` pattern, return the start and end of the range, as well as the span
1662- /// corresponding to the ellipsis.
1661+ // If `pat` is a `...` pattern, return the start and end of the range, as well as the span
1662+ // corresponding to the ellipsis.
16631663 fn matches_ellipsis_pat ( pat : & ast:: Pat ) -> Option < ( Option < & Expr > , & Expr , Span ) > {
16641664 match & pat. kind {
16651665 PatKind :: Range (
@@ -2348,11 +2348,11 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
23482348 Uninit ,
23492349 } ;
23502350
2351- /// Information about why a type cannot be initialized this way.
2352- /// Contains an error message and optionally a span to point at.
2351+ // Information about why a type cannot be initialized this way.
2352+ // Contains an error message and optionally a span to point at.
23532353 type InitError = ( String , Option < Span > ) ;
23542354
2355- /// Test if this constant is all-0.
2355+ // Test if this constant is all-0.
23562356 fn is_zero ( expr : & hir:: Expr < ' _ > ) -> bool {
23572357 use hir:: ExprKind :: * ;
23582358 use rustc_ast:: LitKind :: * ;
@@ -2369,7 +2369,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
23692369 }
23702370 }
23712371
2372- /// Determine if this expression is a "dangerous initialization".
2372+ // Determine if this expression is a "dangerous initialization".
23732373 fn is_dangerous_init ( cx : & LateContext < ' _ > , expr : & hir:: Expr < ' _ > ) -> Option < InitKind > {
23742374 if let hir:: ExprKind :: Call ( ref path_expr, ref args) = expr. kind {
23752375 // Find calls to `mem::{uninitialized,zeroed}` methods.
@@ -2409,16 +2409,16 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
24092409 None
24102410 }
24112411
2412- /// Test if this enum has several actually "existing" variants.
2413- /// Zero-sized uninhabited variants do not always have a tag assigned and thus do not "exist".
2412+ // Test if this enum has several actually "existing" variants.
2413+ // Zero-sized uninhabited variants do not always have a tag assigned and thus do not "exist".
24142414 fn is_multi_variant ( adt : & ty:: AdtDef ) -> bool {
24152415 // As an approximation, we only count dataless variants. Those are definitely inhabited.
24162416 let existing_variants = adt. variants . iter ( ) . filter ( |v| v. fields . is_empty ( ) ) . count ( ) ;
24172417 existing_variants > 1
24182418 }
24192419
2420- /// Return `Some` only if we are sure this type does *not*
2421- /// allow zero initialization.
2420+ // Return `Some` only if we are sure this type does *not*
2421+ // allow zero initialization.
24222422 fn ty_find_init_error < ' tcx > (
24232423 tcx : TyCtxt < ' tcx > ,
24242424 ty : Ty < ' tcx > ,
0 commit comments