error: enums are not supported
--> tests/ui-fail-stable/from_form.rs:4:1
|
4 | enum Thing { }
| ^^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:3:10
|
3 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: at least one field is required
--> tests/ui-fail-stable/from_form.rs:7:1
|
7 | struct Foo1;
| ^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:6:10
|
6 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: at least one field is required
--> tests/ui-fail-stable/from_form.rs:10:13
|
10 | struct Foo2 { }
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:9:10
|
9 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: tuple struct must have exactly one field
--> tests/ui-fail-stable/from_form.rs:16:12
|
16 | struct Foo4(usize, usize, usize);
| ^^^^^^^^^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:15:10
|
15 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one lifetime is supported
--> tests/ui-fail-stable/from_form.rs:19:25
|
19 | struct NextTodoTask<'f, 'a> {
| ^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:18:10
|
18 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> tests/ui-fail-stable/from_form.rs:28:20
|
28 | #[field(name = "isindex")]
| ^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:26:10
|
26 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> tests/ui-fail-stable/from_form.rs:36:5
|
36 | foo: usize,
| ^^^
error: [help] declared in this field
--> tests/ui-fail-stable/from_form.rs:36:5
|
36 | foo: usize,
| ^^^^^^^^^^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form.rs:34:5
|
34 | / #[field(name = "foo")]
35 | | field: String,
| |_________________^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:32:10
|
32 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> tests/ui-fail-stable/from_form.rs:43:20
|
43 | #[field(name = "hello")]
| ^^^^^^^
error: [help] declared in this field
--> tests/ui-fail-stable/from_form.rs:43:5
|
43 | / #[field(name = "hello")]
44 | | other: String,
| |_________________^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form.rs:41:5
|
41 | / #[field(name = "hello")]
42 | | first: String,
| |_________________^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:39:10
|
39 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> tests/ui-fail-stable/from_form.rs:50:20
|
50 | #[field(name = "first")]
| ^^^^^^^
error: [help] declared in this field
--> tests/ui-fail-stable/from_form.rs:50:5
|
50 | / #[field(name = "first")]
51 | | other: String,
| |_________________^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form.rs:49:5
|
49 | first: String,
| ^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:47:10
|
47 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected attribute parameter: `field`
--> tests/ui-fail-stable/from_form.rs:56:28
|
56 | #[field(name = "blah", field = "bloo")]
| ^^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:54:10
|
54 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[field(..)]`, found bare path "field"
--> tests/ui-fail-stable/from_form.rs:62:7
|
62 | #[field]
| ^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:60:10
|
60 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected key/value `key = value`
--> tests/ui-fail-stable/from_form.rs:68:13
|
68 | #[field("blah")]
| ^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:66:10
|
66 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected key/value `key = value`
--> tests/ui-fail-stable/from_form.rs:74:13
|
74 | #[field(123)]
| ^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:72:10
|
72 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected attribute parameter: `beep`
--> tests/ui-fail-stable/from_form.rs:80:13
|
80 | #[field(beep = "bop")]
| ^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:78:10
|
78 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field has conflicting names
--> tests/ui-fail-stable/from_form.rs:86:5
|
86 | / #[field(name = "blah")]
87 | | #[field(name = "blah")]
88 | | my_field: String,
| |____________________^
error: [note] this field name...
--> tests/ui-fail-stable/from_form.rs:86:20
|
86 | #[field(name = "blah")]
| ^^^^^^
error: [note] ...conflicts with this field name
--> tests/ui-fail-stable/from_form.rs:87:20
|
87 | #[field(name = "blah")]
| ^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:84:10
|
84 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[attr(..)]`, found bare boolean literal
--> tests/ui-fail-stable/from_form.rs:93:20
|
93 | #[field(name = true)]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:91:10
|
91 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found bare path "name"
--> tests/ui-fail-stable/from_form.rs:99:13
|
99 | #[field(name)]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:97:10
|
97 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[attr(..)]`, found bare integer literal
--> tests/ui-fail-stable/from_form.rs:105:20
|
105 | #[field(name = 123)]
| ^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:103:10
|
103 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> tests/ui-fail-stable/from_form.rs:111:20
|
111 | #[field(name = "hello&world")]
| ^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:109:10
|
109 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> tests/ui-fail-stable/from_form.rs:117:20
|
117 | #[field(name = "!@#$%^&*()_")]
| ^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:115:10
|
115 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> tests/ui-fail-stable/from_form.rs:123:20
|
123 | #[field(name = "?")]
| ^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:121:10
|
121 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> tests/ui-fail-stable/from_form.rs:129:20
|
129 | #[field(name = "")]
| ^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:127:10
|
127 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> tests/ui-fail-stable/from_form.rs:135:20
|
135 | #[field(name = "a&b")]
| ^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:133:10
|
133 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> tests/ui-fail-stable/from_form.rs:141:20
|
141 | #[field(name = "a=")]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:139:10
|
139 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate attribute parameter: default
--> tests/ui-fail-stable/from_form.rs:177:26
|
177 | #[field(default = 1, default = 2)]
| ^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:175:10
|
175 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate default field expression
= help: at most one `default` or `default_with` is allowed
--> tests/ui-fail-stable/from_form.rs:184:23
|
181 | #[derive(FromForm)]
| -------- in this derive macro expansion
...
184 | #[field(default = 2)]
| ^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:181:10
|
181 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate default expressions
= help: only one of `default` or `default_with` must be used
--> tests/ui-fail-stable/from_form.rs:190:23
|
188 | #[derive(FromForm)]
| -------- in this derive macro expansion
189 | struct Default3 {
190 | #[field(default = 1, default_with = None)]
| ^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] other default expression is here
--> tests/ui-fail-stable/from_form.rs:190:41
|
190 | #[field(default = 1, default_with = None)]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:188:10
|
188 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate default expressions
= help: only one of `default` or `default_with` must be used
--> tests/ui-fail-stable/from_form.rs:197:23
|
194 | #[derive(FromForm)]
| -------- in this derive macro expansion
...
197 | #[field(default = 1)]
| ^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] other default expression is here
--> tests/ui-fail-stable/from_form.rs:196:28
|
196 | #[field(default_with = None)]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:194:10
|
194 | #[derive(FromForm)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> tests/ui-fail-stable/from_form.rs:147:24
|
147 | #[field(validate = 123)]
| ^^^ expected `Result<(), Errors<'_>>`, found integer
|
= note: expected enum `Result<(), Errors<'_>>`
found type `{integer}`
error[E0425]: cannot find function `unknown` in this scope
--> tests/ui-fail-stable/from_form.rs:153:24
|
153 | #[field(validate = unknown())]
| ^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> tests/ui-fail-stable/from_form.rs:160:12
|
159 | #[field(validate = ext(rocket::http::ContentType::HTML))]
| --- arguments to this function are incorrect
160 | first: String,
| ^^^^^^ expected `&TempFile<'_>`, found `&String`
|
= note: expected reference `&TempFile<'_>`
found reference `&std::string::String`
note: function defined here
--> $WORKSPACE/core/lib/src/form/validate.rs
|
| pub fn ext<'v>(file: &TempFile<'_>, r#type: ContentType) -> Result<'v, ()> {
| ^^^
error[E0308]: arguments to this function are incorrect
--> tests/ui-fail-stable/from_form.rs:165:24
|
165 | #[field(validate = ext("hello"))]
| ^^^ ------- expected `ContentType`, found `&str`
166 | first: String,
| ------ expected `&TempFile<'_>`, found `&String`
|
= note: expected reference `&TempFile<'_>`
found reference `&std::string::String`
note: function defined here
--> $WORKSPACE/core/lib/src/form/validate.rs
|
| pub fn ext<'v>(file: &TempFile<'_>, r#type: ContentType) -> Result<'v, ()> {
| ^^^
error[E0308]: mismatched types
--> tests/ui-fail-stable/from_form.rs:171:23
|
171 | #[field(default = 123)]
| ^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found integer
| arguments to this enum variant are incorrect
|
help: the type constructed contains `{integer}` due to the type of the argument passed
--> tests/ui-fail-stable/from_form.rs:171:23
|
169 | #[derive(FromForm)]
| -------- in this derive macro expansion
170 | struct Default0 {
171 | #[field(default = 123)]
| ^^^ this argument influences the type of `Some`
note: tuple variant defined here
--> $RUST/core/src/option.rs
|
| Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> tests/ui-fail-stable/from_form.rs:203:33
|
203 | #[field(default_with = Some("hi"))]
| ---- ^^^^- help: try using a conversion method: `.to_string()`
| | |
| | expected `String`, found `&str`
| arguments to this enum variant are incorrect
|
help: the type constructed contains `&'static str` due to the type of the argument passed
--> tests/ui-fail-stable/from_form.rs:203:28
|
203 | #[field(default_with = Some("hi"))]
| ^^^^^----^
| |
| this argument influences the type of `Some`
note: tuple variant defined here
--> $RUST/core/src/option.rs
|
| Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
error[E0277]: the trait bound `bool: From<&str>` is not satisfied
--> tests/ui-fail-stable/from_form.rs:209:23
|
207 | #[derive(FromForm)]
| -------- in this derive macro expansion
208 | struct Default6 {
209 | #[field(default = "no conversion")]
| ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `bool`, which is required by `&str: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<bool as From<format_description::parse::format_item::HourBase>>
<bool as From<format_description::parse::format_item::MonthCaseSensitive>>
<bool as From<format_description::parse::format_item::PeriodCase>>
<bool as From<format_description::parse::format_item::PeriodCaseSensitive>>
<bool as From<format_description::parse::format_item::SignBehavior>>
<bool as From<format_description::parse::format_item::WeekdayCaseSensitive>>
<bool as From<format_description::parse::format_item::WeekdayOneIndexed>>
<bool as From<format_description::parse::format_item::YearBase>>
= note: required for `&str` to implement `Into<bool>`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)