Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cargo_pup_common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions cargo_pup_lint_config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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" }
2 changes: 1 addition & 1 deletion cargo_pup_lint_config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cargo_pup_lint_config/src/module_lint/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
}
Expand Down
4 changes: 2 additions & 2 deletions cargo_pup_lint_config/src/struct_lint/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
}
Expand Down
6 changes: 3 additions & 3 deletions cargo_pup_lint_impl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion cargo_pup_lint_impl/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]

Expand Down
4 changes: 2 additions & 2 deletions cargo_pup_lint_impl/src/lints/struct_lint/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
//!
//!

#![feature(let_chains)]
#![feature(array_windows)]
#![feature(try_blocks)]
#![warn(rust_2018_idioms, unused_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion src/pup_driver.rs
Original file line number Diff line number Diff line change
@@ -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)]

Expand Down