Skip to content

Commit

Permalink
Fix SSE example, clean-up SSE related code.
Browse files Browse the repository at this point in the history
Also updates UI tests for latest nightly.
  • Loading branch information
SergioBenitez committed Oct 30, 2020
1 parent c24a963 commit 3970783
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 133 deletions.
4 changes: 4 additions & 0 deletions core/codegen/tests/ui-fail/from_form_type_errors.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ error[E0277]: the trait bound `Unknown: FromFormValue<'_>` is not satisfied
|
7 | field: Unknown,
| ^^^^^^^^^^^^^^ the trait `FromFormValue<'_>` is not implemented for `Unknown`
|
= note: required by `from_form_value`

error[E0277]: the trait bound `Foo<usize>: FromFormValue<'_>` is not satisfied
--> $DIR/from_form_type_errors.rs:15:5
|
15 | field: Foo<usize>,
| ^^^^^^^^^^^^^^^^^ the trait `FromFormValue<'_>` is not implemented for `Foo<usize>`
|
= note: required by `from_form_value`
18 changes: 18 additions & 0 deletions core/codegen/tests/ui-fail/route-type-errors.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,32 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
|
8 | fn f0(foo: Q) {} //~ ERROR FromParam
| ^^^^^^ the trait `FromParam<'_>` is not implemented for `Q`
|
= note: required by `from_param`

error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied
--> $DIR/route-type-errors.rs:11:7
|
11 | fn f1(foo: Q) {} //~ ERROR FromSegments
| ^^^^^^ the trait `FromSegments<'_>` is not implemented for `Q`
|
= note: required by `from_segments`

error[E0277]: the trait bound `Q: FromFormValue<'_>` is not satisfied
--> $DIR/route-type-errors.rs:14:7
|
14 | fn f2(foo: Q) {} //~ ERROR FromFormValue
| ^^^^^^ the trait `FromFormValue<'_>` is not implemented for `Q`
|
= note: required by `from_form_value`

error[E0277]: the trait bound `Q: FromQuery<'_>` is not satisfied
--> $DIR/route-type-errors.rs:17:7
|
17 | fn f3(foo: Q) {} //~ ERROR FromQuery
| ^^^^^^ the trait `FromQuery<'_>` is not implemented for `Q`
|
= note: required by `from_query`

error[E0277]: the trait bound `Q: FromDataSimple` is not satisfied
--> $DIR/route-type-errors.rs:20:7
Expand All @@ -35,27 +43,37 @@ error[E0277]: the trait bound `Q: FromRequest<'_, '_>` is not satisfied
|
23 | fn f5(a: Q, foo: Q) {}
| ^^^^ the trait `FromRequest<'_, '_>` is not implemented for `Q`
|
= note: required by `from_request`

error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:23:13
|
23 | fn f5(a: Q, foo: Q) {}
| ^^^^^^ the trait `FromParam<'_>` is not implemented for `Q`
|
= note: required by `from_param`

error[E0277]: the trait bound `Q: FromRequest<'_, '_>` is not satisfied
--> $DIR/route-type-errors.rs:28:7
|
28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^^^^ the trait `FromRequest<'_, '_>` is not implemented for `Q`
|
= note: required by `from_request`

error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:28:13
|
28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^^^^^^ the trait `FromParam<'_>` is not implemented for `Q`
|
= note: required by `from_param`

error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:28:34
|
28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^^^^^^ the trait `FromParam<'_>` is not implemented for `Q`
|
= note: required by `from_param`
10 changes: 10 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 @@ -39,6 +39,8 @@ error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::Path, _>` is n
|
59 | uri!(not_uri_display: 10, S);
| ^ the trait `FromUriParam<rocket::http::uri::Path, _>` is not implemented for `S`
|
= note: required by `from_uri_param`

error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::Path, Option<{integer}>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:65:26
Expand All @@ -51,6 +53,7 @@ error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::Path, Option
<i32 as FromUriParam<P, &'x mut i32>>
<i32 as FromUriParam<P, i32>>
= note: required because of the requirements on the impl of `FromUriParam<rocket::http::uri::Path, Option<{integer}>>` for `Option<i32>`
= note: required by `from_uri_param`

error[E0277]: the trait bound `std::string::String: FromUriParam<rocket::http::uri::Path, std::result::Result<_, _>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:65:43
Expand All @@ -65,6 +68,7 @@ error[E0277]: the trait bound `std::string::String: FromUriParam<rocket::http::u
<std::string::String as FromUriParam<P, &'x mut std::string::String>>
and 2 others
= note: required because of the requirements on the impl of `FromUriParam<rocket::http::uri::Path, std::result::Result<_, _>>` for `std::result::Result<std::string::String, &RawStr>`
= note: required by `from_uri_param`

error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::Query, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:69:20
Expand Down Expand Up @@ -95,12 +99,16 @@ error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::Query, _>` is
|
75 | uri!(other_q: 100, S);
| ^ the trait `FromUriParam<rocket::http::uri::Query, _>` is not implemented for `S`
|
= note: required by `from_uri_param`

error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::Query, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:78:26
|
78 | uri!(other_q: rest = S, id = 100);
| ^ the trait `FromUriParam<rocket::http::uri::Query, _>` is not implemented for `S`
|
= note: required by `from_uri_param`

error[E0277]: the trait bound `S: Ignorable<rocket::http::uri::Query>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:42:29
Expand Down Expand Up @@ -139,3 +147,5 @@ error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::Query, _>` is
|
83 | uri!(other_q: rest = S, id = _);
| ^ the trait `FromUriParam<rocket::http::uri::Query, _>` is not implemented for `S`
|
= note: required by `from_uri_param`
Loading

0 comments on commit 3970783

Please sign in to comment.