Skip to content

Commit

Permalink
Update UI tests for latest nightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Feb 15, 2020
1 parent 385b69c commit ee1a990
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 5 deletions.
2 changes: 2 additions & 0 deletions contrib/codegen/tests/ui-fail/database-syntax.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ error: expected string literal
|
5 | #[database]
| ^^^^^^^^^^^
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected string literal
--> $DIR/database-syntax.rs:9:12
Expand Down
4 changes: 3 additions & 1 deletion core/codegen/tests/ui-fail/catchers.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ error: unexpected end of input, expected identifier
--> $DIR/catchers.rs:9:13
|
9 | let _ = catchers![a::]; //~ ERROR expected identifier
| ^^^^^^^^^^^^^^ in this macro invocation
| ^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

24 changes: 24 additions & 0 deletions core/codegen/tests/ui-fail/from_form.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ note: error occurred while deriving `FromForm`
|
5 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: tuple structs are not supported
--> $DIR/from_form.rs:10:1
Expand All @@ -21,6 +22,7 @@ note: error occurred while deriving `FromForm`
|
9 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: at least one field is required
--> $DIR/from_form.rs:14:1
Expand All @@ -33,6 +35,7 @@ note: error occurred while deriving `FromForm`
|
13 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: tuple structs are not supported
--> $DIR/from_form.rs:18:1
Expand All @@ -45,6 +48,7 @@ note: error occurred while deriving `FromForm`
|
17 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: only one lifetime is supported
--> $DIR/from_form.rs:22:20
Expand All @@ -57,6 +61,7 @@ note: error occurred while deriving `FromForm`
|
21 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid form field name
--> $DIR/from_form.rs:32:20
Expand All @@ -69,6 +74,7 @@ note: error occurred while deriving `FromForm`
|
30 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: duplicate field name
--> $DIR/from_form.rs:41:5
Expand All @@ -86,6 +92,7 @@ note: error occurred while deriving `FromForm`
|
37 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: duplicate field name
--> $DIR/from_form.rs:49:20
Expand All @@ -103,6 +110,7 @@ note: error occurred while deriving `FromForm`
|
45 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: duplicate field name
--> $DIR/from_form.rs:57:20
Expand All @@ -120,6 +128,7 @@ note: error occurred while deriving `FromForm`
|
54 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: duplicate attribute parameter: field
--> $DIR/from_form.rs:64:28
Expand All @@ -132,6 +141,7 @@ note: error occurred while deriving `FromForm`
|
62 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: malformed attribute: expected list
--> $DIR/from_form.rs:71:7
Expand All @@ -145,6 +155,7 @@ note: error occurred while deriving `FromForm`
|
69 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected key/value pair
--> $DIR/from_form.rs:78:12
Expand All @@ -157,6 +168,7 @@ note: error occurred while deriving `FromForm`
|
76 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected key/value pair
--> $DIR/from_form.rs:85:12
Expand All @@ -169,6 +181,7 @@ note: error occurred while deriving `FromForm`
|
83 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: unexpected attribute parameter: `beep`
--> $DIR/from_form.rs:92:12
Expand All @@ -181,6 +194,7 @@ note: error occurred while deriving `FromForm`
|
90 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: duplicate invocation of `form` attribute
--> $DIR/from_form.rs:100:5
Expand All @@ -193,6 +207,7 @@ note: error occurred while deriving `FromForm`
|
97 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid value: expected string literal
--> $DIR/from_form.rs:107:20
Expand All @@ -205,6 +220,7 @@ note: error occurred while deriving `FromForm`
|
105 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected literal or key/value pair
--> $DIR/from_form.rs:114:12
Expand All @@ -217,6 +233,7 @@ note: error occurred while deriving `FromForm`
|
112 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid value: expected string literal
--> $DIR/from_form.rs:121:20
Expand All @@ -229,6 +246,7 @@ note: error occurred while deriving `FromForm`
|
119 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid form field name
--> $DIR/from_form.rs:128:20
Expand All @@ -241,6 +259,7 @@ note: error occurred while deriving `FromForm`
|
126 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid form field name
--> $DIR/from_form.rs:135:20
Expand All @@ -253,6 +272,7 @@ note: error occurred while deriving `FromForm`
|
133 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid form field name
--> $DIR/from_form.rs:142:20
Expand All @@ -265,6 +285,7 @@ note: error occurred while deriving `FromForm`
|
140 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid form field name
--> $DIR/from_form.rs:149:20
Expand All @@ -277,6 +298,7 @@ note: error occurred while deriving `FromForm`
|
147 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid form field name
--> $DIR/from_form.rs:156:20
Expand All @@ -289,6 +311,7 @@ note: error occurred while deriving `FromForm`
|
154 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid form field name
--> $DIR/from_form.rs:163:20
Expand All @@ -301,6 +324,7 @@ note: error occurred while deriving `FromForm`
|
161 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 24 previous errors

7 changes: 7 additions & 0 deletions core/codegen/tests/ui-fail/from_form_value.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ note: error occurred while deriving `FromFormValue`
|
3 | #[derive(FromFormValue)]
| ^^^^^^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: tuple structs are not supported
--> $DIR/from_form_value.rs:8:1
Expand All @@ -21,6 +22,7 @@ note: error occurred while deriving `FromFormValue`
|
7 | #[derive(FromFormValue)]
| ^^^^^^^^^^^^^
= 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/from_form_value.rs:12:1
Expand All @@ -36,6 +38,7 @@ note: error occurred while deriving `FromFormValue`
|
11 | #[derive(FromFormValue)]
| ^^^^^^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: variants cannot have fields
--> $DIR/from_form_value.rs:19:5
Expand All @@ -48,6 +51,7 @@ note: error occurred while deriving `FromFormValue`
|
17 | #[derive(FromFormValue)]
| ^^^^^^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: deriving for empty enum
--> $DIR/from_form_value.rs:24:1
Expand All @@ -66,6 +70,7 @@ note: error occurred while deriving `FromFormValue`
|
27 | #[derive(FromFormValue)]
| ^^^^^^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid value: expected string literal
--> $DIR/from_form_value.rs:35:20
Expand All @@ -78,6 +83,7 @@ note: error occurred while deriving `FromFormValue`
|
33 | #[derive(FromFormValue)]
| ^^^^^^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected literal or key/value pair
--> $DIR/from_form_value.rs:42:12
Expand All @@ -90,6 +96,7 @@ note: error occurred while deriving `FromFormValue`
|
40 | #[derive(FromFormValue)]
| ^^^^^^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 7 previous errors

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ error: missing expected parameter: `path`
|
7 | #[get()] //~ ERROR missing expected parameter
| ^^^^^^^^
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:13:1
Expand Down Expand Up @@ -67,6 +69,7 @@ error: malformed attribute
| ^^^^^^^^^^^^^^^^
|
= help: expected syntax: #[get(key = value, ..)]
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: handler arguments cannot be ignored
--> $DIR/route-attribute-general-syntax.rs:53:7
Expand Down
2 changes: 2 additions & 0 deletions core/codegen/tests/ui-fail/route-warnings.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ note: 'GET' does not typically support payloads
|
20 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
| ^^^
= note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: `data` used with non-payload-supporting method
--> $DIR/route-warnings.rs:23:13
Expand All @@ -39,4 +40,5 @@ note: 'HEAD' does not typically support payloads
|
23 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
| ^^^^
= note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

4 changes: 3 additions & 1 deletion core/codegen/tests/ui-fail/routes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ error: unexpected end of input, expected identifier
--> $DIR/routes.rs:9:13
|
9 | let _ = routes![a::]; //~ ERROR expected identifier
| ^^^^^^^^^^^^ in this macro invocation
| ^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

4 changes: 4 additions & 0 deletions core/codegen/tests/ui-fail/typed-uri-bad-type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ error[E0277]: the trait bound `S: rocket::http::uri::Ignorable<rocket::http::uri
|
467 | pub fn assert_ignorable<P: UriPart, T: Ignorable<P>>() { }
| ------------ required by this bound in `rocket::http::uri::assert_ignorable`
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `usize: rocket::http::uri::Ignorable<rocket::http::uri::Query>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:42:16
Expand All @@ -129,6 +131,8 @@ error[E0277]: the trait bound `usize: rocket::http::uri::Ignorable<rocket::http:
|
467 | pub fn assert_ignorable<P: UriPart, T: Ignorable<P>>() { }
| ------------ required by this bound in `rocket::http::uri::assert_ignorable`
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:83:26
Expand Down
12 changes: 9 additions & 3 deletions core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ error: unexpected end of input, expected identifier
--> $DIR/typed-uris-invalid-syntax.rs:14:5
|
14 | uri!("/mount",); //~ ERROR expected identifier
| ^^^^^^^^^^^^^^^^ in this macro invocation
| ^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid mount point; mount points must be static, absolute URIs: `/example`
--> $DIR/typed-uris-invalid-syntax.rs:15:10
Expand All @@ -50,13 +52,17 @@ error: unexpected end of input, call to `uri!` cannot be empty
--> $DIR/typed-uris-invalid-syntax.rs:17:5
|
17 | uri!(); //~ unexpected end of input
| ^^^^^^^ in this macro invocation
| ^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: unexpected end of input, expected expression
--> $DIR/typed-uris-invalid-syntax.rs:18:5
|
18 | uri!(simple: id = ); //~ expected expression
| ^^^^^^^^^^^^^^^^^^^^ in this macro invocation
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 10 previous errors

Loading

0 comments on commit ee1a990

Please sign in to comment.