diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 2b3f718..16deea3 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -35,7 +35,7 @@ jobs: - name: Install dylint run: | if ! command -v cargo-dylint &> /dev/null || ! command -v dylint-link &> /dev/null; then - cargo install cargo-dylint dylint-link + cargo install cargo-dylint@3.0.0 dylint-link@3.0.0 fi - name: cargo fmt --check @@ -71,7 +71,7 @@ jobs: - name: Install dylint run: | if ! command -v cargo-dylint &> /dev/null || ! command -v dylint-link &> /dev/null; then - cargo install cargo-dylint dylint-link + cargo install cargo-dylint@3.0.0 dylint-link@3.0.0 fi - name: cargo clippy @@ -103,7 +103,7 @@ jobs: - name: Install dylint run: | if ! command -v cargo-dylint &> /dev/null || ! command -v dylint-link &> /dev/null; then - cargo install cargo-dylint dylint-link + cargo install cargo-dylint@3.0.0 dylint-link@3.0.0 fi - name: cargo test diff --git a/Cargo.lock b/Cargo.lock index c52289e..8076c59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,6 +20,55 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.81" @@ -138,6 +187,12 @@ dependencies = [ "rustc-semver", ] +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + [[package]] name = "compiletest_rs" version = "0.10.2" @@ -264,9 +319,9 @@ dependencies = [ [[package]] name = "dylint" -version = "3.0.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927d37eecb249c058d2d6100fd86f47c9424d13796bcd02d2c81a6c1ed80067b" +checksum = "c90c143743b6db400d470c8c121844ad79c0e2a3946a228742059872003b4294" dependencies = [ "ansi_term", "anyhow", @@ -285,9 +340,9 @@ dependencies = [ [[package]] name = "dylint_internal" -version = "3.0.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c32056fd5a610d2c9abc98155d395eb3ce61989c89e78e417241d06a5cc41b" +checksum = "9c0765e595bad79b47a2be4abfa4813a7ac082b2df0f6e863a0422dc9090c7c3" dependencies = [ "ansi_term", "anyhow", @@ -301,13 +356,16 @@ dependencies = [ "once_cell", "regex", "rust-embed", + "serde", + "thiserror", + "toml 0.8.12", ] [[package]] name = "dylint_linting" -version = "3.0.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b952b4f93ea8df102105ea08a9fbcd92af9791c6cdb9a6f27bb2820816c26d5a" +checksum = "3daa5f7dca7ae5e355cdb121f8d07edd0b914e54173461209dddb85316ecbd63" dependencies = [ "cargo_metadata", "dylint_internal", @@ -320,9 +378,9 @@ dependencies = [ [[package]] name = "dylint_testing" -version = "3.0.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e493af8de71bd92c640c95782748be2f2b6ff3b976d7077edf917181ebdd534a" +checksum = "c8455e87b13e8e579f66a4f8734ee3f5cc5508640230cc210ce872829df08f46" dependencies = [ "anyhow", "cargo_metadata", @@ -342,17 +400,27 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +[[package]] +name = "env_filter" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -639,6 +707,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.12.1" @@ -972,9 +1046,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rust-embed" -version = "8.3.0" +version = "8.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb78f46d0066053d16d4ca7b898e9343bc3530f71c61d5ad84cd404ada068745" +checksum = "fa66af4a4fdd5e7ebc276f115e895611a34739a9c1c01028383d612d550953c0" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -983,9 +1057,9 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.3.0" +version = "8.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91ac2a3c6c0520a3fb3dd89321177c3c692937c4eb21893378219da10c44fc8" +checksum = "6125dbc8867951125eec87294137f4e9c2c96566e61bf72c45095a7c77761478" dependencies = [ "proc-macro2", "quote", @@ -996,9 +1070,9 @@ dependencies = [ [[package]] name = "rust-embed-utils" -version = "8.3.0" +version = "8.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f69089032567ffff4eada41c573fc43ff466c7db7c5688b2e7969584345581" +checksum = "2e5347777e9aacb56039b0e1f28785929a8a3b709e87482e7442c72e7c12529d" dependencies = [ "globset", "sha2", @@ -1160,15 +1234,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "tester" version = "0.9.1" @@ -1330,6 +1395,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "utils" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 0a5d1c9..71404b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ par_fold = { path = "lints/par_fold", features = ["rlib"] } par_iter = { path = "lints/par_iter", features = ["rlib"] } rayon_imports = { path = "lints/rayon_imports", features = ["rlib"] } -dylint_linting = { version = "3.0.0" } +dylint_linting = { version = "3.1.2" } [package.metadata.rust-analyzer] rustc_private = true @@ -42,7 +42,7 @@ members = [ ] [dev-dependencies] -dylint_testing = "3.0.0" +dylint_testing = "3.1.2" [workspace.dependencies] clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "aa2c94e416d346341fe3a875160a7d064596f4d3" } @@ -62,6 +62,7 @@ complexity = { level = "forbid", priority = -4 } # INDIVIDUAL LINTS semicolon_if_nothing_returned = { level = "allow", priority = 0 } similar_names = { level = "allow", priority = 0 } +too_many_lines = { level = "allow", priority = 0 } alloc_instead_of_core = { level = "warn", priority = 0 } as_conversions = { level = "warn", priority = 0 } as_underscore = { level = "warn", priority = 0 } diff --git a/lints/par_iter/src/lib.rs b/lints/par_iter/src/lib.rs index fa32fc6..48cebd8 100644 --- a/lints/par_iter/src/lib.rs +++ b/lints/par_iter/src/lib.rs @@ -71,7 +71,7 @@ impl<'tcx> LateLintPass<'tcx> for ParIter { .into_iter() .collect(); for into_par_iter_trait in par_iter_traits { - allowed_methods.extend(get_all_methods(cx, into_par_iter_trait, *recv)); + allowed_methods.extend(get_all_methods(cx, into_par_iter_trait, recv)); } let mut top_expr = *recv; diff --git a/scripts/prepare_repo.sh b/scripts/prepare_repo.sh index 261134f..4d9a388 100755 --- a/scripts/prepare_repo.sh +++ b/scripts/prepare_repo.sh @@ -1,7 +1,7 @@ #!/bin/bash if ! command -v cargo-dylint &> /dev/null || ! command -v dylint-link &> /dev/null; then - cargo install cargo-dylint dylint-link + cargo install cargo-dylint@3.0.0 dylint-link@3.0.0 fi CARGO_TOML="Cargo.toml"