From 655d6e82e3f89e1c26c4519134013f335d8880eb Mon Sep 17 00:00:00 2001 From: Jane Losare-Lusby Date: Mon, 11 Jul 2022 19:18:56 +0000 Subject: [PATCH] apply suggestions from code review --- library/std/src/error.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/library/std/src/error.rs b/library/std/src/error.rs index 6ad04e3f922..57f16f9517f 100644 --- a/library/std/src/error.rs +++ b/library/std/src/error.rs @@ -365,7 +365,8 @@ pub trait Error: Debug + Display { /// } /// ``` #[unstable(feature = "error_generic_member_access", issue = "none")] - fn provide<'a>(&'a self, _req: &mut Demand<'a>) {} + #[allow(unused_variables)] + fn provide<'a>(&'a self, req: &mut Demand<'a>) {} } #[unstable(feature = "error_generic_member_access", issue = "none")] @@ -910,13 +911,13 @@ impl dyn Error + 'static { } } - /// Request a reference to context of type `T`. + /// Request a reference of type `T` as context about this error. #[unstable(feature = "error_generic_member_access", issue = "none")] pub fn request_ref(&self) -> Option<&T> { core::any::request_ref(self) } - /// Request a value to context of type `T`. + /// Request a value of type `T` as context about this error. #[unstable(feature = "error_generic_member_access", issue = "none")] pub fn request_value(&self) -> Option { core::any::request_value(self) @@ -945,13 +946,13 @@ impl dyn Error + 'static + Send { ::downcast_mut::(self) } - /// Request a reference to context of type `T`. + /// Request a reference of type `T` as context about this error. #[unstable(feature = "error_generic_member_access", issue = "none")] pub fn request_ref(&self) -> Option<&T> { ::request_ref(self) } - /// Request a value to context of type `T`. + /// Request a value of type `T` as context about this error. #[unstable(feature = "error_generic_member_access", issue = "none")] pub fn request_value(&self) -> Option { ::request_value(self) @@ -980,13 +981,13 @@ impl dyn Error + 'static + Send + Sync { ::downcast_mut::(self) } - /// Request a reference to context of type `T`. + /// Request a reference of type `T` as context about this error. #[unstable(feature = "error_generic_member_access", issue = "none")] pub fn request_ref(&self) -> Option<&T> { ::request_ref(self) } - /// Request a value to context of type `T`. + /// Request a value of type `T` as context about this error. #[unstable(feature = "error_generic_member_access", issue = "none")] pub fn request_value(&self) -> Option { ::request_value(self)