Auto merge of #43640 - oli-obk:patch-5, r=nikomatsakis

Uplift some comments to Doc comments
This commit is contained in:
bors 2017-08-05 07:31:00 +00:00
commit 5c7add7551

View File

@ -581,14 +581,14 @@ pub struct Struct {
pub min_size: Size,
}
// Info required to optimize struct layout.
/// Info required to optimize struct layout.
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug)]
enum StructKind {
// A tuple, closure, or univariant which cannot be coerced to unsized.
/// A tuple, closure, or univariant which cannot be coerced to unsized.
AlwaysSizedUnivariant,
// A univariant, the last field of which may be coerced to unsized.
/// A univariant, the last field of which may be coerced to unsized.
MaybeUnsizedUnivariant,
// A univariant, but part of an enum.
/// A univariant, but part of an enum.
EnumVariant,
}
@ -1020,7 +1020,7 @@ pub enum Layout {
/// TyRawPtr or TyRef with a !Sized pointee.
FatPointer {
metadata: Primitive,
// If true, the pointer cannot be null.
/// If true, the pointer cannot be null.
non_zero: bool
},
@ -1031,8 +1031,8 @@ pub enum Layout {
discr: Integer,
signed: bool,
non_zero: bool,
// Inclusive discriminant range.
// If min > max, it represents min...u64::MAX followed by 0...max.
/// Inclusive discriminant range.
/// If min > max, it represents min...u64::MAX followed by 0...max.
// FIXME(eddyb) always use the shortest range, e.g. by finding
// the largest space between two consecutive discriminants and
// taking everything else as the (shortest) discriminant range.
@ -1043,7 +1043,7 @@ pub enum Layout {
/// Single-case enums, and structs/tuples.
Univariant {
variant: Struct,
// If true, the structure is NonZero.
/// If true, the structure is NonZero.
// FIXME(eddyb) use a newtype Layout kind for this.
non_zero: bool
},
@ -1084,9 +1084,9 @@ pub enum Layout {
StructWrappedNullablePointer {
nndiscr: u64,
nonnull: Struct,
// N.B. There is a 0 at the start, for LLVM GEP through a pointer.
/// N.B. There is a 0 at the start, for LLVM GEP through a pointer.
discrfield: FieldPath,
// Like discrfield, but in source order. For debuginfo.
/// Like discrfield, but in source order. For debuginfo.
discrfield_source: FieldPath
}
}
@ -1944,11 +1944,11 @@ pub enum SizeSkeleton<'tcx> {
/// A potentially-fat pointer.
Pointer {
// If true, this pointer is never null.
/// If true, this pointer is never null.
non_zero: bool,
// The type which determines the unsized metadata, if any,
// of this pointer. Either a type parameter or a projection
// depending on one, with regions erased.
/// The type which determines the unsized metadata, if any,
/// of this pointer. Either a type parameter or a projection
/// depending on one, with regions erased.
tail: Ty<'tcx>
}
}