style library/core/src/error.rs

This commit is contained in:
Xiaobo Liu 2024-03-02 16:03:23 +08:00 committed by GitHub
parent 4cdd20584c
commit 624f9d3c78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,6 +183,7 @@ fn cause(&self) -> Option<&dyn Error> {
#[allow(unused_variables)]
fn provide<'a>(&'a self, request: &mut Request<'a>) {}
}
mod private {
// This is a hack to prevent `type_id` from being overridden by `Error`
// implementations, since that can enable unsound downcasting.