Commit Graph

7 Commits

Author SHA1 Message Date
Conrado Gouvea 6a4a8182d2 support no_std by simply not deriving the Error trait 2024-01-10 17:40:49 -03:00
David Tolnay dd9206cfd0
Remove clippy deny attributes from test suite
These were superseded by the clippy invocation made in our CI workflow:

    run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
2022-04-24 15:22:58 -07:00
David Tolnay e96e0d57d7
Revert "Ignore buggy nonstandard_macro_braces clippy lint"
This reverts commit 4bbe3ece51.
2021-09-04 12:41:36 -07:00
David Tolnay 4bbe3ece51
Ignore buggy nonstandard_macro_braces clippy lint
Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422

    error: use of irregular braces for `write!` macro
     --> tests/test_backtrace.rs:5:10
      |
    5 | #[derive(Error, Debug)]
      |          ^^^^^
      |
      = note: `-D clippy::nonstandard-macro-braces` implied by `-D clippy::all`
    help: consider writing `Error`
     --> tests/test_backtrace.rs:5:10
      |
    5 | #[derive(Error, Debug)]
      |          ^^^^^
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
      = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_lints.rs:13:21
       |
    13 |     #[derive(Debug, Error)]
       |                     ^^^^^
       |
       = note: `-D clippy::nonstandard-macro-braces` implied by `-D clippy::all`
    help: consider writing `Error`
      --> tests/test_lints.rs:13:21
       |
    13 |     #[derive(Debug, Error)]
       |                     ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
     --> tests/test_source.rs:7:10
      |
    7 | #[derive(Error, Debug)]
      |          ^^^^^
      |
    note: the lint level is defined here
     --> tests/test_source.rs:1:9
      |
    1 | #![deny(clippy::all, clippy::pedantic)]
      |         ^^^^^^^^^^^
      = note: `#[deny(clippy::nonstandard_macro_braces)]` implied by `#[deny(clippy::all)]`
    help: consider writing `Error`
     --> tests/test_source.rs:7:10
      |
    7 | #[derive(Error, Debug)]
      |          ^^^^^
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
      = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_source.rs:13:10
       |
    13 | #[derive(Error, Debug)]
       |          ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_source.rs:13:10
       |
    13 | #[derive(Error, Debug)]
       |          ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_source.rs:21:10
       |
    21 | #[derive(Error, Debug)]
       |          ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_source.rs:21:10
       |
    21 | #[derive(Error, Debug)]
       |          ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_source.rs:54:18
       |
    54 |           #[derive(Error)]
       |                    ^^^^^
    ...
    64 | / error_from_macro! {
    65 | |     #[error("Something")]
    66 | |     Variant(#[from] io::Error)
    67 | | }
       | |_- in this macro invocation
       |
    help: consider writing `Error`
      --> tests/test_source.rs:54:18
       |
    54 |           #[derive(Error)]
       |                    ^^^^^
    ...
    64 | / error_from_macro! {
    65 | |     #[error("Something")]
    66 | |     Variant(#[from] io::Error)
    67 | | }
       | |_- in this macro invocation
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
     --> tests/test_expr.rs:9:10
      |
    9 | #[derive(Error, Debug)]
      |          ^^^^^
      |
    note: the lint level is defined here
     --> tests/test_expr.rs:1:9
      |
    1 | #![deny(clippy::all, clippy::pedantic)]
      |         ^^^^^^^^^^^
      = note: `#[deny(clippy::nonstandard_macro_braces)]` implied by `#[deny(clippy::all)]`
    help: consider writing `Error`
     --> tests/test_expr.rs:9:10
      |
    9 | #[derive(Error, Debug)]
      |          ^^^^^
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
      = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_expr.rs:39:10
       |
    39 | #[derive(Error, Debug)]
       |          ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_expr.rs:39:10
       |
    39 | #[derive(Error, Debug)]
       |          ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
     --> tests/test_from.rs:6:10
      |
    6 | #[derive(Error, Debug)]
      |          ^^^^^
      |
    note: the lint level is defined here
     --> tests/test_from.rs:1:9
      |
    1 | #![deny(clippy::all, clippy::pedantic)]
      |         ^^^^^^^^^^^
      = note: `#[deny(clippy::nonstandard_macro_braces)]` implied by `#[deny(clippy::all)]`
    help: consider writing `Error`
     --> tests/test_from.rs:6:10
      |
    6 | #[derive(Error, Debug)]
      |          ^^^^^
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
      = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_from.rs:13:10
       |
    13 | #[derive(Error, Debug)]
       |          ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_from.rs:13:10
       |
    13 | #[derive(Error, Debug)]
       |          ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
     --> tests/test_path.rs:8:10
      |
    8 | #[derive(Error, Debug)]
      |          ^^^^^
      |
    note: the lint level is defined here
     --> tests/test_path.rs:1:9
      |
    1 | #![deny(clippy::all, clippy::pedantic)]
      |         ^^^^^^^^^^^
      = note: `#[deny(clippy::nonstandard_macro_braces)]` implied by `#[deny(clippy::all)]`
    help: consider writing `Error`
     --> tests/test_path.rs:8:10
      |
    8 | #[derive(Error, Debug)]
      |          ^^^^^
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
      = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_path.rs:14:10
       |
    14 | #[derive(Error, Debug, RefCast)]
       |          ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_path.rs:14:10
       |
    14 | #[derive(Error, Debug, RefCast)]
       |          ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_from.rs:17:10
       |
    17 | #[derive(Error, Debug)]
       |          ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_from.rs:17:10
       |
    17 | #[derive(Error, Debug)]
       |          ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_path.rs:21:10
       |
    21 | #[derive(Error, Debug)]
       |          ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_path.rs:21:10
       |
    21 | #[derive(Error, Debug)]
       |          ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_transparent.rs:14:14
       |
    14 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    note: the lint level is defined here
      --> tests/test_transparent.rs:1:9
       |
    1  | #![deny(clippy::all, clippy::pedantic)]
       |         ^^^^^^^^^^^
       = note: `#[deny(clippy::nonstandard_macro_braces)]` implied by `#[deny(clippy::all)]`
    help: consider writing `Error`
      --> tests/test_transparent.rs:14:14
       |
    14 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_from.rs:26:10
       |
    26 | #[derive(Error, Debug)]
       |          ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_from.rs:26:10
       |
    26 | #[derive(Error, Debug)]
       |          ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_transparent.rs:34:14
       |
    34 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_transparent.rs:34:14
       |
    34 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_transparent.rs:69:14
       |
    69 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_transparent.rs:69:14
       |
    69 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_display.rs:12:14
       |
    12 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    note: the lint level is defined here
      --> tests/test_display.rs:1:9
       |
    1  | #![deny(clippy::all, clippy::pedantic)]
       |         ^^^^^^^^^^^
       = note: `#[deny(clippy::nonstandard_macro_braces)]` implied by `#[deny(clippy::all)]`
    help: consider writing `Error`
      --> tests/test_display.rs:12:14
       |
    12 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_display.rs:24:14
       |
    24 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_display.rs:24:14
       |
    24 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_display.rs:35:14
       |
    35 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_display.rs:35:14
       |
    35 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_display.rs:44:14
       |
    44 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_display.rs:44:14
       |
    44 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_display.rs:53:14
       |
    53 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_display.rs:53:14
       |
    53 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_display.rs:70:14
       |
    70 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_display.rs:70:14
       |
    70 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_display.rs:84:14
       |
    84 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_display.rs:84:14
       |
    84 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
      --> tests/test_display.rs:98:14
       |
    98 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    help: consider writing `Error`
      --> tests/test_display.rs:98:14
       |
    98 |     #[derive(Error, Debug)]
       |              ^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:107:14
        |
    107 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:107:14
        |
    107 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:115:14
        |
    115 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:115:14
        |
    115 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:129:14
        |
    129 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:129:14
        |
    129 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:158:14
        |
    158 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:158:14
        |
    158 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:170:14
        |
    170 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:170:14
        |
    170 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:184:14
        |
    184 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:184:14
        |
    184 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:201:14
        |
    201 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:201:14
        |
    201 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:214:29
        |
    214 |             #[derive(Debug, Error)]
        |                             ^^^^^
    ...
    228 |     decl_error!(Repro(u8));
        |     ----------------------- in this macro invocation
        |
    help: consider writing `Error`
       --> tests/test_display.rs:214:29
        |
    214 |             #[derive(Debug, Error)]
        |                             ^^^^^
    ...
    228 |     decl_error!(Repro(u8));
        |     ----------------------- in this macro invocation
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:220:29
        |
    220 |             #[derive(Debug, Error)]
        |                             ^^^^^
    ...
    228 |     decl_error!(Repro(u8));
        |     ----------------------- in this macro invocation
        |
    help: consider writing `Error`
       --> tests/test_display.rs:220:29
        |
    220 |             #[derive(Debug, Error)]
        |                             ^^^^^
    ...
    228 |     decl_error!(Repro(u8));
        |     ----------------------- in this macro invocation
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:236:14
        |
    236 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:236:14
        |
    236 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:247:14
        |
    247 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:247:14
        |
    247 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:258:14
        |
    258 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:258:14
        |
    258 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: use of irregular braces for `write!` macro
       --> tests/test_display.rs:269:14
        |
    269 |     #[derive(Error, Debug)]
        |              ^^^^^
        |
    help: consider writing `Error`
       --> tests/test_display.rs:269:14
        |
    269 |     #[derive(Error, Debug)]
        |              ^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
        = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)
2021-07-02 21:05:58 -07:00
David Tolnay 51a1ff6593
Add regression test for issue 113
This does not currently compile.

    error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
      --> tests/test_transparent.rs:63:14
       |
    63 |     #[derive(Error, Debug)]
       |              ^^^^^
       |
    note: first, the lifetime cannot outlive the lifetime `'a` as defined on the impl at 65:18...
      --> tests/test_transparent.rs:65:18
       |
    65 |     struct Error<'a> {
       |                  ^^
    note: ...so that the types are compatible
      --> tests/test_transparent.rs:63:14
       |
    63 |     #[derive(Error, Debug)]
       |              ^^^^^
       = note: expected `&test_non_static::ErrorKind<'_>`
                  found `&test_non_static::ErrorKind<'a>`
       = note: but, the lifetime must be valid for the static lifetime...
    note: ...so that the type `test_non_static::ErrorKind<'_>` will meet its required lifetime bounds
      --> tests/test_transparent.rs:63:14
       |
    63 |     #[derive(Error, Debug)]
       |              ^^^^^
       = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)
2021-05-22 14:28:48 -07:00
David Tolnay 21b5dabc25
Try to catch clippy::pedantic violations in generated code 2020-05-21 18:41:13 -07:00
David Tolnay ac61f40e37
Test transparent attribute 2019-11-30 22:00:48 -08:00