Skip to content

Conversation

@woodruffw
Copy link
Contributor

Just a small thing, noticed while trying to use the Error trait through a re-export here.

@woodruffw
Copy link
Contributor Author

Without this, x509-cert/std doesn't re-export const-oid/std's gated Error implementation:

   Compiling ctltool v0.1.0 (/Users/william/devel/windows-ctl/ctltool)
error[E0277]: the trait bound `x509_cert::der::const_oid::Error: std::error::Error` is not satisfied
   --> ctltool/src/main.rs:107:44
    |
107 |         .collect::<Result<HashSet<_>, _>>()?;
    |                                            ^ the trait `std::error::Error` is not implemented for `x509_cert::der::const_oid::Error`
    |
    = help: the following other types implement trait `FromResidual<R>`:
              <Result<T, F> as FromResidual<Result<Infallible, E>>>
              <Result<T, F> as FromResidual<Yeet<E>>>
    = note: required for `anyhow::Error` to implement `From<x509_cert::der::const_oid::Error>`
    = note: required for `Result<(), anyhow::Error>` to implement `FromResidual<Result<Infallible, x509_cert::der::const_oid::Error>>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `ctltool` due to previous error

@tarcieri
Copy link
Member

Thanks!

@tarcieri tarcieri merged commit b20d644 into RustCrypto:master Feb 15, 2023
@woodruffw woodruffw deleted the ww/x509-std-implies-const-oid-std branch February 16, 2023 20:19
@tarcieri tarcieri mentioned this pull request Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants