Skip to content

Resolve prelude redundant import warnings in nightly#311

Merged
TedDriggs merged 1 commit intocolin-kiegel:masterfrom
dtolnay-contrib:import
Feb 21, 2024
Merged

Resolve prelude redundant import warnings in nightly#311
TedDriggs merged 1 commit intocolin-kiegel:masterfrom
dtolnay-contrib:import

Conversation

@dtolnay
Copy link
Copy Markdown
Contributor

@dtolnay dtolnay commented Feb 20, 2024

New warnings in nightly since rust-lang/rust#117772. With deny(warnings), this is causing CI to fail.

error: the item `syn` is imported redundantly
  --> derive_builder_core/src/block.rs:5:11
   |
5  | use syn::{self, spanned::Spanned, Block, LitStr};
   |           ^^^^
   |
  ::: derive_builder_core/src/lib.rs:27:1
   |
27 | extern crate syn;
   | ----------------- the item `syn` is already imported here
   |
note: the lint level is defined here
  --> derive_builder_core/src/lib.rs:18:9
   |
18 | #![deny(warnings, missing_docs)]
   |         ^^^^^^^^
   = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`

error: the item `syn` is imported redundantly
  --> derive_builder_core/src/builder.rs:6:11
   |
6  | use syn::{self, Path, TraitBound, TraitBoundModifier, TypeParamBound};
   |           ^^^^
   |
  ::: derive_builder_core/src/lib.rs:27:1
   |
27 | extern crate syn;
   | ----------------- the item `syn` is already imported here

error: the item `darling` is imported redundantly
  --> derive_builder_core/src/macro_options/darling_opts.rs:6:15
   |
6  | use darling::{self, Error, FromMeta};
   |               ^^^^
   |
  ::: derive_builder_core/src/lib.rs:22:1
   |
22 | extern crate darling;
   | --------------------- the item `darling` is already imported here

error: the item `syn` is imported redundantly
  --> derive_builder_core/src/macro_options/darling_opts.rs:9:11
   |
9  | use syn::{self, spanned::Spanned, Attribute, Generics, Ident, Path};
   |           ^^^^
   |
  ::: derive_builder_core/src/lib.rs:27:1
   |
27 | extern crate syn;
   | ----------------- the item `syn` is already imported here

    error: the item `syn` is imported redundantly
      --> derive_builder_core/src/block.rs:5:11
       |
    5  | use syn::{self, spanned::Spanned, Block, LitStr};
       |           ^^^^
       |
      ::: derive_builder_core/src/lib.rs:27:1
       |
    27 | extern crate syn;
       | ----------------- the item `syn` is already imported here
       |
    note: the lint level is defined here
      --> derive_builder_core/src/lib.rs:18:9
       |
    18 | #![deny(warnings, missing_docs)]
       |         ^^^^^^^^
       = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`

    error: the item `syn` is imported redundantly
      --> derive_builder_core/src/builder.rs:6:11
       |
    6  | use syn::{self, Path, TraitBound, TraitBoundModifier, TypeParamBound};
       |           ^^^^
       |
      ::: derive_builder_core/src/lib.rs:27:1
       |
    27 | extern crate syn;
       | ----------------- the item `syn` is already imported here

    error: the item `darling` is imported redundantly
      --> derive_builder_core/src/macro_options/darling_opts.rs:6:15
       |
    6  | use darling::{self, Error, FromMeta};
       |               ^^^^
       |
      ::: derive_builder_core/src/lib.rs:22:1
       |
    22 | extern crate darling;
       | --------------------- the item `darling` is already imported here

    error: the item `syn` is imported redundantly
      --> derive_builder_core/src/macro_options/darling_opts.rs:9:11
       |
    9  | use syn::{self, spanned::Spanned, Attribute, Generics, Ident, Path};
       |           ^^^^
       |
      ::: derive_builder_core/src/lib.rs:27:1
       |
    27 | extern crate syn;
       | ----------------- the item `syn` is already imported here
@TedDriggs TedDriggs merged commit 233c3d8 into colin-kiegel:master Feb 21, 2024
@dtolnay dtolnay deleted the import branch February 21, 2024 19:38
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