@@ -1658,8 +1658,8 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
1658
1658
1659
1659
use self :: ast:: { PatKind , RangeSyntax :: DotDotDot } ;
1660
1660
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.
1663
1663
fn matches_ellipsis_pat ( pat : & ast:: Pat ) -> Option < ( Option < & Expr > , & Expr , Span ) > {
1664
1664
match & pat. kind {
1665
1665
PatKind :: Range (
@@ -2348,11 +2348,11 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
2348
2348
Uninit ,
2349
2349
} ;
2350
2350
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.
2353
2353
type InitError = ( String , Option < Span > ) ;
2354
2354
2355
- /// Test if this constant is all-0.
2355
+ // Test if this constant is all-0.
2356
2356
fn is_zero ( expr : & hir:: Expr < ' _ > ) -> bool {
2357
2357
use hir:: ExprKind :: * ;
2358
2358
use rustc_ast:: LitKind :: * ;
@@ -2369,7 +2369,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
2369
2369
}
2370
2370
}
2371
2371
2372
- /// Determine if this expression is a "dangerous initialization".
2372
+ // Determine if this expression is a "dangerous initialization".
2373
2373
fn is_dangerous_init ( cx : & LateContext < ' _ > , expr : & hir:: Expr < ' _ > ) -> Option < InitKind > {
2374
2374
if let hir:: ExprKind :: Call ( ref path_expr, ref args) = expr. kind {
2375
2375
// Find calls to `mem::{uninitialized,zeroed}` methods.
@@ -2409,16 +2409,16 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
2409
2409
None
2410
2410
}
2411
2411
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".
2414
2414
fn is_multi_variant ( adt : & ty:: AdtDef ) -> bool {
2415
2415
// As an approximation, we only count dataless variants. Those are definitely inhabited.
2416
2416
let existing_variants = adt. variants . iter ( ) . filter ( |v| v. fields . is_empty ( ) ) . count ( ) ;
2417
2417
existing_variants > 1
2418
2418
}
2419
2419
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.
2422
2422
fn ty_find_init_error < ' tcx > (
2423
2423
tcx : TyCtxt < ' tcx > ,
2424
2424
ty : Ty < ' tcx > ,
0 commit comments