mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-08 10:42:37 +00:00
c45a83897f
In particular, 'FromFormField' and 'UriDisplayQuery' now allow any number of form 'field' attributes. For the former, multiple 'value's are allowed, all of which are used to match against incoming fields - any match wins. For the latter, multiple 'name' and 'value's are allowed; the first of each is used to render the query value. Additionally, 'UriDisplayQuery' can now be derived for C-like enums. This brings the derive to parity with 'FromFormValue' and allows their unified application on C-like enums. Resolves #843.
126 lines
3.5 KiB
Plaintext
126 lines
3.5 KiB
Plaintext
error: fieldless structs are not supported
|
|
--> $DIR/uri_display.rs:4:1
|
|
|
|
|
4 | struct Foo1;
|
|
| ^^^^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:3:10
|
|
|
|
|
3 | #[derive(UriDisplayQuery)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: fieldless structs are not supported
|
|
--> $DIR/uri_display.rs:7:1
|
|
|
|
|
7 | struct Foo2();
|
|
| ^^^^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:6:10
|
|
|
|
|
6 | #[derive(UriDisplayQuery)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: empty enums are not supported
|
|
--> $DIR/uri_display.rs:10:11
|
|
|
|
|
10 | enum Foo3 { }
|
|
| ^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:9:10
|
|
|
|
|
9 | #[derive(UriDisplayQuery)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: tuple structs or variants must have exactly one field
|
|
--> $DIR/uri_display.rs:18:12
|
|
|
|
|
18 | struct Foo5(String, String);
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:17:10
|
|
|
|
|
17 | #[derive(UriDisplayQuery)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: expected list `#[attr(..)]`, found bare integer literal
|
|
--> $DIR/uri_display.rs:22:20
|
|
|
|
|
22 | #[field(name = 123)]
|
|
| ^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:20:10
|
|
|
|
|
20 | #[derive(UriDisplayQuery)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: struct must have exactly one field
|
|
--> $DIR/uri_display.rs:27:12
|
|
|
|
|
27 | struct Foo7(String, usize);
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:26:10
|
|
|
|
|
26 | #[derive(UriDisplayPath)]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: struct must have exactly one field
|
|
--> $DIR/uri_display.rs:30:1
|
|
|
|
|
30 | struct Foo8;
|
|
| ^^^^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:29:10
|
|
|
|
|
29 | #[derive(UriDisplayPath)]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: enums are not supported
|
|
--> $DIR/uri_display.rs:33:1
|
|
|
|
|
33 | enum Foo9 { }
|
|
| ^^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:32:10
|
|
|
|
|
32 | #[derive(UriDisplayPath)]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: named structs are not supported
|
|
--> $DIR/uri_display.rs:36:1
|
|
|
|
|
36 | struct Foo10 {
|
|
| ^^^^^^
|
|
|
|
error: [note] error occurred while deriving `UriDisplay`
|
|
--> $DIR/uri_display.rs:35:10
|
|
|
|
|
35 | #[derive(UriDisplayPath)]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|