mirror of https://github.com/rwf2/Rocket.git
210 lines
6.6 KiB
Plaintext
210 lines
6.6 KiB
Plaintext
error: missing expected parameter: `uri`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.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 `fn`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:9:1
|
|
|
|
|
9 | struct S;
|
|
| ^^^^^^
|
|
|
|
|
= help: #[get] can only be used on functions
|
|
|
|
error: expected `fn`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:12:1
|
|
|
|
|
12 | enum A { }
|
|
| ^^^^
|
|
|
|
|
= help: #[get] can only be used on functions
|
|
|
|
error: expected `fn`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:15:1
|
|
|
|
|
15 | trait Foo { }
|
|
| ^^^^^
|
|
|
|
|
= help: #[get] can only be used on functions
|
|
|
|
error: expected `fn`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:18:1
|
|
|
|
|
18 | impl S { }
|
|
| ^^^^
|
|
|
|
|
= help: #[get] can only be used on functions
|
|
|
|
error: expected key/value `key = value`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:21:12
|
|
|
|
|
21 | #[get("/", 123)]
|
|
| ^^^
|
|
|
|
error: expected key/value `key = value`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:24:12
|
|
|
|
|
24 | #[get("/", "/")]
|
|
| ^^^
|
|
|
|
error: unexpected keyed parameter: expected literal or identifier
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:27:7
|
|
|
|
|
27 | #[get(data = "<foo>", "/")]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: unexpected attribute parameter: `unknown`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:30:12
|
|
|
|
|
30 | #[get("/", unknown = "foo")]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: expected key/value `key = value`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:33:12
|
|
|
|
|
33 | #[get("/", ...)]
|
|
| ^^^
|
|
|
|
error: handler arguments must be named
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:39:7
|
|
|
|
|
39 | fn c1(_: usize) {}
|
|
| ^^^^^^^^
|
|
|
|
|
= help: to name an ignored handler argument, use `_name`
|
|
|
|
error: invalid value: expected string literal
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:43:7
|
|
|
|
|
43 | #[get(100)]
|
|
| ^^^
|
|
|
|
error: invalid value: expected string literal
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:46:7
|
|
|
|
|
46 | #[get('/')]
|
|
| ^^^
|
|
|
|
error: invalid value: expected integer literal
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:49:19
|
|
|
|
|
49 | #[get("/", rank = "1")]
|
|
| ^^^
|
|
|
|
error: invalid value: expected integer literal
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:52:19
|
|
|
|
|
52 | #[get("/", rank = '1')]
|
|
| ^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:57:21
|
|
|
|
|
57 | #[get("/", format = "applicationx-custom")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:60:21
|
|
|
|
|
60 | #[get("/", format = "")]
|
|
| ^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:63:21
|
|
|
|
|
63 | #[get("/", format = "//")]
|
|
| ^^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:66:21
|
|
|
|
|
66 | #[get("/", format = "/")]
|
|
| ^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:69:21
|
|
|
|
|
69 | #[get("/", format = "a/")]
|
|
| ^^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:72:21
|
|
|
|
|
72 | #[get("/", format = "/a")]
|
|
| ^^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:75:21
|
|
|
|
|
75 | #[get("/", format = "/a/")]
|
|
| ^^^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:78:21
|
|
|
|
|
78 | #[get("/", format = "a/b/")]
|
|
| ^^^^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:81:21
|
|
|
|
|
81 | #[get("/", format = "unknown")]
|
|
| ^^^^^^^^^
|
|
|
|
error: invalid value: expected string literal
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:84:21
|
|
|
|
|
84 | #[get("/", format = 12)]
|
|
| ^^
|
|
|
|
error: invalid value: expected string literal
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:87:21
|
|
|
|
|
87 | #[get("/", format = 'j')]
|
|
| ^^^
|
|
|
|
error: invalid or unknown media type
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:90:21
|
|
|
|
|
90 | #[get("/", format = "text//foo")]
|
|
| ^^^^^^^^^^^
|
|
|
|
error: expected key/value `key = value`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:95:18
|
|
|
|
|
95 | #[route(CONNECT, "/")]
|
|
| ^^^
|
|
|
|
error: invalid or unknown HTTP method
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:98:9
|
|
|
|
|
98 | #[route(FIX, "/")]
|
|
| ^^^
|
|
|
|
|
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL
|
|
|
|
error: invalid or unknown HTTP method
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:101:9
|
|
|
|
|
101 | #[route("hi", "/")]
|
|
| ^^^^
|
|
|
|
|
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL
|
|
|
|
error: expected key/value `key = value`
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:104:16
|
|
|
|
|
104 | #[route("GET", "/")]
|
|
| ^^^
|
|
|
|
error: expected method ident or string, found integer literal
|
|
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:107:9
|
|
|
|
|
107 | #[route(120, "/")]
|
|
| ^^^
|
|
|
|
|
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL
|