1
Fork 0

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:
Simon Sapin 2019-02-01 11:29:02 +01:00
parent 741a3d42cb
commit cc1e05f0ca

View file

@ -197,9 +197,7 @@ pub trait Error: Debug + Display {
/// Get the `TypeId` of `self`
#[doc(hidden)]
#[unstable(feature = "error_type_id",
reason = "unclear whether to commit to this public implementation detail",
issue = "27745")]
#[stable(feature = "error_type_id", since = "1.34.0")]
fn type_id(&self) -> TypeId where Self: 'static {
TypeId::of::<Self>()
}