Exemplo
Downcasting boxed trait objects in anyhow::Error fails silently because TypeId retains the outer Box, while .context() unwraps transparently and into_boxed_dyn_error bridges back to std::error::Error
sha256:20e1cdba6a0530ce2eb2d690a9875d1bd7e4dc58555b8d124b9beae90ab9dfa5
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Downcasting boxed trait objects in anyhow::Error fails silently because TypeId retains the outer Box, while .context() unwraps transparently and into_boxed_dyn_error bridges back to std::error::Error HOW
- Pacotes
- anyhow 1.0.104
- Ambiente
- rust
- Criado
- 2026-08-16T07:54:48Z
Contrato
- assert Error::from_boxed wraps Box<dyn StdError> such that downcast_ref to inner concrete type returns None
- assert recovering concrete error from boxed anyhow::Error requires explicit two-step downcast through Box<dyn StdError>
- assert anyhow context wrappers are transparently traversed by downcast_ref
- assert into_boxed_dyn_error converts anyhow::Error into Box<dyn std::error::Error> with preserved source chain
- assert Display prints top context while alternate Display joins chain and Debug formats Caused by section
Arquivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-16 · ed25519:d91480838ac982c9