diff --git a/actix-web-codegen/tests/trybuild.rs b/actix-web-codegen/tests/trybuild.rs index ede47f8df..1f7996fd0 100644 --- a/actix-web-codegen/tests/trybuild.rs +++ b/actix-web-codegen/tests/trybuild.rs @@ -14,7 +14,6 @@ fn compile_macros() { t.pass("tests/trybuild/routes-ok.rs"); t.compile_fail("tests/trybuild/routes-missing-method-fail.rs"); - t.compile_fail("tests/trybuild/routes-invalid-method-fail.rs"); t.compile_fail("tests/trybuild/routes-missing-args-fail.rs"); t.pass("tests/trybuild/docstring-ok.rs"); diff --git a/actix-web-codegen/tests/trybuild/routes-invalid-method-fail.rs b/actix-web-codegen/tests/trybuild/routes-invalid-method-fail.rs deleted file mode 100644 index 65573cf79..000000000 --- a/actix-web-codegen/tests/trybuild/routes-invalid-method-fail.rs +++ /dev/null @@ -1,14 +0,0 @@ -use actix_web_codegen::*; - -#[routes] -#[get] -async fn index() -> String { - "Hello World!".to_owned() -} - -#[actix_web::main] -async fn main() { - use actix_web::App; - - let srv = actix_test::start(|| App::new().service(index)); -} diff --git a/actix-web-codegen/tests/trybuild/routes-invalid-method-fail.stderr b/actix-web-codegen/tests/trybuild/routes-invalid-method-fail.stderr deleted file mode 100644 index e69de29bb..000000000 diff --git a/actix-web-codegen/tests/trybuild/routes-missing-args-fail.stderr b/actix-web-codegen/tests/trybuild/routes-missing-args-fail.stderr index e69de29bb..8efe0682b 100644 --- a/actix-web-codegen/tests/trybuild/routes-missing-args-fail.stderr +++ b/actix-web-codegen/tests/trybuild/routes-missing-args-fail.stderr @@ -0,0 +1,21 @@ +error: invalid service definition, expected #[get("")] + --> tests/trybuild/routes-missing-args-fail.rs:4:1 + | +4 | #[get] + | ^^^^^^ + | + = note: this error originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: Invalid input for macro + --> tests/trybuild/routes-missing-args-fail.rs:4:1 + | +4 | #[get] + | ^^^^^^ + +error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied + --> tests/trybuild/routes-missing-args-fail.rs:13:55 + | +13 | let srv = actix_test::start(|| App::new().service(index)); + | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}` + | | + | required by a bound introduced by this call