diff --git a/detectors/Cargo.toml b/detectors/Cargo.toml index a03df777..de320451 100644 --- a/detectors/Cargo.toml +++ b/detectors/Cargo.toml @@ -5,6 +5,7 @@ resolver = "2" [workspace.dependencies] clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "51a1cf0" } +clippy_wrappers = { package = "scout-audit-clippy-wrappers", git = "https://github.com/CoinFabrik/scout-audit/", rev = "c41db6ac6752c97b1516d6950ba4d0a9b995d594" } common = { path = "common" } dylint_linting = { package = "scout-audit-dylint-linting", git = "https://github.com/CoinFabrik/scout-audit/", rev = "6d6819a" } if_chain = "=1.0.2" diff --git a/detectors/assert-violation/Cargo.toml b/detectors/assert-violation/Cargo.toml index 0173192c..645b7f8b 100644 --- a/detectors/assert-violation/Cargo.toml +++ b/detectors/assert-violation/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/assert-violation/src/lib.rs b/detectors/assert-violation/src/lib.rs index 3b23908d..9140efe8 100644 --- a/detectors/assert-violation/src/lib.rs +++ b/detectors/assert-violation/src/lib.rs @@ -3,7 +3,8 @@ extern crate rustc_ast; extern crate rustc_span; -use clippy_utils::{diagnostics::span_lint_and_help, sym}; +use clippy_utils::sym; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_ast::{ ptr::P, diff --git a/detectors/avoid-core-mem-forget/Cargo.toml b/detectors/avoid-core-mem-forget/Cargo.toml index f6b72c80..5577d078 100644 --- a/detectors/avoid-core-mem-forget/Cargo.toml +++ b/detectors/avoid-core-mem-forget/Cargo.toml @@ -9,6 +9,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } dylint_linting = { workspace = true } +clippy_wrappers = { workspace = true } if_chain = { workspace = true } [package.metadata.rust-analyzer] diff --git a/detectors/avoid-core-mem-forget/src/lib.rs b/detectors/avoid-core-mem-forget/src/lib.rs index bc222d3c..ff4a4a74 100644 --- a/detectors/avoid-core-mem-forget/src/lib.rs +++ b/detectors/avoid-core-mem-forget/src/lib.rs @@ -3,7 +3,7 @@ extern crate rustc_ast; extern crate rustc_span; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_ast::{Expr, ExprKind, Item, NodeId}; use rustc_lint::{EarlyContext, EarlyLintPass}; diff --git a/detectors/avoid-panic-error/Cargo.toml b/detectors/avoid-panic-error/Cargo.toml index 13fe1003..80b1e77a 100644 --- a/detectors/avoid-panic-error/Cargo.toml +++ b/detectors/avoid-panic-error/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/avoid-panic-error/src/lib.rs b/detectors/avoid-panic-error/src/lib.rs index a35c8181..58f09097 100644 --- a/detectors/avoid-panic-error/src/lib.rs +++ b/detectors/avoid-panic-error/src/lib.rs @@ -3,7 +3,8 @@ extern crate rustc_ast; extern crate rustc_span; -use clippy_utils::{diagnostics::span_lint_and_help, sym}; +use clippy_utils::sym; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_ast::{ ptr::P, diff --git a/detectors/avoid-unsafe-block/Cargo.toml b/detectors/avoid-unsafe-block/Cargo.toml index 9d8bd4aa..0bc5e31a 100644 --- a/detectors/avoid-unsafe-block/Cargo.toml +++ b/detectors/avoid-unsafe-block/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/avoid-unsafe-block/src/lib.rs b/detectors/avoid-unsafe-block/src/lib.rs index 5540ff34..0d61b333 100644 --- a/detectors/avoid-unsafe-block/src/lib.rs +++ b/detectors/avoid-unsafe-block/src/lib.rs @@ -3,7 +3,7 @@ extern crate rustc_hir; extern crate rustc_span; -use clippy_utils::diagnostics::span_lint; +use clippy_wrappers::span_lint; use rustc_hir::{ def_id::LocalDefId, intravisit::{walk_expr, FnKind, Visitor}, diff --git a/detectors/divide-before-multiply/Cargo.toml b/detectors/divide-before-multiply/Cargo.toml index 86967a3b..a26e3c1e 100644 --- a/detectors/divide-before-multiply/Cargo.toml +++ b/detectors/divide-before-multiply/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/divide-before-multiply/src/lib.rs b/detectors/divide-before-multiply/src/lib.rs index 70a8f14f..6726d9d6 100644 --- a/detectors/divide-before-multiply/src/lib.rs +++ b/detectors/divide-before-multiply/src/lib.rs @@ -7,7 +7,7 @@ extern crate rustc_span; use std::collections::HashSet; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{ intravisit::{walk_expr, FnKind, Visitor}, diff --git a/detectors/dos-unbounded-operation/Cargo.toml b/detectors/dos-unbounded-operation/Cargo.toml index e841355c..f632eea0 100644 --- a/detectors/dos-unbounded-operation/Cargo.toml +++ b/detectors/dos-unbounded-operation/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/dos-unbounded-operation/src/lib.rs b/detectors/dos-unbounded-operation/src/lib.rs index 9de1ccc6..c1583d30 100644 --- a/detectors/dos-unbounded-operation/src/lib.rs +++ b/detectors/dos-unbounded-operation/src/lib.rs @@ -4,7 +4,7 @@ extern crate rustc_hir; extern crate rustc_span; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{ def::{DefKind, Res}, diff --git a/detectors/dos-unexpected-revert-with-vector/Cargo.toml b/detectors/dos-unexpected-revert-with-vector/Cargo.toml index 55a1e02f..0cfb8aa6 100644 --- a/detectors/dos-unexpected-revert-with-vector/Cargo.toml +++ b/detectors/dos-unexpected-revert-with-vector/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/dos-unexpected-revert-with-vector/src/lib.rs b/detectors/dos-unexpected-revert-with-vector/src/lib.rs index 4748829c..19e07564 100644 --- a/detectors/dos-unexpected-revert-with-vector/src/lib.rs +++ b/detectors/dos-unexpected-revert-with-vector/src/lib.rs @@ -6,7 +6,7 @@ extern crate rustc_hir; extern crate rustc_middle; extern crate rustc_span; -use clippy_utils::diagnostics::span_lint; +use clippy_wrappers::span_lint; use rustc_hir::intravisit::walk_expr; use rustc_hir::intravisit::Visitor; use rustc_hir::{Expr, ExprKind}; diff --git a/detectors/incorrect-exponentiation/Cargo.toml b/detectors/incorrect-exponentiation/Cargo.toml index 92431816..5c75871c 100644 --- a/detectors/incorrect-exponentiation/Cargo.toml +++ b/detectors/incorrect-exponentiation/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/incorrect-exponentiation/src/lib.rs b/detectors/incorrect-exponentiation/src/lib.rs index ea53024b..44633857 100644 --- a/detectors/incorrect-exponentiation/src/lib.rs +++ b/detectors/incorrect-exponentiation/src/lib.rs @@ -4,7 +4,7 @@ extern crate rustc_hir; extern crate rustc_span; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use rustc_hir::def_id::LocalDefId; use rustc_hir::intravisit::Visitor; use rustc_hir::intravisit::{walk_expr, FnKind}; diff --git a/detectors/insufficiently-random-values/Cargo.toml b/detectors/insufficiently-random-values/Cargo.toml index 6f62530e..8c1f40d5 100644 --- a/detectors/insufficiently-random-values/Cargo.toml +++ b/detectors/insufficiently-random-values/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/insufficiently-random-values/src/lib.rs b/detectors/insufficiently-random-values/src/lib.rs index 60541bd7..95da5eb9 100644 --- a/detectors/insufficiently-random-values/src/lib.rs +++ b/detectors/insufficiently-random-values/src/lib.rs @@ -3,7 +3,7 @@ extern crate rustc_hir; extern crate rustc_span; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{BinOpKind, Expr, ExprKind}; use rustc_lint::{LateContext, LateLintPass}; diff --git a/detectors/iterators-over-indexing/Cargo.toml b/detectors/iterators-over-indexing/Cargo.toml index 18578038..dbce2075 100644 --- a/detectors/iterators-over-indexing/Cargo.toml +++ b/detectors/iterators-over-indexing/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } utils = { workspace = true } diff --git a/detectors/iterators-over-indexing/src/lib.rs b/detectors/iterators-over-indexing/src/lib.rs index c65ea9b0..2126784d 100644 --- a/detectors/iterators-over-indexing/src/lib.rs +++ b/detectors/iterators-over-indexing/src/lib.rs @@ -7,7 +7,7 @@ extern crate rustc_middle; extern crate rustc_span; extern crate rustc_type_ir; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use rustc_ast::{Label, LitIntType, LitKind}; use rustc_hir::{ def::Res, diff --git a/detectors/overflow-check/Cargo.toml b/detectors/overflow-check/Cargo.toml index 681bbdd3..785a698d 100644 --- a/detectors/overflow-check/Cargo.toml +++ b/detectors/overflow-check/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } toml = "0.8.8" diff --git a/detectors/overflow-check/src/lib.rs b/detectors/overflow-check/src/lib.rs index 2842b879..223e3ba1 100644 --- a/detectors/overflow-check/src/lib.rs +++ b/detectors/overflow-check/src/lib.rs @@ -10,7 +10,7 @@ use std::{ str::from_utf8, }; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use rustc_ast::Crate; use rustc_lint::{EarlyContext, EarlyLintPass, LintContext}; use rustc_span::DUMMY_SP; diff --git a/detectors/set-contract-storage/Cargo.toml b/detectors/set-contract-storage/Cargo.toml index 9c55e36f..d404bc7c 100644 --- a/detectors/set-contract-storage/Cargo.toml +++ b/detectors/set-contract-storage/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } utils = { workspace = true } diff --git a/detectors/set-contract-storage/src/lib.rs b/detectors/set-contract-storage/src/lib.rs index 7d11a93d..a28cdc36 100644 --- a/detectors/set-contract-storage/src/lib.rs +++ b/detectors/set-contract-storage/src/lib.rs @@ -6,7 +6,7 @@ extern crate rustc_span; use std::collections::{HashMap, HashSet}; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{ intravisit::{walk_expr, FnKind, Visitor}, diff --git a/detectors/soroban-version/Cargo.toml b/detectors/soroban-version/Cargo.toml index 19ccae4b..7aaa3dc1 100644 --- a/detectors/soroban-version/Cargo.toml +++ b/detectors/soroban-version/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } semver = "1.0.4" serde_json = "1.0" diff --git a/detectors/soroban-version/src/lib.rs b/detectors/soroban-version/src/lib.rs index 253549f5..d6be93ab 100644 --- a/detectors/soroban-version/src/lib.rs +++ b/detectors/soroban-version/src/lib.rs @@ -5,7 +5,7 @@ extern crate rustc_span; use std::{io::Error, process::Command}; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use rustc_ast::Crate; use rustc_lint::{EarlyContext, EarlyLintPass, LintContext}; use rustc_span::DUMMY_SP; diff --git a/detectors/unprotected-mapping-operation/Cargo.toml b/detectors/unprotected-mapping-operation/Cargo.toml index ead2e28e..d943a1d4 100644 --- a/detectors/unprotected-mapping-operation/Cargo.toml +++ b/detectors/unprotected-mapping-operation/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } utils = { workspace = true } diff --git a/detectors/unprotected-mapping-operation/src/lib.rs b/detectors/unprotected-mapping-operation/src/lib.rs index 2592a1c2..f5122e44 100644 --- a/detectors/unprotected-mapping-operation/src/lib.rs +++ b/detectors/unprotected-mapping-operation/src/lib.rs @@ -7,7 +7,7 @@ extern crate rustc_span; use std::collections::{HashMap, HashSet}; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{ intravisit::{walk_expr, FnKind, Visitor}, diff --git a/detectors/unprotected-update-current-contract-wasm/Cargo.toml b/detectors/unprotected-update-current-contract-wasm/Cargo.toml index 9deff1a2..0024dccb 100644 --- a/detectors/unprotected-update-current-contract-wasm/Cargo.toml +++ b/detectors/unprotected-update-current-contract-wasm/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } utils = { workspace = true } diff --git a/detectors/unprotected-update-current-contract-wasm/src/lib.rs b/detectors/unprotected-update-current-contract-wasm/src/lib.rs index 0a8959dd..e032488b 100644 --- a/detectors/unprotected-update-current-contract-wasm/src/lib.rs +++ b/detectors/unprotected-update-current-contract-wasm/src/lib.rs @@ -7,7 +7,7 @@ extern crate rustc_span; use std::collections::{HashMap, HashSet}; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{ intravisit::{walk_expr, FnKind, Visitor}, diff --git a/detectors/unrestricted-transfer-from/Cargo.toml b/detectors/unrestricted-transfer-from/Cargo.toml index 265bce7d..fb827b13 100644 --- a/detectors/unrestricted-transfer-from/Cargo.toml +++ b/detectors/unrestricted-transfer-from/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/unrestricted-transfer-from/src/lib.rs b/detectors/unrestricted-transfer-from/src/lib.rs index 493afd91..56d8f024 100644 --- a/detectors/unrestricted-transfer-from/src/lib.rs +++ b/detectors/unrestricted-transfer-from/src/lib.rs @@ -115,7 +115,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrestrictedTransferFrom { walk_expr(&mut utf_storage, body.value); if utf_storage.from_ref { - clippy_utils::diagnostics::span_lint( + clippy_wrappers::span_lint( cx, UNRESTRICTED_TRANSFER_FROM, utf_storage.span.unwrap(), diff --git a/detectors/unsafe-expect/Cargo.toml b/detectors/unsafe-expect/Cargo.toml index 77381952..f451b997 100644 --- a/detectors/unsafe-expect/Cargo.toml +++ b/detectors/unsafe-expect/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/unsafe-expect/src/lib.rs b/detectors/unsafe-expect/src/lib.rs index 3d572f1f..f575eff5 100644 --- a/detectors/unsafe-expect/src/lib.rs +++ b/detectors/unsafe-expect/src/lib.rs @@ -6,7 +6,8 @@ extern crate rustc_span; use std::{collections::HashSet, hash::Hash}; -use clippy_utils::{diagnostics::span_lint_and_help, higher}; +use clippy_utils::higher; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{ def::Res, diff --git a/detectors/unsafe-map-get/Cargo.toml b/detectors/unsafe-map-get/Cargo.toml index 230efd49..5770e539 100644 --- a/detectors/unsafe-map-get/Cargo.toml +++ b/detectors/unsafe-map-get/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } utils = { workspace = true } diff --git a/detectors/unsafe-map-get/src/lib.rs b/detectors/unsafe-map-get/src/lib.rs index 94f7d790..36641bd2 100644 --- a/detectors/unsafe-map-get/src/lib.rs +++ b/detectors/unsafe-map-get/src/lib.rs @@ -4,7 +4,7 @@ extern crate rustc_errors; extern crate rustc_hir; extern crate rustc_span; -use clippy_utils::diagnostics::span_lint_and_sugg; +use clippy_wrappers::span_lint_and_sugg; use if_chain::if_chain; use rustc_errors::Applicability; use rustc_hir::{ diff --git a/detectors/unsafe-unwrap/Cargo.toml b/detectors/unsafe-unwrap/Cargo.toml index 88669fd8..cb8e056c 100644 --- a/detectors/unsafe-unwrap/Cargo.toml +++ b/detectors/unsafe-unwrap/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/unsafe-unwrap/src/lib.rs b/detectors/unsafe-unwrap/src/lib.rs index 0a4ceb3f..6f2026d4 100644 --- a/detectors/unsafe-unwrap/src/lib.rs +++ b/detectors/unsafe-unwrap/src/lib.rs @@ -7,7 +7,8 @@ extern crate rustc_span; use std::{collections::HashSet, hash::Hash}; -use clippy_utils::{diagnostics::span_lint_and_help, higher}; +use clippy_utils::higher; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{ def::Res, diff --git a/detectors/unused-return-enum/Cargo.toml b/detectors/unused-return-enum/Cargo.toml index f1df99a7..aff30c4e 100644 --- a/detectors/unused-return-enum/Cargo.toml +++ b/detectors/unused-return-enum/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } diff --git a/detectors/unused-return-enum/src/lib.rs b/detectors/unused-return-enum/src/lib.rs index 379e52ee..7536c815 100644 --- a/detectors/unused-return-enum/src/lib.rs +++ b/detectors/unused-return-enum/src/lib.rs @@ -3,7 +3,7 @@ extern crate rustc_hir; extern crate rustc_span; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_hir::{ intravisit::{walk_expr, FnKind, Visitor}, diff --git a/detectors/vec-could-be-mapping/Cargo.toml b/detectors/vec-could-be-mapping/Cargo.toml index ac09f2b0..0d2616c0 100644 --- a/detectors/vec-could-be-mapping/Cargo.toml +++ b/detectors/vec-could-be-mapping/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } itertools = { workspace = true } diff --git a/detectors/vec-could-be-mapping/src/lib.rs b/detectors/vec-could-be-mapping/src/lib.rs index 983ad61b..e2e21afa 100644 --- a/detectors/vec-could-be-mapping/src/lib.rs +++ b/detectors/vec-could-be-mapping/src/lib.rs @@ -7,7 +7,7 @@ extern crate rustc_middle; extern crate rustc_span; extern crate rustc_type_ir; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use rustc_hir::{ intravisit::{walk_expr, FnKind, Visitor}, Body, Expr, FnDecl, GenericArg, HirId, QPath, Stmt, TyKind, diff --git a/detectors/zero-address/Cargo.toml b/detectors/zero-address/Cargo.toml index 367dee91..21980847 100644 --- a/detectors/zero-address/Cargo.toml +++ b/detectors/zero-address/Cargo.toml @@ -8,6 +8,7 @@ crate-type = ["cdylib"] [dependencies] clippy_utils = { workspace = true } +clippy_wrappers = { workspace = true } dylint_linting = { workspace = true } if_chain = { workspace = true } utils = { workspace = true } diff --git a/detectors/zero-address/src/lib.rs b/detectors/zero-address/src/lib.rs index b1b8f0f4..1bf915c8 100644 --- a/detectors/zero-address/src/lib.rs +++ b/detectors/zero-address/src/lib.rs @@ -8,7 +8,7 @@ extern crate rustc_type_ir; use std::collections::HashSet; -use clippy_utils::diagnostics::span_lint_and_help; +use clippy_wrappers::span_lint_and_help; use if_chain::if_chain; use rustc_ast::LitKind; use rustc_hir::def_id::LocalDefId;