diff --git a/actix-web-codegen/tests/trybuild/simple-fail.rs b/actix-web-codegen/tests/trybuild/simple-fail.rs index a57fdc16d..73760ee13 100644 --- a/actix-web-codegen/tests/trybuild/simple-fail.rs +++ b/actix-web-codegen/tests/trybuild/simple-fail.rs @@ -27,4 +27,11 @@ async fn five() -> String { "Hello World!".to_owned() } +const SIX: &str = "/six"; + +#[get("/six", path="SIX")] +async fn six() -> String { + "Hello World!".to_owned() +} + fn main() {} diff --git a/actix-web-codegen/tests/trybuild/simple-fail.stderr b/actix-web-codegen/tests/trybuild/simple-fail.stderr index cffc81ff8..a0915288b 100644 --- a/actix-web-codegen/tests/trybuild/simple-fail.stderr +++ b/actix-web-codegen/tests/trybuild/simple-fail.stderr @@ -27,3 +27,9 @@ error: HTTP method forbidden here. To handle multiple methods, use `route` inste | 25 | #[delete("/five", method="GET")] | ^^^^^^^^^^^^ + +error: Multiple paths specified! Should be only one! + --> $DIR/simple-fail.rs:32:20 + | +32 | #[get("/six", path="SIX")] + | ^^^^^