Closed
Description
(This was merged a while ago without a tracking issue, so I'm creating this one here now.)
Feature gate: #![feature(error_in_core)]
This is a tracking issue for moving the Error
trait to the core
library.
Public API
// core::error
pub trait Error: Debug + Display {
/* same API as std::error::Error */
}
// unstable in core, stable in std
impl dyn Error + 'static [+ Send [+ Sync]] {
pub fn is<T: Error + 'static>(&self) -> bool;
pub fn downcast_ref<T: Error + 'static>(&self) -> Option<&T>;
pub fn downcast_mut<T: Error + 'static>(&mut self) -> Option<&mut T>;
}
// unstable in alloc, stable in std
impl dyn Error [+ Send [+ Sync]] {
pub fn downcast<T: Error + 'static>(self: Box<Self>) -> Result<Box<T>, Box<Self>>;
}
Steps / History
- Implementation (first attempt, closed): Move the Error trait into core (without
fn backtrace
) #90328 - Implementation (merged): Move Error trait into core #99917
- Stabilize the Provider API: Tracking Issue for Provider API #96024
- Stabilize
error_generic_member_access
: Tracking Issue forerror_generic_member_access
#99301 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
Footnotes
Metadata
Metadata
Assignees
Labels
Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCRelevant to the library API team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.