[Bug] Different behavior when hooking the Context
on stable vs. nightly
#1092
Labels
area/libs > error-stack
Affects the `error-stack` crate (library)
category/bug
Something isn't working
Describe the bug
On stable,
downcast_ref
is used for the hooks, on nightlyrequest_ref
andrequest_value
is used. For attachments, this is the same as attachments only provide themself, but for contexts do not provide themself. When installing a hook for e.g.io::Error
and useio::Error
as context, the output is different:stable:
nightly:
To reproduce
Expected behavior
The output should be the same and stable and on nightly.
Rust compiler
1.63 and 1.65.0-nightly (2022-08-26)
Host
aarch64-apple-darwin
Target
aarch64-apple-darwin
Version
cf5d85e
Features
all
Additional context
As a
Context
does not provide itself, the same behavior should be emulated on stable as well. As provisioning is not supported on stable, aContext
frame can simply be ignored.The other solution would be to provide the context frame as well.
The text was updated successfully, but these errors were encountered: