Skip to main content

Lint clippy::wildcard_imports

warning clippy::wildcard_imports §

usage of wildcard import

examples/../src/diagnostic/normalize.rs:2:5

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • update_lint_metadata (example)

Primary: examples/../src/diagnostic/normalize.rs:2:5

use super::model::*;

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

note: `-W clippy::wildcard-imports` implied by `-W clippy::pedantic`

help: to override `-W clippy::pedantic` add `#[allow(clippy::wildcard_imports)]`

help: try

Suggestion: try

Diff unavailable: Source path cannot be represented safely in a patch

/home/runner/work/clippy-html/clippy-html/examples/../src/diagnostic/normalize.rs:2:5 · MachineApplicable

super::model::{Span, SnippetLine, Suggestion, Note, Replacement, Finding, TargetInfo}
Rendered diagnostic (text)
warning: usage of wildcard import
 --> examples/../src/diagnostic/normalize.rs:2:5
  |
2 | use super::model::*;
  |     ^^^^^^^^^^^^^^^ help: try: `super::model::{Span, SnippetLine, Suggestion, Note, Replacement, Finding, TargetInfo}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports
  = note: `-W clippy::wildcard-imports` implied by `-W clippy::pedantic`
  = help: to override `-W clippy::pedantic` add `#[allow(clippy::wildcard_imports)]`

warning clippy::wildcard_imports §

usage of wildcard import

src/cargo.rs:5:9

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • cargo-clippy-html (bin)

Primary: src/cargo.rs:5:9

        model::*,

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

note: `-W clippy::wildcard-imports` implied by `-W clippy::pedantic`

help: to override `-W clippy::pedantic` add `#[allow(clippy::wildcard_imports)]`

help: try

Suggestion: try

MachineApplicable

--- "a/src/cargo.rs"
+++ "b/src/cargo.rs"
@@ -2,7 +2,7 @@
 use crate::{
     cli::{CargoContext, RunOptions},
     diagnostic::{
-        model::*,
+        model::{Execution, ProjectInfo, PackageInfo, TargetInfo},
         parse::{ParsedLine, parse_line},
     },
 };
Rendered diagnostic (text)
warning: usage of wildcard import
 --> src/cargo.rs:5:9
  |
5 |         model::*,
  |         ^^^^^^^^ help: try: `model::{Execution, ProjectInfo, PackageInfo, TargetInfo}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports
  = note: `-W clippy::wildcard-imports` implied by `-W clippy::pedantic`
  = help: to override `-W clippy::pedantic` add `#[allow(clippy::wildcard_imports)]`

warning clippy::wildcard_imports §

usage of wildcard import

src/diagnostic/normalize.rs:2:5

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • cargo-clippy-html (bin)

Primary: src/diagnostic/normalize.rs:2:5

use super::model::*;

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

help: try

Suggestion: try

MachineApplicable

--- "a/src/diagnostic/normalize.rs"
+++ "b/src/diagnostic/normalize.rs"
@@ -1,5 +1,5 @@
 //! Preserve diagnostic trees and multipart suggestions as units.
-use super::model::*;
+use super::model::{Span, SnippetLine, Suggestion, Note, Replacement, Finding, TargetInfo};
 use serde_json::Value;
 use std::path::Path;
 fn string(v: &Value, key: &str) -> String {
Rendered diagnostic (text)
warning: usage of wildcard import
 --> src/diagnostic/normalize.rs:2:5
  |
2 | use super::model::*;
  |     ^^^^^^^^^^^^^^^ help: try: `super::model::{Span, SnippetLine, Suggestion, Note, Replacement, Finding, TargetInfo}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

warning clippy::wildcard_imports §

usage of wildcard import

src/main.rs:9:5

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • cargo-clippy-html (bin)

Primary: src/main.rs:9:5

use diagnostic::model::*;

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

help: try

Suggestion: try

MachineApplicable

--- "a/src/main.rs"
+++ "b/src/main.rs"
@@ -6,7 +6,7 @@
 mod output;
 mod render;
 mod source;
-use diagnostic::model::*;
+use diagnostic::model::Report;
 fn run(opts: cli::RunOptions) -> Result<i32, String> {
     let cwd = std::env::current_dir().map_err(|e| e.to_string())?;
     let ctx = cli::cargo_context(
Rendered diagnostic (text)
warning: usage of wildcard import
 --> src/main.rs:9:5
  |
9 | use diagnostic::model::*;
  |     ^^^^^^^^^^^^^^^^^^^^ help: try: `diagnostic::model::Report`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

warning clippy::wildcard_imports §

usage of wildcard import

src/render/categories.rs:2:5

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • cargo-clippy-html (bin)

Primary: src/render/categories.rs:2:5

use super::*;

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

help: try

Suggestion: try

MachineApplicable

--- "a/src/render/categories.rs"
+++ "b/src/render/categories.rs"
@@ -1,5 +1,5 @@
 //! Category counts and pages reuse the report's existing page shell and tables.
-use super::*;
+use super::{Template, CountLink, Report, BTreeMap, Finding, PageMap, Path, relative_href, group_key, Link, write_page, Page, render, crate_context, crate_infos};
 
 pub(super) struct CategoryRow {
     pub name: String,
Rendered diagnostic (text)
warning: usage of wildcard import
 --> src/render/categories.rs:2:5
  |
2 | use super::*;
  |     ^^^^^^^^ help: try: `super::{Template, CountLink, Report, BTreeMap, Finding, PageMap, Path, relative_href, group_key, Link, write_page, Page, render, crate_context, crate_infos}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

warning clippy::wildcard_imports §

usage of wildcard import

src/render/pages.rs:6:13

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • cargo-clippy-html (bin)

Primary: src/render/pages.rs:6:13

use crate::{diagnostic::model::*, source::SourceFile};

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

help: try

Suggestion: try

MachineApplicable

--- "a/src/render/pages.rs"
+++ "b/src/render/pages.rs"
@@ -3,7 +3,7 @@
 use super::paths::PageMap;
 use super::paths::{group_key, relative_href};
 use crate::source::{all_spans, span_matches};
-use crate::{diagnostic::model::*, source::SourceFile};
+use crate::{diagnostic::model::{Report, Finding, CategoryMetadata, Note, Span, TargetInfo, PackageInfo}, source::SourceFile};
 use askama::Template;
 use std::{
     collections::BTreeMap,
Rendered diagnostic (text)
warning: usage of wildcard import
 --> src/render/pages.rs:6:13
  |
6 | use crate::{diagnostic::model::*, source::SourceFile};
  |             ^^^^^^^^^^^^^^^^^^^^ help: try: `diagnostic::model::{Report, Finding, CategoryMetadata, Note, Span, TargetInfo, PackageInfo}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

warning clippy::wildcard_imports §

usage of wildcard import

src/render/search.rs:3:13

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • cargo-clippy-html (bin)

Primary: src/render/search.rs:3:13

use crate::{diagnostic::model::*, source::SourceFile};

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

help: try

Suggestion: try

MachineApplicable

--- "a/src/render/search.rs"
+++ "b/src/render/search.rs"
@@ -1,6 +1,6 @@
 //! Build a report-local classic-script index from existing pages and diagnostics.
 use super::paths::{PageMap, category_key, group_key, relative_href};
-use crate::{diagnostic::model::*, source::SourceFile};
+use crate::{diagnostic::model::{Note, Report}, source::SourceFile};
 use serde::{Deserialize, Serialize};
 use std::{
     collections::BTreeMap,
Rendered diagnostic (text)
warning: usage of wildcard import
 --> src/render/search.rs:3:13
  |
3 | use crate::{diagnostic::model::*, source::SourceFile};
  |             ^^^^^^^^^^^^^^^^^^^^ help: try: `diagnostic::model::{Note, Report}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

warning clippy::wildcard_imports §

usage of wildcard import

src/source.rs:2:5

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • cargo-clippy-html (bin)

Primary: src/source.rs:2:5

use crate::diagnostic::model::*;

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports

help: try

Suggestion: try

MachineApplicable

--- "a/src/source.rs"
+++ "b/src/source.rs"
@@ -1,5 +1,5 @@
 //! Load only workspace-owned source files and validate diagnostic coordinates.
-use crate::diagnostic::model::*;
+use crate::diagnostic::model::{Finding, Span, Note, ProjectInfo};
 use std::{collections::BTreeMap, path::PathBuf};
 #[derive(Debug)]
 pub struct SourceFile {
Rendered diagnostic (text)
warning: usage of wildcard import
 --> src/source.rs:2:5
  |
2 | use crate::diagnostic::model::*;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `crate::diagnostic::model::{Finding, Span, Note, ProjectInfo}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#wildcard_imports