about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Schneider <oli-obk@users.noreply.github.com>2017-08-04 12:33:48 +0200
committerGitHub <noreply@github.com>2017-08-04 12:33:48 +0200
commita508a2e56b3c91be1e941eb6bd4aa7c30bd7dbfd (patch)
tree1606ff030f2d185b12544f2af00c832040febae6
parentc523b3f95498cf35a2f1a6bb8c071394ca4a6143 (diff)
downloadrust-a508a2e56b3c91be1e941eb6bd4aa7c30bd7dbfd.tar.gz
rust-a508a2e56b3c91be1e941eb6bd4aa7c30bd7dbfd.zip
Uplift some comments to Doc comments
-rw-r--r--src/librustc/ty/layout.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs
index 009b0619bd7..e770f1d55dc 100644
--- a/src/librustc/ty/layout.rs
+++ b/src/librustc/ty/layout.rs
@@ -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>
     }
 }