From 0064bd1b994b22093c6e7960818351ae65e0d183 Mon Sep 17 00:00:00 2001 From: binarycat Date: Fri, 30 Aug 2024 16:01:22 -0400 Subject: [PATCH] add extra linebreaks so rustdoc can identify the first sentence there should probably be a lint against this in rustdoc, it causes too many lines to be shown in the short documentation overviews expecially noticable for the slice primative type: https://doc.rust-lang.org/std/index.html --- library/core/src/hint.rs | 1 + library/core/src/primitive_docs.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index 6ca5e53df3b01..a69f0afdb0a59 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -1,6 +1,7 @@ #![stable(feature = "core_hint", since = "1.27.0")] //! Hints to compiler that affects how code should be emitted or optimized. +//! //! Hints may be compile time or runtime. use crate::{intrinsics, ub_checks}; diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index fe6ed7e0cf368..ce6e6aec7ff6b 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -832,8 +832,9 @@ mod prim_array {} #[doc(alias = "[")] #[doc(alias = "]")] #[doc(alias = "[]")] -/// A dynamically-sized view into a contiguous sequence, `[T]`. Contiguous here -/// means that elements are laid out so that every element is the same +/// A dynamically-sized view into a contiguous sequence, `[T]`. +/// +/// Contiguous here means that elements are laid out so that every element is the same /// distance from its neighbors. /// /// *[See also the `std::slice` module](crate::slice).*