1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

update syn to 2 in web codegen (#3081)

This commit is contained in:
Rob Ede
2023-07-20 10:49:01 +01:00
committed by GitHub
parent e25f3f8f1d
commit d22c9f9fb1
8 changed files with 164 additions and 116 deletions

View File

@ -1,4 +1,4 @@
error: invalid service definition, expected #[get("<path>")]
error: unexpected end of input, expected string literal
--> tests/trybuild/routes-missing-args-fail.rs:4:1
|
4 | #[get]
@ -6,11 +6,19 @@ error: invalid service definition, expected #[get("<path>")]
|
= 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
error: invalid service definition, expected #[<method>("<path>")]
--> 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: expected attribute arguments in parentheses: #[get(...)]
--> tests/trybuild/routes-missing-args-fail.rs:4:3
|
4 | #[get]
| ^^^
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
--> tests/trybuild/routes-missing-args-fail.rs:13:55

View File

@ -1,26 +1,42 @@
error: Unknown attribute.
--> $DIR/simple-fail.rs:3:15
error: expected `=`
--> $DIR/simple-fail.rs:3:1
|
3 | #[get("/one", other)]
| ^^^^^
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected identifier or literal
error: expected string literal
--> $DIR/simple-fail.rs:8:8
|
8 | #[post(/two)]
| ^
error: Unknown attribute.
error: invalid service definition, expected #[<method>("<path>")]
--> $DIR/simple-fail.rs:8:8
|
8 | #[post(/two)]
| ^
error: expected string literal
--> $DIR/simple-fail.rs:15:9
|
15 | #[patch(PATCH_PATH)]
| ^^^^^^^^^^
error: Multiple paths specified! Should be only one!
--> $DIR/simple-fail.rs:20:19
error: invalid service definition, expected #[<method>("<path>")]
--> $DIR/simple-fail.rs:15:9
|
15 | #[patch(PATCH_PATH)]
| ^^^^^^^^^^
error: Multiple paths specified! There should be only one.
--> $DIR/simple-fail.rs:20:1
|
20 | #[delete("/four", "/five")]
| ^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the attribute macro `delete` (in Nightly builds, run with -Z macro-backtrace for more info)
error: HTTP method forbidden here. To handle multiple methods, use `route` instead
--> $DIR/simple-fail.rs:25:19