@@ -581,14 +581,14 @@ pub struct Struct {
581
581
pub min_size : Size ,
582
582
}
583
583
584
- // Info required to optimize struct layout.
584
+ /// Info required to optimize struct layout.
585
585
#[ derive( Copy , Clone , Eq , PartialEq , Ord , PartialOrd , Debug ) ]
586
586
enum StructKind {
587
- // A tuple, closure, or univariant which cannot be coerced to unsized.
587
+ /// A tuple, closure, or univariant which cannot be coerced to unsized.
588
588
AlwaysSizedUnivariant ,
589
- // A univariant, the last field of which may be coerced to unsized.
589
+ /// A univariant, the last field of which may be coerced to unsized.
590
590
MaybeUnsizedUnivariant ,
591
- // A univariant, but part of an enum.
591
+ /// A univariant, but part of an enum.
592
592
EnumVariant ,
593
593
}
594
594
@@ -1020,7 +1020,7 @@ pub enum Layout {
1020
1020
/// TyRawPtr or TyRef with a !Sized pointee.
1021
1021
FatPointer {
1022
1022
metadata : Primitive ,
1023
- // If true, the pointer cannot be null.
1023
+ /// If true, the pointer cannot be null.
1024
1024
non_zero : bool
1025
1025
} ,
1026
1026
@@ -1031,8 +1031,8 @@ pub enum Layout {
1031
1031
discr : Integer ,
1032
1032
signed : bool ,
1033
1033
non_zero : bool ,
1034
- // Inclusive discriminant range.
1035
- // If min > max, it represents min...u64::MAX followed by 0...max.
1034
+ /// Inclusive discriminant range.
1035
+ /// If min > max, it represents min...u64::MAX followed by 0...max.
1036
1036
// FIXME(eddyb) always use the shortest range, e.g. by finding
1037
1037
// the largest space between two consecutive discriminants and
1038
1038
// taking everything else as the (shortest) discriminant range.
@@ -1043,7 +1043,7 @@ pub enum Layout {
1043
1043
/// Single-case enums, and structs/tuples.
1044
1044
Univariant {
1045
1045
variant : Struct ,
1046
- // If true, the structure is NonZero.
1046
+ /// If true, the structure is NonZero.
1047
1047
// FIXME(eddyb) use a newtype Layout kind for this.
1048
1048
non_zero : bool
1049
1049
} ,
@@ -1084,9 +1084,9 @@ pub enum Layout {
1084
1084
StructWrappedNullablePointer {
1085
1085
nndiscr : u64 ,
1086
1086
nonnull : Struct ,
1087
- // N.B. There is a 0 at the start, for LLVM GEP through a pointer.
1087
+ /// N.B. There is a 0 at the start, for LLVM GEP through a pointer.
1088
1088
discrfield : FieldPath ,
1089
- // Like discrfield, but in source order. For debuginfo.
1089
+ /// Like discrfield, but in source order. For debuginfo.
1090
1090
discrfield_source : FieldPath
1091
1091
}
1092
1092
}
@@ -1944,11 +1944,11 @@ pub enum SizeSkeleton<'tcx> {
1944
1944
1945
1945
/// A potentially-fat pointer.
1946
1946
Pointer {
1947
- // If true, this pointer is never null.
1947
+ /// If true, this pointer is never null.
1948
1948
non_zero : bool ,
1949
- // The type which determines the unsized metadata, if any,
1950
- // of this pointer. Either a type parameter or a projection
1951
- // depending on one, with regions erased.
1949
+ /// The type which determines the unsized metadata, if any,
1950
+ /// of this pointer. Either a type parameter or a projection
1951
+ /// depending on one, with regions erased.
1952
1952
tail : Ty < ' tcx >
1953
1953
}
1954
1954
}
0 commit comments