2018-10-05 04:44:42 +00:00
|
|
|
error: missing expected parameter: `path`
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:5:1
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
5 | #[get()] //~ ERROR missing expected parameter
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^^^^
|
2020-02-15 11:51:40 +00:00
|
|
|
|
|
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
|
|
error: expected `fn`
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: #[get] can only be used on functions
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:11:1
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
11 | struct S;
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: expected `fn`
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: #[get] can only be used on functions
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:16:1
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
16 | enum A { }
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: expected `fn`
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: #[get] can only be used on functions
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:21:1
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
21 | trait Foo { }
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: expected `fn`
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: #[get] can only be used on functions
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:26:1
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
26 | impl S { }
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: expected key/value pair
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:32:12
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
32 | #[get("/", 123)] //~ ERROR expected
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected key/value pair
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:35:12
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
35 | #[get("/", "/")] //~ ERROR expected
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: unexpected keyed parameter: expected literal or identifier
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:38:7
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
38 | #[get(data = "<foo>", "/")] //~ ERROR unexpected keyed parameter
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^^^
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
|
|
error: unexpected attribute parameter: `unknown`
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:41:12
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
41 | #[get("/", unknown = "foo")] //~ ERROR unexpected
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^^^^^^
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
|
|
error: malformed attribute
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: expected syntax: #[get(key = value, ..)]
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:44:1
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
44 | #[get("/", ...)] //~ ERROR malformed
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-02-15 11:51:40 +00:00
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
|
|
error: handler arguments cannot be ignored
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: all handler arguments must be of the form: `ident: Type`
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:51:7
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
51 | fn c1(_: usize) {} //~ ERROR cannot be ignored
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
|
|
error: invalid value: expected string literal
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:56:7
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
56 | #[get(100)] //~ ERROR expected string
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: invalid value: expected string literal
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:59:7
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
59 | #[get('/')] //~ ERROR expected string
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: invalid value: expected integer literal
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:62:19
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
62 | #[get("/", rank = "1")] //~ ERROR expected integer
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: invalid value: expected integer literal
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:65:19
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
65 | #[get("/", rank = '1')] //~ ERROR expected integer
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:70:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
70 | #[get("/", format = "applicationx-custom")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:73:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
73 | #[get("/", format = "")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:76:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
76 | #[get("/", format = "//")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:79:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
79 | #[get("/", format = "/")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:82:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
82 | #[get("/", format = "a/")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:85:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
85 | #[get("/", format = "/a")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:88:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
88 | #[get("/", format = "/a/")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:91:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
91 | #[get("/", format = "a/b/")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:94:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
94 | #[get("/", format = "unknown")] //~ ERROR unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: invalid value: expected string literal
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:97:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
97 | #[get("/", format = 12)] //~ ERROR expected string
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: invalid value: expected string literal
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:100:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
100 | #[get("/", format = 'j')] //~ ERROR expected string
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: invalid or unknown media type
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:103:21
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
103 | #[get("/", format = "text//foo")] //~ ERROR invalid or unknown media type
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: invalid HTTP method for route handlers
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:108:9
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
108 | #[route(CONNECT, "/")] //~ ERROR invalid HTTP method for route
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: invalid HTTP method
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:112:9
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
112 | #[route(FIX, "/")] //~ ERROR invalid HTTP method
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected identifier, found string literal
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:116:9
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
116 | #[route("hi", "/")] //~ ERROR expected identifier
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: expected identifier, found string literal
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:120:9
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
120 | #[route("GET", "/")] //~ ERROR expected identifier
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: expected identifier, found integer literal
|
2020-07-20 22:02:10 +00:00
|
|
|
--- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
|
2020-07-11 17:31:42 +00:00
|
|
|
--> $DIR/route-attribute-general-syntax.rs:124:9
|
2018-10-05 04:44:42 +00:00
|
|
|
|
|
2020-07-11 17:31:42 +00:00
|
|
|
124 | #[route(120, "/")] //~ ERROR expected identifier
|
2018-10-05 04:44:42 +00:00
|
|
|
| ^^^
|