From 38bfe41178faee07da18f8c083f68301bc6e3eec Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Mon, 28 Jul 2025 07:59:18 +0200 Subject: [PATCH 1/2] chore: bump toolchain to 2025-07-25 --- cargo_pup_lint_config/src/module_lint/builder.rs | 4 ++-- cargo_pup_lint_config/src/struct_lint/builder.rs | 4 ++-- cargo_pup_lint_impl/src/lib.rs | 1 - cargo_pup_lint_impl/src/lints/struct_lint/lint.rs | 4 ++-- rust-toolchain.toml | 2 +- src/main.rs | 1 - src/pup_driver.rs | 1 - 7 files changed, 7 insertions(+), 10 deletions(-) diff --git a/cargo_pup_lint_config/src/module_lint/builder.rs b/cargo_pup_lint_config/src/module_lint/builder.rs index b70b6de..cc525f5 100644 --- a/cargo_pup_lint_config/src/module_lint/builder.rs +++ b/cargo_pup_lint_config/src/module_lint/builder.rs @@ -8,11 +8,11 @@ use crate::{ConfiguredLint, Severity}; /// Extension trait that adds module linting capabilities to LintBuilder pub trait ModuleLintExt { /// Start building a module lint rule - fn module_lint(&mut self) -> ModuleLintBuilder; + fn module_lint(&mut self) -> ModuleLintBuilder<'_>; } impl ModuleLintExt for LintBuilder { - fn module_lint(&mut self) -> ModuleLintBuilder { + fn module_lint(&mut self) -> ModuleLintBuilder<'_> { ModuleLintBuilder { parent: self } } } diff --git a/cargo_pup_lint_config/src/struct_lint/builder.rs b/cargo_pup_lint_config/src/struct_lint/builder.rs index ca432f6..960132d 100644 --- a/cargo_pup_lint_config/src/struct_lint/builder.rs +++ b/cargo_pup_lint_config/src/struct_lint/builder.rs @@ -8,11 +8,11 @@ use crate::{ConfiguredLint, Severity}; /// Extension trait that adds struct linting capabilities to LintBuilder pub trait StructLintExt { /// Start building a struct lint rule - fn struct_lint(&mut self) -> StructLintBuilder; + fn struct_lint(&mut self) -> StructLintBuilder<'_>; } impl StructLintExt for LintBuilder { - fn struct_lint(&mut self) -> StructLintBuilder { + fn struct_lint(&mut self) -> StructLintBuilder<'_> { StructLintBuilder { parent: self } } } diff --git a/cargo_pup_lint_impl/src/lib.rs b/cargo_pup_lint_impl/src/lib.rs index db4c45c..e29b661 100644 --- a/cargo_pup_lint_impl/src/lib.rs +++ b/cargo_pup_lint_impl/src/lib.rs @@ -1,6 +1,5 @@ #![feature(rustc_private)] // This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2024 Datadog, Inc. -#![feature(let_chains)] #![feature(array_windows)] #![feature(try_blocks)] diff --git a/cargo_pup_lint_impl/src/lints/struct_lint/lint.rs b/cargo_pup_lint_impl/src/lints/struct_lint/lint.rs index 7620bfb..2b6b5d0 100644 --- a/cargo_pup_lint_impl/src/lints/struct_lint/lint.rs +++ b/cargo_pup_lint_impl/src/lints/struct_lint/lint.rs @@ -128,10 +128,10 @@ impl StructLint { // Get parameter environment for the struct let param_env = ctx.param_env; - // For each trait in the crate, check if: + // For each trait in all crates, check if: // 1. The trait name matches our pattern // 2. The struct implements the trait - for trait_def_id in ctx.tcx.all_traits() { + for trait_def_id in ctx.tcx.all_traits_including_private() { // Get the full canonical trait name let full_trait_name = queries::get_full_canonical_trait_name_from_def_id(&ctx.tcx, trait_def_id); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 3bb2505..e023780 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2025-05-31" +channel = "nightly-2025-07-25" components = ["llvm-tools-preview", "rustc-dev", "rust-analyzer", "rust-src"] diff --git a/src/main.rs b/src/main.rs index b542775..3cc2466 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,7 +59,6 @@ //! //! -#![feature(let_chains)] #![feature(array_windows)] #![feature(try_blocks)] #![warn(rust_2018_idioms, unused_lifetimes)] diff --git a/src/pup_driver.rs b/src/pup_driver.rs index 653e9e7..2389582 100644 --- a/src/pup_driver.rs +++ b/src/pup_driver.rs @@ -1,6 +1,5 @@ #![feature(rustc_private)] // This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2024 Datadog, Inc. -#![feature(let_chains)] #![feature(array_windows)] #![feature(try_blocks)] From f1f19a4847340a1081c459eb6b12531c300b0c65 Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Mon, 28 Jul 2025 08:19:48 +0200 Subject: [PATCH 2/2] chore: Bump to 0.1.3 for release --- Cargo.lock | 8 ++++---- Cargo.toml | 8 ++++---- README.md | 4 ++-- cargo_pup_common/Cargo.toml | 2 +- cargo_pup_lint_config/Cargo.toml | 4 ++-- cargo_pup_lint_config/README.md | 2 +- cargo_pup_lint_impl/Cargo.toml | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 69740d2..a6b931e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -138,7 +138,7 @@ dependencies = [ [[package]] name = "cargo_pup" -version = "0.1.2" +version = "0.1.3" dependencies = [ "ansi_term", "anyhow", @@ -157,7 +157,7 @@ dependencies = [ [[package]] name = "cargo_pup_common" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "cargo_metadata", @@ -168,7 +168,7 @@ dependencies = [ [[package]] name = "cargo_pup_lint_config" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "cargo_pup_common", @@ -179,7 +179,7 @@ dependencies = [ [[package]] name = "cargo_pup_lint_impl" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "cargo_pup_common", diff --git a/Cargo.toml b/Cargo.toml index be05fec..ad47940 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ exclude = ["test_app"] [package] name = "cargo_pup" -version = "0.1.2" +version = "0.1.3" edition = "2024" description = "A Rust architectural linting tool that integrates with rustc to enforce architectural patterns and boundaries" license = "Apache-2.0" @@ -34,9 +34,9 @@ anyhow = { workspace = true } tempfile = { workspace = true } ron = { workspace = true } cargo_metadata = { workspace = true } -cargo_pup_common = { path = "cargo_pup_common", version = "=0.1.2" } -cargo_pup_lint_impl = { path = "cargo_pup_lint_impl", version = "=0.1.2" } -cargo_pup_lint_config = { path = "cargo_pup_lint_config", version = "=0.1.2" } +cargo_pup_common = { path = "cargo_pup_common", version = "=0.1.3" } +cargo_pup_lint_impl = { path = "cargo_pup_lint_impl", version = "=0.1.3" } +cargo_pup_lint_config = { path = "cargo_pup_lint_config", version = "=0.1.3" } # # These bits are just to keep rust rover happy. diff --git a/README.md b/README.md index 05d501d..baef694 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ First, make sure to install [rustup](https://rustup.rs/) to manage your local ru Then install pup; **you must use this nightly toolchain, as pup depends on compiler internals that are otherwise unavailable!** ```bash -cargo +nightly-2025-05-31 install cargo_pup +cargo +nightly-2025-07-25 install cargo_pup ``` ## Getting Started @@ -120,7 +120,7 @@ First, add the following to your `Cargo.toml`: ```toml [dev-dependencies] -cargo_pup_lint_config = "0.1.2" +cargo_pup_lint_config = "0.1.3" ``` ## Examples diff --git a/cargo_pup_common/Cargo.toml b/cargo_pup_common/Cargo.toml index 14a7535..9519758 100644 --- a/cargo_pup_common/Cargo.toml +++ b/cargo_pup_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo_pup_common" -version = "0.1.2" +version = "0.1.3" edition = "2024" description = "Common utilities and shared components for cargo-pup architectural linting tool" license = "Apache-2.0" diff --git a/cargo_pup_lint_config/Cargo.toml b/cargo_pup_lint_config/Cargo.toml index cd91df0..51d81d2 100644 --- a/cargo_pup_lint_config/Cargo.toml +++ b/cargo_pup_lint_config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo_pup_lint_config" -version = "0.1.2" +version = "0.1.3" edition = "2024" description = "Configuration and rule builder utilities for cargo-pup architectural linting" license = "Apache-2.0" @@ -13,4 +13,4 @@ serde.workspace = true ron.workspace = true tempfile.workspace = true anyhow.workspace = true -cargo_pup_common = { path = "../cargo_pup_common", version = "=0.1.2" } +cargo_pup_common = { path = "../cargo_pup_common", version = "=0.1.3" } diff --git a/cargo_pup_lint_config/README.md b/cargo_pup_lint_config/README.md index f209985..ad39edf 100644 --- a/cargo_pup_lint_config/README.md +++ b/cargo_pup_lint_config/README.md @@ -24,7 +24,7 @@ Add this to your `Cargo.toml`: ```toml [dev-dependencies] -cargo_pup_lint_config = "0.1.2" +cargo_pup_lint_config = "0.1.3" ``` ## Example diff --git a/cargo_pup_lint_impl/Cargo.toml b/cargo_pup_lint_impl/Cargo.toml index fee4984..9a366a2 100644 --- a/cargo_pup_lint_impl/Cargo.toml +++ b/cargo_pup_lint_impl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo_pup_lint_impl" -version = "0.1.2" +version = "0.1.3" edition = "2024" description = "Core lint implementations and rustc integration for cargo-pup architectural linting" license = "Apache-2.0" @@ -9,8 +9,8 @@ homepage = "https://github.com/datadog/cargo-pup" readme = "README.md" [dependencies] -cargo_pup_lint_config = { path = "../cargo_pup_lint_config", version = "=0.1.2" } -cargo_pup_common = { path = "../cargo_pup_common", version = "=0.1.2" } +cargo_pup_lint_config = { path = "../cargo_pup_lint_config", version = "=0.1.3" } +cargo_pup_common = { path = "../cargo_pup_common", version = "=0.1.3" } anyhow.workspace = true regex.workspace = true serde_json.workspace = true