Skip to content

Commit 5c7add7

Browse files
committedAug 5, 2017
Auto merge of #43640 - oli-obk:patch-5, r=nikomatsakis
Uplift some comments to Doc comments
2 parents e8909d2 + a508a2e commit 5c7add7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed
 

‎src/librustc/ty/layout.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,14 @@ pub struct Struct {
581581
pub min_size: Size,
582582
}
583583

584-
// Info required to optimize struct layout.
584+
/// Info required to optimize struct layout.
585585
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug)]
586586
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.
588588
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.
590590
MaybeUnsizedUnivariant,
591-
// A univariant, but part of an enum.
591+
/// A univariant, but part of an enum.
592592
EnumVariant,
593593
}
594594

@@ -1020,7 +1020,7 @@ pub enum Layout {
10201020
/// TyRawPtr or TyRef with a !Sized pointee.
10211021
FatPointer {
10221022
metadata: Primitive,
1023-
// If true, the pointer cannot be null.
1023+
/// If true, the pointer cannot be null.
10241024
non_zero: bool
10251025
},
10261026

@@ -1031,8 +1031,8 @@ pub enum Layout {
10311031
discr: Integer,
10321032
signed: bool,
10331033
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.
10361036
// FIXME(eddyb) always use the shortest range, e.g. by finding
10371037
// the largest space between two consecutive discriminants and
10381038
// taking everything else as the (shortest) discriminant range.
@@ -1043,7 +1043,7 @@ pub enum Layout {
10431043
/// Single-case enums, and structs/tuples.
10441044
Univariant {
10451045
variant: Struct,
1046-
// If true, the structure is NonZero.
1046+
/// If true, the structure is NonZero.
10471047
// FIXME(eddyb) use a newtype Layout kind for this.
10481048
non_zero: bool
10491049
},
@@ -1084,9 +1084,9 @@ pub enum Layout {
10841084
StructWrappedNullablePointer {
10851085
nndiscr: u64,
10861086
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.
10881088
discrfield: FieldPath,
1089-
// Like discrfield, but in source order. For debuginfo.
1089+
/// Like discrfield, but in source order. For debuginfo.
10901090
discrfield_source: FieldPath
10911091
}
10921092
}
@@ -1944,11 +1944,11 @@ pub enum SizeSkeleton<'tcx> {
19441944

19451945
/// A potentially-fat pointer.
19461946
Pointer {
1947-
// If true, this pointer is never null.
1947+
/// If true, this pointer is never null.
19481948
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.
19521952
tail: Ty<'tcx>
19531953
}
19541954
}

0 commit comments

Comments
 (0)