Stabilize std::error::Error::type_id
This should have been part of https://github.com/rust-lang/rust/pull/57834 FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
This commit is contained in:
@@ -197,9 +197,7 @@ pub trait Error: Debug + Display {
|
|||||||
|
|
||||||
/// Get the `TypeId` of `self`
|
/// Get the `TypeId` of `self`
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[unstable(feature = "error_type_id",
|
#[stable(feature = "error_type_id", since = "1.34.0")]
|
||||||
reason = "unclear whether to commit to this public implementation detail",
|
|
||||||
issue = "27745")]
|
|
||||||
fn type_id(&self) -> TypeId where Self: 'static {
|
fn type_id(&self) -> TypeId where Self: 'static {
|
||||||
TypeId::of::<Self>()
|
TypeId::of::<Self>()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user