Skip to content

Commit

Permalink
Work around new dead code warning in test
Browse files Browse the repository at this point in the history
    warning: struct `StructTransparentGeneric` is never constructed
       --> tests/test_generics.rs:161:12
        |
    161 | pub struct StructTransparentGeneric<E>(E);
        |            ^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: `#[warn(dead_code)]` on by default
  • Loading branch information
dtolnay committed Jul 31, 2024
1 parent 915c75e commit 00b3c14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ pub struct StructFromGeneric<E> {
//
#[derive(Error, Debug)]
#[error(transparent)]
pub struct StructTransparentGeneric<E>(E);
pub struct StructTransparentGeneric<E>(pub E);

0 comments on commit 00b3c14

Please sign in to comment.