Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add diagnostic::on_unimplemented attribute on rust >=1.78 #437

Merged
merged 1 commit into from
May 14, 2024

Commits on May 2, 2024

  1. Add diagnostic::on_unimplemented attribute on rust >=1.78

    * Add the following diagnostics to hopefully lead people in the right direction
      when seeing trait problems related to ctxs and derives
    
    error[E0277]: the trait bound `FieldF: deku::DekuReader<'_, _>` is not satisfied
      --> examples/example.rs:37:14
       |
    37 |     field_f: FieldF,
       |              ^^^^^^ the trait `deku::DekuReader<'_, _>` is not implemented for `FieldF`
       |
       = note: implement by adding #[derive(DekuRead)] to `FieldF`
       = note: make sure the `ctx` sent into the function matches `FieldF`'s `ctx`
       = help: the following other types implement trait `deku::DekuReader<'a, Ctx>`:
                 <() as deku::DekuReader<'_, Ctx>>
                 <(A, B) as deku::DekuReader<'a, Ctx>>
                 <(A, B, C) as deku::DekuReader<'a, Ctx>>
                 <(A, B, C, D) as deku::DekuReader<'a, Ctx>>
                 <(A, B, C, D, E) as deku::DekuReader<'a, Ctx>>
                 <(A, B, C, D, E, F) as deku::DekuReader<'a, Ctx>>
                 <(A, B, C, D, E, F, G) as deku::DekuReader<'a, Ctx>>
                 <(A, B, C, D, E, F, G, H) as deku::DekuReader<'a, Ctx>>
               and 152 others
    
    * Rust Release: https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html
    * Rust MR: rust-lang/rust#119888
    wcampbell0x2a committed May 2, 2024
    Configuration menu
    Copy the full SHA
    fe5536b View commit details
    Browse the repository at this point in the history