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

Work around new dead_code warnings #1303

Merged
merged 1 commit into from
Jan 6, 2024
Merged

Work around new dead_code warnings #1303

merged 1 commit into from
Jan 6, 2024

Commits on Jan 6, 2024

  1. Work around new dead_code warnings

        warning: field `0` is never read
          --> macro/src/syntax/mod.rs:52:13
           |
        52 |     Include(Include),
           |     ------- ^^^^^^^
           |     |
           |     field in this variant
           |
           = note: `#[warn(dead_code)]` on by default
        help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
           |
        52 |     Include(()),
           |             ~~
    
        warning: fields `0` and `1` are never read
         --> macro/src/syntax/cfg.rs:9:8
          |
        9 |     Eq(Ident, Option<LitStr>),
          |     -- ^^^^^  ^^^^^^^^^^^^^^
          |     |
          |     fields in this variant
          |
        help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields
          |
        9 |     Eq((), ()),
          |        ~~  ~~
    
        warning: field `0` is never read
          --> macro/src/syntax/cfg.rs:11:9
           |
        11 |     Any(Vec<CfgExpr>),
           |     --- ^^^^^^^^^^^^
           |     |
           |     field in this variant
           |
        help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
           |
        11 |     Any(()),
           |         ~~
    
        warning: field `0` is never read
          --> macro/src/syntax/cfg.rs:12:9
           |
        12 |     Not(Box<CfgExpr>),
           |     --- ^^^^^^^^^^^^
           |     |
           |     field in this variant
           |
        help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
           |
        12 |     Not(()),
           |         ~~
    
        warning: field `0` is never read
           --> src/lib.rs:551:13
            |
        551 | struct void(core::ffi::c_void);
            |        ---- ^^^^^^^^^^^^^^^^^
            |        |
            |        field in this struct
            |
            = note: `#[warn(dead_code)]` on by default
        help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
            |
        551 | struct void(());
            |             ~~
    
        warning: field `0` is never read
           --> tests/ffi/lib.rs:411:26
            |
        411 | pub struct Reference<'a>(&'a String);
            |            ---------     ^^^^^^^^^^
            |            |
            |            field in this struct
            |
            = note: `#[warn(dead_code)]` on by default
        help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
            |
        411 | pub struct Reference<'a>(());
            |                          ~~
    dtolnay committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    92f405d View commit details
    Browse the repository at this point in the history