From e6b761b902fe80ba454368d078fb834554981109 Mon Sep 17 00:00:00 2001 From: Jan Behrens Date: Thu, 21 Jul 2022 16:40:14 +0200 Subject: [PATCH] fixup! docs: Improve AsRef / AsMut docs on blanket impls Changed wording in sections on "Reflexivity": replaced "that is there is" with "i.e. there would be" and removed comma before "with" Reason: "there is" somewhat contradicted the "would be" hypothetical. A slightly redundant wording has now been chosen for better clarity. The comma seemed to be superfluous. --- library/core/src/convert/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs index bdd862f39c8..e2be262e311 100644 --- a/library/core/src/convert/mod.rs +++ b/library/core/src/convert/mod.rs @@ -172,8 +172,8 @@ pub const fn identity(x: T) -> T { /// /// # Reflexivity /// -/// Ideally, `AsRef` would be reflexive, that is there is an `impl AsRef for T`, with -/// [`as_ref`] simply returning its argument unchanged. +/// Ideally, `AsRef` would be reflexive, i.e. there would be an `impl AsRef for T` +/// with [`as_ref`] simply returning its argument unchanged. /// Such a blanket implementation is currently *not* provided due to technical restrictions of /// Rust's type system (it would be overlapping with another existing blanket implementation for /// `&T where T: AsRef` which allows `AsRef` to auto-dereference, see "Generic Implementations" @@ -283,8 +283,8 @@ pub trait AsRef { /// /// # Reflexivity /// -/// Ideally, `AsMut` would be reflexive, that is there is an `impl AsMut for T`, with -/// [`as_mut`] simply returning its argument unchanged. +/// Ideally, `AsMut` would be reflexive, i.e. there would be an `impl AsMut for T` +/// with [`as_mut`] simply returning its argument unchanged. /// Such a blanket implementation is currently *not* provided due to technical restrictions of /// Rust's type system (it would be overlapping with another existing blanket implementation for /// `&mut T where T: AsMut` which allows `AsMut` to auto-dereference, see "Generic