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

Resolve prelude redundant import warnings in nightly #311

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

dtolnay
Copy link
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
15 checks passed
@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.

None yet

2 participants