From f613bd6d3af8a28f9ea8a499b4524decaf67f198 Mon Sep 17 00:00:00 2001 From: Stefan Schindler Date: Sat, 10 Sep 2022 16:24:05 +0200 Subject: [PATCH 1/2] Make the one-liner more descriptive --- library/alloc/src/boxed.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 65e323c9e00c3..00c922f3ae93f 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -1,4 +1,4 @@ -//! The `Box` type for heap allocation. +//! The pointer type for heap allocation for an owned value of type `T`. //! //! [`Box`], casually referred to as a 'box', provides the simplest form of //! heap allocation in Rust. Boxes provide ownership for this allocation, and @@ -187,7 +187,7 @@ pub use thin::ThinBox; mod thin; -/// A pointer type for heap allocation. +/// A pointer type for heap allocation for an owned value of type `T`. /// /// See the [module-level documentation](../../std/boxed/index.html) for more. #[lang = "owned_box"] From 70cee5af4b503948f778a4cf8627bbcb62f5d327 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 21 Nov 2022 15:28:41 -0800 Subject: [PATCH 2/2] Touch up Box one-liner --- library/alloc/src/boxed.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 00c922f3ae93f..fc738cb68c37b 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -1,4 +1,4 @@ -//! The pointer type for heap allocation for an owned value of type `T`. +//! The `Box` type for heap allocation. //! //! [`Box`], casually referred to as a 'box', provides the simplest form of //! heap allocation in Rust. Boxes provide ownership for this allocation, and @@ -187,7 +187,7 @@ pub use thin::ThinBox; mod thin; -/// A pointer type for heap allocation for an owned value of type `T`. +/// A pointer type that uniquely owns a heap allocation of type `T`. /// /// See the [module-level documentation](../../std/boxed/index.html) for more. #[lang = "owned_box"]