Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions library/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ pub trait Error: Debug + Display {
///
/// ```rust
/// #![feature(error_generic_member_access)]
/// #![feature(error_in_core)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to change the import to std::error::{...}? If we don't do that then stabilization of the error_generic_member_access feature would be unnecessarily dependent on error_in_core, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a preference, I assumed these tests were importing core::error for a reason.

If we don't do that then stabilization of the error_generic_member_access feature would be unnecessarily dependent on error_in_core, right?

No, the functions can still be stabilized independently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are already a mix of core/std, having impl std::error::Error below, but oh well...

/// use core::fmt;
/// use core::error::{request_ref, Request};
///
Expand Down Expand Up @@ -360,6 +361,7 @@ impl dyn Error {
///
/// ```rust
/// # #![feature(error_generic_member_access)]
/// # #![feature(error_in_core)]
/// use std::error::Error;
/// use core::error::request_value;
///
Expand All @@ -383,6 +385,7 @@ where
///
/// ```rust
/// # #![feature(error_generic_member_access)]
/// # #![feature(error_in_core)]
/// use core::error::Error;
/// use core::error::request_ref;
///
Expand Down Expand Up @@ -454,6 +457,7 @@ where
///
/// ```
/// #![feature(error_generic_member_access)]
/// #![feature(error_in_core)]
/// use core::fmt;
/// use core::error::Request;
/// use core::error::request_ref;
Expand Down Expand Up @@ -524,6 +528,7 @@ impl<'a> Request<'a> {
///
/// ```rust
/// #![feature(error_generic_member_access)]
/// #![feature(error_in_core)]
///
/// use core::error::Request;
///
Expand Down Expand Up @@ -558,6 +563,7 @@ impl<'a> Request<'a> {
///
/// ```rust
/// #![feature(error_generic_member_access)]
/// #![feature(error_in_core)]
///
/// use core::error::Request;
///
Expand Down Expand Up @@ -593,6 +599,7 @@ impl<'a> Request<'a> {
///
/// ```rust
/// #![feature(error_generic_member_access)]
/// #![feature(error_in_core)]
///
/// use core::error::Request;
///
Expand Down Expand Up @@ -625,6 +632,7 @@ impl<'a> Request<'a> {
///
/// ```rust
/// #![feature(error_generic_member_access)]
/// #![feature(error_in_core)]
///
/// use core::error::Request;
///
Expand Down Expand Up @@ -691,6 +699,7 @@ impl<'a> Request<'a> {
///
/// ```rust
/// #![feature(error_generic_member_access)]
/// #![feature(error_in_core)]
///
/// use core::error::Request;
/// use core::error::request_value;
Expand Down Expand Up @@ -778,6 +787,7 @@ impl<'a> Request<'a> {
///
/// ```rust
/// #![feature(error_generic_member_access)]
/// #![feature(error_in_core)]
///
/// use core::error::Request;
/// use core::error::request_ref;
Expand Down