impl<T: Error> Error for Box<T>
does not delegate its provide
method implementation
#117432
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen:
<Box<MyError> as std::error::Error>::provide
should delegate its implementation to<MyError as std::error::Error>::provide
, just like whatimpl<'a, T: Error> Error for &'a T
does.Instead, this happened:
It does not and uses the default trait implementation instead.
rust/library/alloc/src/boxed.rs
Lines 2432 to 2447 in 650991d
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: