From b2d0196f342f0f90a9e9e32584f0826bebed4891 Mon Sep 17 00:00:00 2001 From: Dylan Anthony <43723790+dbanty@users.noreply.github.com> Date: Fri, 7 Jun 2024 08:08:13 -0600 Subject: [PATCH] Do not require actix-router default features from actix-web-codegen (#3372) * fix: Do not require actix-router default features from actix-web-codegen * docs: update changelog * test: update trybuild stderr --------- Co-authored-by: Dylan Anthony Co-authored-by: Rob Ede --- actix-web-codegen/CHANGES.md | 1 + actix-web-codegen/Cargo.toml | 2 +- .../tests/trybuild/route-malformed-path-fail.stderr | 5 +---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/actix-web-codegen/CHANGES.md b/actix-web-codegen/CHANGES.md index a5acdd21c..875c4021e 100644 --- a/actix-web-codegen/CHANGES.md +++ b/actix-web-codegen/CHANGES.md @@ -2,6 +2,7 @@ ## Unreleased +- Prevent inclusion of default `actix-router` features. - Minimum supported Rust version (MSRV) is now 1.72. ## 4.2.2 diff --git a/actix-web-codegen/Cargo.toml b/actix-web-codegen/Cargo.toml index 4a45d4fef..31c470694 100644 --- a/actix-web-codegen/Cargo.toml +++ b/actix-web-codegen/Cargo.toml @@ -16,7 +16,7 @@ rust-version.workspace = true proc-macro = true [dependencies] -actix-router = "0.5" +actix-router = { version = "0.5", default-features = false } proc-macro2 = "1" quote = "1" syn = { version = "2", features = ["full", "extra-traits"] } diff --git a/actix-web-codegen/tests/trybuild/route-malformed-path-fail.stderr b/actix-web-codegen/tests/trybuild/route-malformed-path-fail.stderr index 93c510109..c1100c784 100644 --- a/actix-web-codegen/tests/trybuild/route-malformed-path-fail.stderr +++ b/actix-web-codegen/tests/trybuild/route-malformed-path-fail.stderr @@ -20,10 +20,7 @@ error: custom attribute panicked 13 | #[get("/{}")] | ^^^^^^^^^^^^^ | - = help: message: Wrong path pattern: "/{}" regex parse error: - ((?s-m)^/(?P<>[^/]+))$ - ^ - error: empty capture group name + = help: message: Wrong path pattern: "/{}" empty capture group names are not allowed error: custom attribute panicked --> $DIR/route-malformed-path-fail.rs:23:1