From d265c7b88514ca89ebb5e55ae4727daa8e2d867f Mon Sep 17 00:00:00 2001 From: Martyn Date: Sat, 4 Jul 2026 10:24:41 +0100 Subject: [PATCH] Removes fragile tests which depend on rustc output --- CHANGELOG.md | 8 + .../ui-fail-nightly/catch_type_errors.rs | 25 - .../ui-fail-nightly/catch_type_errors.stderr | 89 -- .../tests/ui-fail-nightly/from_form.stderr | 1 + .../ui-fail-nightly/from_form_type_errors.rs | 17 - .../from_form_type_errors.stderr | 275 ------ .../tests/ui-fail-nightly/responder-types.rs | 30 - .../ui-fail-nightly/responder-types.stderr | 136 --- .../ui-fail-nightly/route-type-errors.rs | 26 - .../ui-fail-nightly/route-type-errors.stderr | 225 ----- .../ui-fail-nightly/typed-uri-bad-type.rs | 85 -- .../ui-fail-nightly/typed-uri-bad-type.stderr | 925 ------------------ .../uri_display_type_errors.rs | 42 - .../uri_display_type_errors.stderr | 205 ---- .../tests/ui-fail-stable/async-entry.stderr | 8 +- .../bad-ignored-segments.stderr | 8 +- .../tests/ui-fail-stable/catch_type_errors.rs | 25 - .../ui-fail-stable/catch_type_errors.stderr | 89 -- .../tests/ui-fail-stable/from_form.stderr | 41 +- .../ui-fail-stable/from_form_field.stderr | 69 +- .../ui-fail-stable/from_form_type_errors.rs | 17 - .../from_form_type_errors.stderr | 275 ------ .../tests/ui-fail-stable/from_param.stderr | 10 +- .../tests/ui-fail-stable/responder-types.rs | 30 - .../ui-fail-stable/responder-types.stderr | 136 --- .../tests/ui-fail-stable/responder.stderr | 4 +- .../route-attribute-general-syntax.stderr | 16 +- .../route-path-bad-syntax.stderr | 86 +- .../tests/ui-fail-stable/route-type-errors.rs | 26 - .../ui-fail-stable/route-type-errors.stderr | 225 ----- .../ui-fail-stable/typed-uri-bad-type.rs | 85 -- .../ui-fail-stable/typed-uri-bad-type.stderr | 925 ------------------ .../typed-uris-bad-params.stderr | 46 +- .../typed-uris-invalid-syntax.stderr | 24 +- .../tests/ui-fail-stable/uri_display.stderr | 14 +- .../ui-fail-stable/uri_display_type_errors.rs | 42 - .../uri_display_type_errors.stderr | 205 ---- .../tests/ui-fail/catch_type_errors.rs | 25 - .../tests/ui-fail/from_form_type_errors.rs | 17 - core/codegen/tests/ui-fail/responder-types.rs | 30 - .../tests/ui-fail/route-type-errors.rs | 26 - .../tests/ui-fail/typed-uri-bad-type.rs | 85 -- .../tests/ui-fail/uri_display_type_errors.rs | 42 - 43 files changed, 163 insertions(+), 4557 deletions(-) delete mode 100644 core/codegen/tests/ui-fail-nightly/catch_type_errors.rs delete mode 100644 core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr delete mode 100644 core/codegen/tests/ui-fail-nightly/from_form_type_errors.rs delete mode 100644 core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr delete mode 100644 core/codegen/tests/ui-fail-nightly/responder-types.rs delete mode 100644 core/codegen/tests/ui-fail-nightly/responder-types.stderr delete mode 100644 core/codegen/tests/ui-fail-nightly/route-type-errors.rs delete mode 100644 core/codegen/tests/ui-fail-nightly/route-type-errors.stderr delete mode 100644 core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.rs delete mode 100644 core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr delete mode 100644 core/codegen/tests/ui-fail-nightly/uri_display_type_errors.rs delete mode 100644 core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr delete mode 100644 core/codegen/tests/ui-fail-stable/catch_type_errors.rs delete mode 100644 core/codegen/tests/ui-fail-stable/catch_type_errors.stderr delete mode 100644 core/codegen/tests/ui-fail-stable/from_form_type_errors.rs delete mode 100644 core/codegen/tests/ui-fail-stable/from_form_type_errors.stderr delete mode 100644 core/codegen/tests/ui-fail-stable/responder-types.rs delete mode 100644 core/codegen/tests/ui-fail-stable/responder-types.stderr delete mode 100644 core/codegen/tests/ui-fail-stable/route-type-errors.rs delete mode 100644 core/codegen/tests/ui-fail-stable/route-type-errors.stderr delete mode 100644 core/codegen/tests/ui-fail-stable/typed-uri-bad-type.rs delete mode 100644 core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr delete mode 100644 core/codegen/tests/ui-fail-stable/uri_display_type_errors.rs delete mode 100644 core/codegen/tests/ui-fail-stable/uri_display_type_errors.stderr delete mode 100644 core/codegen/tests/ui-fail/catch_type_errors.rs delete mode 100644 core/codegen/tests/ui-fail/from_form_type_errors.rs delete mode 100644 core/codegen/tests/ui-fail/responder-types.rs delete mode 100644 core/codegen/tests/ui-fail/route-type-errors.rs delete mode 100644 core/codegen/tests/ui-fail/typed-uri-bad-type.rs delete mode 100644 core/codegen/tests/ui-fail/uri_display_type_errors.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 618e95609..40e928554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 default; set `debug_headers = true` (or `ROCKET_DEBUG_HEADERS=true`) to restore the previous behavior. +### Removed + +- Codegen UI tests that only asserted `rustc`'s own type-error output + (`route-type-errors`, `catch_type_errors`, `from_form_type_errors`, + `responder-types`, `typed-uri-bad-type`, `uri_display_type_errors`). These + broke on nearly every toolchain update without guarding any of the macros' + own diagnostics, which remain covered by the surviving UI tests. + ## 1.0.1 - 2026-06-23 ### Fixed diff --git a/core/codegen/tests/ui-fail-nightly/catch_type_errors.rs b/core/codegen/tests/ui-fail-nightly/catch_type_errors.rs deleted file mode 100644 index 16a0d6c08..000000000 --- a/core/codegen/tests/ui-fail-nightly/catch_type_errors.rs +++ /dev/null @@ -1,25 +0,0 @@ -#[macro_use] extern crate rkt; - -use rkt::Request; - -#[catch(404)] -fn f1(_request: &Request) -> usize { - 10 -} - -#[catch(404)] -fn f2(_request: &Request) -> bool { - false -} - -#[catch(404)] -fn f3(_request: bool) -> usize { - 10 -} - -#[catch(404)] -fn f4() -> usize { - 10 -} - -fn main() { } diff --git a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr b/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr deleted file mode 100644 index 1467b6e10..000000000 --- a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr +++ /dev/null @@ -1,89 +0,0 @@ -error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/catch_type_errors.rs:6:30 - | -5 | #[catch(404)] - | ------------- required by a bound introduced by this call -6 | fn f1(_request: &Request) -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/catch_type_errors.rs:11:30 - | -10 | #[catch(404)] - | ------------- required by a bound introduced by this call -11 | fn f2(_request: &Request) -> bool { - | ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0308]: mismatched types - --> tests/ui-fail-nightly/catch_type_errors.rs:16:17 - | -16 | fn f3(_request: bool) -> usize { - | -- ^^^^ expected `bool`, found `&Request<'_>` - | | - | arguments to this function are incorrect - | -note: function defined here - --> tests/ui-fail-nightly/catch_type_errors.rs:16:4 - | -16 | fn f3(_request: bool) -> usize { - | ^^ -------------- - -error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/catch_type_errors.rs:16:26 - | -15 | #[catch(404)] - | ------------- required by a bound introduced by this call -16 | fn f3(_request: bool) -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/catch_type_errors.rs:21:12 - | -20 | #[catch(404)] - | ------------- required by a bound introduced by this call -21 | fn f4() -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others diff --git a/core/codegen/tests/ui-fail-nightly/from_form.stderr b/core/codegen/tests/ui-fail-nightly/from_form.stderr index 9eaf84c71..a82cbe2da 100644 --- a/core/codegen/tests/ui-fail-nightly/from_form.stderr +++ b/core/codegen/tests/ui-fail-nightly/from_form.stderr @@ -546,6 +546,7 @@ error[E0277]: the trait bound `bool: From<&str>` is not satisfied = help: `bool` implements trait `From`: From From + From From From From diff --git a/core/codegen/tests/ui-fail-nightly/from_form_type_errors.rs b/core/codegen/tests/ui-fail-nightly/from_form_type_errors.rs deleted file mode 100644 index 4d6de4fd1..000000000 --- a/core/codegen/tests/ui-fail-nightly/from_form_type_errors.rs +++ /dev/null @@ -1,17 +0,0 @@ -#[macro_use] extern crate rkt; - -struct Unknown; - -#[derive(FromForm)] -struct BadType3 { - field: Unknown, -} - -struct Foo(T); - -#[derive(FromForm)] -struct Other { - field: Foo, -} - -fn main() { } diff --git a/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr b/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr deleted file mode 100644 index d2ae49f7f..000000000 --- a/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr +++ /dev/null @@ -1,275 +0,0 @@ -error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:7:12 - | -7 | field: Unknown, - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-nightly/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` - -error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:5:10 - | -5 | #[derive(FromForm)] - | ^------- - | | - | __________in this derive macro expansion - | | -6 | | struct BadType3 { - | |_______________^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-nightly/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` -note: required because it appears within the type `_::FromFormGeneratedContext<'r>` - --> tests/ui-fail-nightly/from_form_type_errors.rs:6:8 - | -5 | #[derive(FromForm)] - | -------- in this derive macro expansion -6 | struct BadType3 { - | ^^^^^^^^ -note: required by a bound in `rkt::form::FromForm::Context` - --> $WORKSPACE/core/lib/src/form/from_form.rs - | - | type Context: Send; - | ^^^^ required by this bound in `FromForm::Context` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:14:12 - | -14 | field: Foo, - | ^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-nightly/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` - -error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:12:10 - | -12 | #[derive(FromForm)] - | ^------- - | | - | __________in this derive macro expansion - | | -13 | | struct Other { - | |____________^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-nightly/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` -note: required because it appears within the type `_::FromFormGeneratedContext<'r>` - --> tests/ui-fail-nightly/from_form_type_errors.rs:13:8 - | -12 | #[derive(FromForm)] - | -------- in this derive macro expansion -13 | struct Other { - | ^^^^^ -note: required by a bound in `rkt::form::FromForm::Context` - --> $WORKSPACE/core/lib/src/form/from_form.rs - | - | type Context: Send; - | ^^^^ required by this bound in `FromForm::Context` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:5:10 - | -5 | #[derive(FromForm)] - | ^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-nightly/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Unknown: FromForm<'r>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:7:12 - | -7 | field: Unknown, - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-nightly/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` - -error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:7:12 - | -5 | #[derive(FromForm)] - | -------- in this derive macro expansion -6 | struct BadType3 { -7 | field: Unknown, - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-nightly/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:12:10 - | -12 | #[derive(FromForm)] - | ^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-nightly/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Foo: FromForm<'r>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:14:12 - | -14 | field: Foo, - | ^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-nightly/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` - -error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/from_form_type_errors.rs:14:12 - | -12 | #[derive(FromForm)] - | -------- in this derive macro expansion -13 | struct Other { -14 | field: Foo, - | ^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-nightly/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-nightly/responder-types.rs b/core/codegen/tests/ui-fail-nightly/responder-types.rs deleted file mode 100644 index 97fd9e0bb..000000000 --- a/core/codegen/tests/ui-fail-nightly/responder-types.rs +++ /dev/null @@ -1,30 +0,0 @@ -#[macro_use] extern crate rkt; - -#[derive(Responder)] -struct Thing1 { - thing: u8, -} - -#[derive(Responder)] -struct Thing2 { - thing: String, - other: u8, -} - -#[derive(Responder)] -struct Thing3 { - thing: u8, - other: u8, -} - -#[derive(Responder)] -struct Thing4 { - thing: String, - other: rkt::http::ContentType, - then: String, -} - -#[get("/")] -fn foo() -> usize { 0 } - -fn main() { } diff --git a/core/codegen/tests/ui-fail-nightly/responder-types.stderr b/core/codegen/tests/ui-fail-nightly/responder-types.stderr deleted file mode 100644 index 2ba905ec2..000000000 --- a/core/codegen/tests/ui-fail-nightly/responder-types.stderr +++ /dev/null @@ -1,136 +0,0 @@ -error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:5:12 - | -5 | thing: u8, - | ^^ the trait `Responder<'_, '_>` is not implemented for `u8` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:11:5 - | -11 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: `Header<'_>` implements trait `From`: - From<&Cookie<'_>> - From<&ExpectCt> - From<&Frame> - From<&Hsts> - From<&NoSniff> - From<&Permission> - From<&Prefetch> - From<&Referrer> - From<&XssFilter> - From - From - From> - = note: required for `u8` to implement `Into>` -note: required by a bound in `Response::<'r>::set_header` - --> $WORKSPACE/core/lib/src/response/response.rs - | - | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` - -error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:16:12 - | -16 | thing: u8, - | ^^ the trait `Responder<'_, '_>` is not implemented for `u8` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:17:5 - | -17 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: `Header<'_>` implements trait `From`: - From<&Cookie<'_>> - From<&ExpectCt> - From<&Frame> - From<&Hsts> - From<&NoSniff> - From<&Permission> - From<&Prefetch> - From<&Referrer> - From<&XssFilter> - From - From - From> - = note: required for `u8` to implement `Into>` -note: required by a bound in `Response::<'r>::set_header` - --> $WORKSPACE/core/lib/src/response/response.rs - | - | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` - -error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:24:5 - | -24 | then: String, - | ^^^^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: `Header<'_>` implements trait `From`: - From<&Cookie<'_>> - From<&ExpectCt> - From<&Frame> - From<&Hsts> - From<&NoSniff> - From<&Permission> - From<&Prefetch> - From<&Referrer> - From<&XssFilter> - From - From - From> - = note: required for `std::string::String` to implement `Into>` -note: required by a bound in `Response::<'r>::set_header` - --> $WORKSPACE/core/lib/src/response/response.rs - | - | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` - -error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:28:13 - | -27 | #[get("/")] - | ----------- in this attribute macro expansion -28 | fn foo() -> usize { 0 } - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others -note: required by a bound in `route::handler::, Status, (rkt::Data<'o>, Status)>>::from` - --> $WORKSPACE/core/lib/src/route/handler.rs - | - | pub fn from>(req: &'r Request<'_>, responder: R) -> Outcome<'r> { - | ^^^^^^^^^^^^^^^^^ required by this bound in `route::handler::, Status, (Data<'o>, Status)>>::from` - = note: this error originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-nightly/route-type-errors.rs b/core/codegen/tests/ui-fail-nightly/route-type-errors.rs deleted file mode 100644 index f303109a9..000000000 --- a/core/codegen/tests/ui-fail-nightly/route-type-errors.rs +++ /dev/null @@ -1,26 +0,0 @@ -#[macro_use] extern crate rkt; - -struct Q; - -#[get("/<_foo>")] -fn f0(_foo: Q) {} - -#[get("/<_foo..>")] -fn f1(_foo: Q) {} - -#[get("/?<_foo>")] -fn f2(_foo: Q) {} - -#[get("/?<_foo..>")] -fn f3(_foo: Q) {} - -#[post("/", data = "<_foo>")] -fn f4(_foo: Q) {} - -#[get("/<_foo>")] -fn f5(_a: Q, _foo: Q) {} - -#[get("/<_foo>/other/<_bar>/<_good>/okay")] -fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - -fn main() { } diff --git a/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr b/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr deleted file mode 100644 index dc4fb3c2e..000000000 --- a/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr +++ /dev/null @@ -1,225 +0,0 @@ -error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:6:13 - | -6 | fn f0(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromParam<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | -3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromParam<'a>`: - `&'a str` implements `FromParam<'a>` - `IpAddr` implements `FromParam<'a>` - `Ipv4Addr` implements `FromParam<'a>` - `Ipv6Addr` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - and $N others - -error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:9:13 - | -9 | fn f1(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromSegments<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | -3 | struct Q; - | ^^^^^^^^ -help: the following other types implement trait `FromSegments<'r>` - --> $WORKSPACE/core/lib/src/request/from_param.rs - | - | impl<'r> FromSegments<'r> for Segments<'r, Path> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Segments<'r, rkt::http::uri::fmt::Path>` implements `FromSegments<'r>` -... - | impl FromSegments<'_> for PathBuf { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `PathBuf` implements `FromSegments<'_>` -... - | impl<'r, T: FromSegments<'r>> FromSegments<'r> for Result { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Result>::Error>` implements `FromSegments<'r>` -... - | impl<'r, T: FromSegments<'r>> FromSegments<'r> for Option { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::option::Option` implements `FromSegments<'r>` - -error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:12:13 - | -12 | fn f2(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Q` to implement `FromForm<'_>` - -error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:15:13 - | -15 | fn f3(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Q` to implement `FromForm<'_>` - -error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:18:13 - | -18 | fn f4(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromData<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromData<'r>`: - &'r RawStr - &'r [u8] - &'r str - Capped<&'r RawStr> - Capped<&'r [u8]> - Capped<&'r str> - Capped> - Capped> - and $N others - -error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:21:11 - | -21 | fn f5(_a: Q, _foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromRequest<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromRequest<'r>`: - &'r Accept - &'r ContentType - &'r CookieJar<'r> - &'r Endpoint - &'r Host<'r> - &'r Limits - &'r Route - &'r State - and $N others - -error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:21:20 - | -21 | fn f5(_a: Q, _foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromParam<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromParam<'a>`: - `&'a str` implements `FromParam<'a>` - `IpAddr` implements `FromParam<'a>` - `Ipv4Addr` implements `FromParam<'a>` - `Ipv6Addr` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - and $N others - -error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:24:11 - | -24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromRequest<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromRequest<'r>`: - &'r Accept - &'r ContentType - &'r CookieJar<'r> - &'r Endpoint - &'r Host<'r> - &'r Limits - &'r Route - &'r State - and $N others - -error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:24:20 - | -24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromParam<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromParam<'a>`: - `&'a str` implements `FromParam<'a>` - `IpAddr` implements `FromParam<'a>` - `Ipv4Addr` implements `FromParam<'a>` - `Ipv6Addr` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - and $N others - -error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> tests/ui-fail-nightly/route-type-errors.rs:24:43 - | -24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromParam<'_>` is not implemented for `Q` - --> tests/ui-fail-nightly/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromParam<'a>`: - `&'a str` implements `FromParam<'a>` - `IpAddr` implements `FromParam<'a>` - `Ipv4Addr` implements `FromParam<'a>` - `Ipv6Addr` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - and $N others diff --git a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.rs b/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.rs deleted file mode 100644 index 78f050e5b..000000000 --- a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.rs +++ /dev/null @@ -1,85 +0,0 @@ -#![allow(unused_variables)] - -#[macro_use] extern crate rkt; - -use rkt::request::FromParam; - -struct S; - -impl<'a> FromParam<'a> for S { - type Error = (); - fn from_param(param: &'a str) -> Result { Ok(S) } -} - -#[post("/")] -fn simple(id: usize) { } - -#[post("//")] -fn not_uri_display(id: i32, name: S) { } - -#[post("//")] -fn not_uri_display_but_unused(id: i32, name: S) { } - -#[post("//")] -fn optionals(id: Option, name: Result) { } - -use rkt::form::{FromFormField, Errors, ValueField, DataField}; - -#[rkt::async_trait] -impl<'v> FromFormField<'v> for S { - fn default() -> Option { None } - - fn from_value(_: ValueField<'v>) -> Result> { Ok(S) } - - async fn from_data(_: DataField<'v, '_>) -> Result> { Ok(S) } -} - -#[post("/?")] -fn simple_q(id: isize) { } - -#[post("/?&")] -fn other_q(id: usize, rest: S) { } - -#[post("/?&")] -fn optionals_q(id: Option, name: Result>) { } - -fn main() { - uri!(simple(id = "hi")); - - uri!(simple("hello")); - - uri!(simple(id = 239239i64)); - - uri!(not_uri_display(10, S)); - - // This one is okay. In paths, a value _must_ be supplied. - uri!(optionals(id = 10, name = "bob".to_string())); - - uri!(optionals(id = Some(10), name = Ok("bob".into()))); - - uri!(simple_q("hi")); - - uri!(simple_q(id = "hi")); - - uri!(other_q(100, S)); - - uri!(other_q(rest = S, id = 100)); - - uri!(other_q(rest = _, id = 100)); - - uri!(other_q(rest = S, id = _)); - - // These are all okay. - uri!(optionals_q(_, _)); - uri!(optionals_q(id = Some(10), name = Some("Bob".to_string()))); - uri!(optionals_q(_, Some("Bob".into()))); - uri!(optionals_q(id = _, name = _)); - - // Invalid prefixes. - uri!(uri!("?foo#bar"), simple(id = "hi")); - uri!(uri!("*"), simple(id = "hi")); - - // Invalid suffix. - uri!(_, simple(id = "hi"), uri!("*")); - uri!(_, simple(id = "hi"), uri!("/foo/bar")); -} diff --git a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr deleted file mode 100644 index c3c4d4e2d..000000000 --- a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr +++ /dev/null @@ -1,925 +0,0 @@ -error[E0271]: type mismatch resolving `>::Error == &str` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:24:37 - | -24 | fn optionals(id: Option, name: Result) { } - | ^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `Empty` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -47 | uri!(simple(id = "hi")); - | ----------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -49 | uri!(simple("hello")); - | --------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -51 | uri!(simple(id = 239239i64)); - | ---------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:18:35 - | -18 | fn not_uri_display(id: i32, name: S) { } - | ^ unsatisfied trait bound -... -53 | uri!(not_uri_display(10, S)); - | ---------------------------- in this macro invocation - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `rocket_uri_macro_not_uri_display` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:53:30 - | -53 | uri!(not_uri_display(10, S)); - | ^ unsatisfied trait bound - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:24:18 - | -24 | fn optionals(id: Option, name: Result) { } - | ^^^^^^^^^^^ the trait `FromUriParam>` is not implemented for `i32` -... -58 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); - | ------------------------------------------------------- in this macro invocation - | -help: `i32` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: required for `std::option::Option` to implement `FromUriParam>` - = note: this error originates in the macro `rocket_uri_macro_optionals` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:24:37 - | -24 | fn optionals(id: Option, name: Result) { } - | ^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam>` is not implemented for `std::string::String` -... -58 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); - | ------------------------------------------------------- in this macro invocation - | - = help: `std::string::String` implements trait `FromUriParam`: - FromUriParam - FromUriParam - FromUriParam - FromUriParam - FromUriParam - FromUriParam - = note: required for `Result` to implement `FromUriParam>` - = note: this error originates in the macro `rocket_uri_macro_optionals` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:38:17 - | -38 | fn simple_q(id: isize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `isize` -... -60 | uri!(simple_q("hi")); - | -------------------- in this macro invocation - | -help: `isize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple_q` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:38:17 - | -38 | fn simple_q(id: isize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `isize` -... -62 | uri!(simple_q(id = "hi")); - | ------------------------- in this macro invocation - | -help: `isize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple_q` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:41:29 - | -41 | fn other_q(id: usize, rest: S) { } - | ^ unsatisfied trait bound -... -64 | uri!(other_q(100, S)); - | --------------------- in this macro invocation - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:64:23 - | -64 | uri!(other_q(100, S)); - | ^ unsatisfied trait bound - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:41:29 - | -41 | fn other_q(id: usize, rest: S) { } - | ^ unsatisfied trait bound -... -66 | uri!(other_q(rest = S, id = 100)); - | --------------------------------- in this macro invocation - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:66:25 - | -66 | uri!(other_q(rest = S, id = 100)); - | ^ unsatisfied trait bound - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: Ignorable` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:25 - | -68 | uri!(other_q(rest = _, id = 100)); - | ^ unsatisfied trait bound - | -help: the trait `Ignorable` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ -help: the following other types implement trait `Ignorable

` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | impl Ignorable for Option {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::option::Option` - | impl Ignorable for Result {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Result` -note: required by a bound in `rkt::http::uri::fmt::assert_ignorable` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | pub fn assert_ignorable>() {} - | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` - -error[E0277]: the trait bound `usize: Ignorable` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:70:33 - | -70 | uri!(other_q(rest = S, id = _)); - | ^ the trait `Ignorable` is not implemented for `usize` - | -help: the following other types implement trait `Ignorable

` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | impl Ignorable for Option {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::option::Option` - | impl Ignorable for Result {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Result` -note: required by a bound in `rkt::http::uri::fmt::assert_ignorable` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | pub fn assert_ignorable>() {} - | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:41:29 - | -41 | fn other_q(id: usize, rest: S) { } - | ^ unsatisfied trait bound -... -70 | uri!(other_q(rest = S, id = _)); - | ------------------------------- in this macro invocation - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:70:25 - | -70 | uri!(other_q(rest = S, id = _)); - | ^ unsatisfied trait bound - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -79 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | ----------------------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `rkt::http::uri::Reference<'_>: rkt::http::uri::fmt::ValidRoutePrefix` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:79:15 - | -79 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | -----^^^^^^^^^^- - | | | - | | the trait `rkt::http::uri::fmt::ValidRoutePrefix` is not implemented for `rkt::http::uri::Reference<'_>` - | required by a bound introduced by this call - | -help: the following other types implement trait `rkt::http::uri::fmt::ValidRoutePrefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | impl<'a> ValidRoutePrefix for Origin<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Origin<'a>` -... - | impl<'a> ValidRoutePrefix for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` -note: required by a bound in `rkt::http::uri::fmt::RouteUriBuilder::with_prefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { - | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -80 | uri!(uri!("*"), simple(id = "hi")); - | ---------------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `rkt::http::uri::Asterisk: rkt::http::uri::fmt::ValidRoutePrefix` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:80:15 - | -80 | uri!(uri!("*"), simple(id = "hi")); - | -----^^^- - | | | - | | the trait `rkt::http::uri::fmt::ValidRoutePrefix` is not implemented for `rkt::http::uri::Asterisk` - | required by a bound introduced by this call - | -help: the following other types implement trait `rkt::http::uri::fmt::ValidRoutePrefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | impl<'a> ValidRoutePrefix for Origin<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Origin<'a>` -... - | impl<'a> ValidRoutePrefix for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` -note: required by a bound in `rkt::http::uri::fmt::RouteUriBuilder::with_prefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { - | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -83 | uri!(_, simple(id = "hi"), uri!("*")); - | ------------------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `rkt::http::uri::Asterisk: rkt::http::uri::fmt::ValidRouteSuffix>` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:83:37 - | -83 | uri!(_, simple(id = "hi"), uri!("*")); - | -----^^^- - | | | - | | the trait `rkt::http::uri::fmt::ValidRouteSuffix>` is not implemented for `rkt::http::uri::Asterisk` - | required by a bound introduced by this call - | -help: the following other types implement trait `rkt::http::uri::fmt::ValidRouteSuffix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | impl<'a> ValidRouteSuffix> for Reference<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Reference<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Reference<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Reference<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -note: required by a bound in `rkt::http::uri::fmt::RouteUriBuilder::with_suffix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri - | ----------- required by a bound in this associated function - | where - | S: ValidRouteSuffix>, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -84 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | -------------------------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `rkt::http::uri::Origin<'_>: rkt::http::uri::fmt::ValidRouteSuffix>` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:84:37 - | -84 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | -----^^^^^^^^^^- - | | | - | | the trait `rkt::http::uri::fmt::ValidRouteSuffix>` is not implemented for `rkt::http::uri::Origin<'_>` - | required by a bound introduced by this call - | -help: the following other types implement trait `rkt::http::uri::fmt::ValidRouteSuffix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | impl<'a> ValidRouteSuffix> for Reference<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Reference<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Reference<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Reference<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -note: required by a bound in `rkt::http::uri::fmt::RouteUriBuilder::with_suffix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri - | ----------- required by a bound in this associated function - | where - | S: ValidRouteSuffix>, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:22 - | -47 | uri!(simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:17 - | -49 | uri!(simple("hello")); - | ^^^^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:22 - | -51 | uri!(simple(id = 239239i64)); - | ^^^^^^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:58:25 - | -58 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); - | ^^^^^^^^ the trait `FromUriParam>` is not implemented for `i32` - | -help: `i32` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: required for `std::option::Option` to implement `FromUriParam>` - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:19 - | -60 | uri!(simple_q("hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `isize` - | -help: `isize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:24 - | -62 | uri!(simple_q(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `isize` - | -help: `isize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:79:40 - | -79 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:80:33 - | -80 | uri!(uri!("*"), simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:83:25 - | -83 | uri!(_, simple(id = "hi"), uri!("*")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:84:25 - | -84 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.rs b/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.rs deleted file mode 100644 index b5ed0282e..000000000 --- a/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.rs +++ /dev/null @@ -1,42 +0,0 @@ -#[macro_use] extern crate rkt; - -struct BadType; - -#[derive(UriDisplayQuery)] -struct Bar1(BadType); - -#[derive(UriDisplayQuery)] -struct Bar2 { - field: BadType, -} - -#[derive(UriDisplayQuery)] -struct Bar3 { - field: String, - bad: BadType, -} - -#[derive(UriDisplayQuery)] -enum Bar4 { - Inner(BadType), -} - -#[derive(UriDisplayQuery)] -enum Bar5 { - Inner { - field: BadType, - }, -} - -#[derive(UriDisplayQuery)] -enum Bar6 { - Inner { - field: String, - other: BadType, - }, -} - -#[derive(UriDisplayPath)] -struct Baz(BadType); - -fn main() { } diff --git a/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr b/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr deleted file mode 100644 index 07e0234ab..000000000 --- a/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr +++ /dev/null @@ -1,205 +0,0 @@ -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:6:13 - | -6 | struct Bar1(BadType); - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-nightly/uri_display_type_errors.rs:3:1 - | -3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'i, P>::write_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_value>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:10:5 - | -10 | field: BadType, - | ^^^^^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-nightly/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'_, rkt::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:16:5 - | -16 | bad: BadType, - | ^^^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-nightly/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'_, rkt::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:21:11 - | -21 | Inner(BadType), - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-nightly/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'i, P>::write_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_value>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:27:9 - | -27 | field: BadType, - | ^^^^^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-nightly/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'_, rkt::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:35:9 - | -35 | other: BadType, - | ^^^^^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-nightly/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'_, rkt::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:40:12 - | -40 | struct Baz(BadType); - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-nightly/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ -help: the following other types implement trait `UriDisplay

` - --> tests/ui-fail-nightly/uri_display_type_errors.rs:39:10 - | -39 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ `Baz` - | - ::: $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | impl UriDisplay for path::Path { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::path::Path` -... - | impl UriDisplay for path::PathBuf { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `PathBuf` - = note: required for `&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'i, P>::write_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_value>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` - = note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-stable/async-entry.stderr b/core/codegen/tests/ui-fail-stable/async-entry.stderr index 3c37c4523..b79b6354c 100644 --- a/core/codegen/tests/ui-fail-stable/async-entry.stderr +++ b/core/codegen/tests/ui-fail-stable/async-entry.stderr @@ -10,7 +10,7 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis functio --> tests/ui-fail-stable/async-entry.rs:5:5 | 5 | fn foo() { } - | ^^^^^^^^ + | ^^ error: attribute can only be applied to `async` functions --> tests/ui-fail-stable/async-entry.rs:16:5 @@ -24,7 +24,7 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis functio --> tests/ui-fail-stable/async-entry.rs:17:5 | 17 | fn main() { - | ^^^^^^^^^ + | ^^ error: attribute cannot be applied to `main` function ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mthis attribute generates a `main` function␛[0m @@ -53,7 +53,7 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis functio --> tests/ui-fail-stable/async-entry.rs:57:5 | 57 | async fn rocket() { - | ^^^^^^^^^^^^^^^^^ + | ^^^^^ error: attribute can only be applied to functions that return a value --> tests/ui-fail-stable/async-entry.rs:64:5 @@ -67,7 +67,7 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis functio --> tests/ui-fail-stable/async-entry.rs:65:5 | 65 | fn rocket() { - | ^^^^^^^^^^^ + | ^^ error: attribute cannot be applied to `main` function ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mthis attribute generates a `main` function␛[0m diff --git a/core/codegen/tests/ui-fail-stable/bad-ignored-segments.stderr b/core/codegen/tests/ui-fail-stable/bad-ignored-segments.stderr index 194465834..74ff86bb2 100644 --- a/core/codegen/tests/ui-fail-stable/bad-ignored-segments.stderr +++ b/core/codegen/tests/ui-fail-stable/bad-ignored-segments.stderr @@ -1,13 +1,13 @@ error: parameter must be named ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39muse a name such as `_guard` or `_param`␛[0m - --> tests/ui-fail-stable/bad-ignored-segments.rs:6:12 + --> tests/ui-fail-stable/bad-ignored-segments.rs:6:7 | 6 | #[get("/c?<_>")] - | ^ + | ^^^^^^^^ error: parameter must be named ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39muse a name such as `_guard` or `_param`␛[0m - --> tests/ui-fail-stable/bad-ignored-segments.rs:9:22 + --> tests/ui-fail-stable/bad-ignored-segments.rs:9:21 | 9 | #[post("/d", data = "<_>")] - | ^^^ + | ^^^^^ diff --git a/core/codegen/tests/ui-fail-stable/catch_type_errors.rs b/core/codegen/tests/ui-fail-stable/catch_type_errors.rs deleted file mode 100644 index 16a0d6c08..000000000 --- a/core/codegen/tests/ui-fail-stable/catch_type_errors.rs +++ /dev/null @@ -1,25 +0,0 @@ -#[macro_use] extern crate rkt; - -use rkt::Request; - -#[catch(404)] -fn f1(_request: &Request) -> usize { - 10 -} - -#[catch(404)] -fn f2(_request: &Request) -> bool { - false -} - -#[catch(404)] -fn f3(_request: bool) -> usize { - 10 -} - -#[catch(404)] -fn f4() -> usize { - 10 -} - -fn main() { } diff --git a/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr b/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr deleted file mode 100644 index b6b9117d1..000000000 --- a/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr +++ /dev/null @@ -1,89 +0,0 @@ -error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-stable/catch_type_errors.rs:6:30 - | -5 | #[catch(404)] - | ------------- required by a bound introduced by this call -6 | fn f1(_request: &Request) -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-stable/catch_type_errors.rs:11:30 - | -10 | #[catch(404)] - | ------------- required by a bound introduced by this call -11 | fn f2(_request: &Request) -> bool { - | ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0308]: mismatched types - --> tests/ui-fail-stable/catch_type_errors.rs:16:17 - | -16 | fn f3(_request: bool) -> usize { - | -- ^^^^ expected `bool`, found `&Request<'_>` - | | - | arguments to this function are incorrect - | -note: function defined here - --> tests/ui-fail-stable/catch_type_errors.rs:16:4 - | -16 | fn f3(_request: bool) -> usize { - | ^^ -------------- - -error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-stable/catch_type_errors.rs:16:26 - | -15 | #[catch(404)] - | ------------- required by a bound introduced by this call -16 | fn f3(_request: bool) -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-stable/catch_type_errors.rs:21:12 - | -20 | #[catch(404)] - | ------------- required by a bound introduced by this call -21 | fn f4() -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others diff --git a/core/codegen/tests/ui-fail-stable/from_form.stderr b/core/codegen/tests/ui-fail-stable/from_form.stderr index de7ceee45..a222c786d 100644 --- a/core/codegen/tests/ui-fail-stable/from_form.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form.stderr @@ -2,7 +2,7 @@ error: enums are not supported --> tests/ui-fail-stable/from_form.rs:4:1 | 4 | enum Thing { } - | ^^^^^^^^^^^^^^ + | ^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form.rs:3:10 @@ -16,7 +16,7 @@ error: at least one field is required --> tests/ui-fail-stable/from_form.rs:7:1 | 7 | struct Foo1; - | ^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form.rs:6:10 @@ -93,14 +93,13 @@ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mdeclared in --> tests/ui-fail-stable/from_form.rs:36:5 | 36 | foo: usize, - | ^^^^^^^^^^ + | ^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mprevious field with conflicting name␛[0m --> tests/ui-fail-stable/from_form.rs:34:5 | -34 | / #[field(name = "foo")] -35 | | field: String, - | |_________________^ +34 | #[field(name = "foo")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form.rs:32:10 @@ -119,16 +118,14 @@ error: field name conflicts with previous name error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mdeclared in this field␛[0m --> tests/ui-fail-stable/from_form.rs:43:5 | -43 | / #[field(name = "hello")] -44 | | other: String, - | |_________________^ +43 | #[field(name = "hello")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mprevious field with conflicting name␛[0m --> tests/ui-fail-stable/from_form.rs:41:5 | -41 | / #[field(name = "hello")] -42 | | first: String, - | |_________________^ +41 | #[field(name = "hello")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form.rs:39:10 @@ -147,15 +144,14 @@ error: field name conflicts with previous name error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mdeclared in this field␛[0m --> tests/ui-fail-stable/from_form.rs:50:5 | -50 | / #[field(name = "first")] -51 | | other: String, - | |_________________^ +50 | #[field(name = "first")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mprevious field with conflicting name␛[0m --> tests/ui-fail-stable/from_form.rs:49:5 | 49 | first: String, - | ^^^^^^^^^^^^^ + | ^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form.rs:47:10 @@ -169,7 +165,7 @@ error: unexpected attribute parameter: `field` --> tests/ui-fail-stable/from_form.rs:56:28 | 56 | #[field(name = "blah", field = "bloo")] - | ^^^^^^^^^^^^^^ + | ^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form.rs:54:10 @@ -225,7 +221,7 @@ error: unexpected attribute parameter: `beep` --> tests/ui-fail-stable/from_form.rs:80:13 | 80 | #[field(beep = "bop")] - | ^^^^^^^^^^^^ + | ^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form.rs:78:10 @@ -238,10 +234,8 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurr 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, - | |____________________^ +86 | #[field(name = "blah")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis field name...␛[0m --> tests/ui-fail-stable/from_form.rs:86:20 @@ -399,7 +393,7 @@ error: duplicate attribute parameter: default --> tests/ui-fail-stable/from_form.rs:177:26 | 177 | #[field(default = 1, default = 2)] - | ^^^^^^^^^^^ + | ^^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form.rs:175:10 @@ -590,6 +584,7 @@ error[E0277]: the trait bound `bool: From<&str>` is not satisfied = help: `bool` implements trait `From`: From From + From From From From diff --git a/core/codegen/tests/ui-fail-stable/from_form_field.stderr b/core/codegen/tests/ui-fail-stable/from_form_field.stderr index b65c1df2c..c5670e3b7 100644 --- a/core/codegen/tests/ui-fail-stable/from_form_field.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form_field.stderr @@ -2,7 +2,7 @@ error: tuple structs are not supported --> tests/ui-fail-stable/from_form_field.rs:4:1 | 4 | struct Foo1; - | ^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromFormField`␛[0m --> tests/ui-fail-stable/from_form_field.rs:3:10 @@ -16,7 +16,7 @@ error: tuple structs are not supported --> tests/ui-fail-stable/from_form_field.rs:7:1 | 7 | struct Foo2(usize); - | ^^^^^^^^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromFormField`␛[0m --> tests/ui-fail-stable/from_form_field.rs:6:10 @@ -29,10 +29,8 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurr error: named structs are not supported --> tests/ui-fail-stable/from_form_field.rs:10:1 | -10 | / struct Foo3 { -11 | | foo: usize, -12 | | } - | |_^ +10 | struct Foo3 { + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromFormField`␛[0m --> tests/ui-fail-stable/from_form_field.rs:9:10 @@ -60,7 +58,7 @@ error: enum must have at least one variant --> tests/ui-fail-stable/from_form_field.rs:20:1 | 20 | enum Foo5 { } - | ^^^^^^^^^^^^^ + | ^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromFormField`␛[0m --> tests/ui-fail-stable/from_form_field.rs:19:10 @@ -115,10 +113,8 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurr error: variant has conflicting values --> tests/ui-fail-stable/from_form_field.rs:41:5 | -41 | / #[field(value = "bar")] -42 | | #[field(value = "bar")] -43 | | A, - | |_____^ +41 | #[field(value = "bar")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis value...␛[0m --> tests/ui-fail-stable/from_form_field.rs:41:21 @@ -149,16 +145,14 @@ error: field value conflicts with previous value error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39m...declared in this variant␛[0m --> tests/ui-fail-stable/from_form_field.rs:50:5 | -50 | / #[field(value = "BAr")] -51 | | B, - | |_____^ +50 | #[field(value = "BAr")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mprevious field with conflicting name␛[0m --> tests/ui-fail-stable/from_form_field.rs:48:5 | -48 | / #[field(value = "bar")] -49 | | A, - | |_____^ +48 | #[field(value = "bar")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromFormField`␛[0m --> tests/ui-fail-stable/from_form_field.rs:46:10 @@ -177,9 +171,8 @@ error: field value conflicts with previous value error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39m...declared in this variant␛[0m --> tests/ui-fail-stable/from_form_field.rs:57:5 | -57 | / #[field(value = "a")] -58 | | B, - | |_____^ +57 | #[field(value = "a")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mprevious field with conflicting name␛[0m --> tests/ui-fail-stable/from_form_field.rs:56:5 @@ -198,10 +191,8 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurr error: variant has conflicting values --> tests/ui-fail-stable/from_form_field.rs:80:5 | -80 | / #[field(value = "FoO")] -81 | | #[field(value = "foo")] -82 | | A, - | |_____^ +80 | #[field(value = "FoO")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis value...␛[0m --> tests/ui-fail-stable/from_form_field.rs:80:21 @@ -226,10 +217,8 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurr error: field has conflicting names --> tests/ui-fail-stable/from_form_field.rs:87:5 | -87 | / #[field(name = "foo")] -88 | | #[field(name = uncased("FOO"))] -89 | | single: usize, - | |_________________^ +87 | #[field(name = "foo")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis field name...␛[0m --> tests/ui-fail-stable/from_form_field.rs:87:20 @@ -260,16 +249,14 @@ error: field name conflicts with previous name error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mdeclared in this field␛[0m --> tests/ui-fail-stable/from_form_field.rs:96:5 | -96 | / #[field(name = "foo")] -97 | | other: usize, - | |________________^ +96 | #[field(name = "foo")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mprevious field with conflicting name␛[0m --> tests/ui-fail-stable/from_form_field.rs:94:5 | -94 | / #[field(name = "foo")] -95 | | single: usize, - | |_________________^ +94 | #[field(name = "foo")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form_field.rs:92:10 @@ -289,14 +276,13 @@ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mdeclared in --> tests/ui-fail-stable/from_form_field.rs:104:5 | 104 | hello_there: usize, - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mprevious field with conflicting name␛[0m --> tests/ui-fail-stable/from_form_field.rs:102:5 | -102 | / #[field(name = uncased("HELLO_THERE"))] -103 | | single: usize, - | |_________________^ +102 | #[field(name = uncased("HELLO_THERE"))] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form_field.rs:100:10 @@ -316,14 +302,13 @@ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mdeclared in --> tests/ui-fail-stable/from_form_field.rs:111:5 | 111 | hello_there: usize, - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mprevious field with conflicting name␛[0m --> tests/ui-fail-stable/from_form_field.rs:109:5 | -109 | / #[field(name = "hello_there")] -110 | | single: usize, - | |_________________^ +109 | #[field(name = "hello_there")] + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromForm`␛[0m --> tests/ui-fail-stable/from_form_field.rs:107:10 diff --git a/core/codegen/tests/ui-fail-stable/from_form_type_errors.rs b/core/codegen/tests/ui-fail-stable/from_form_type_errors.rs deleted file mode 100644 index 4d6de4fd1..000000000 --- a/core/codegen/tests/ui-fail-stable/from_form_type_errors.rs +++ /dev/null @@ -1,17 +0,0 @@ -#[macro_use] extern crate rkt; - -struct Unknown; - -#[derive(FromForm)] -struct BadType3 { - field: Unknown, -} - -struct Foo(T); - -#[derive(FromForm)] -struct Other { - field: Foo, -} - -fn main() { } diff --git a/core/codegen/tests/ui-fail-stable/from_form_type_errors.stderr b/core/codegen/tests/ui-fail-stable/from_form_type_errors.stderr deleted file mode 100644 index 21b0825e4..000000000 --- a/core/codegen/tests/ui-fail-stable/from_form_type_errors.stderr +++ /dev/null @@ -1,275 +0,0 @@ -error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:7:12 - | -7 | field: Unknown, - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-stable/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` - -error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:5:10 - | -5 | #[derive(FromForm)] - | ^------- - | | - | __________in this derive macro expansion - | | -6 | | struct BadType3 { - | |_______________^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-stable/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` -note: required because it appears within the type `_::FromFormGeneratedContext<'r>` - --> tests/ui-fail-stable/from_form_type_errors.rs:6:8 - | -5 | #[derive(FromForm)] - | -------- in this derive macro expansion -6 | struct BadType3 { - | ^^^^^^^^ -note: required by a bound in `rkt::form::FromForm::Context` - --> $WORKSPACE/core/lib/src/form/from_form.rs - | - | type Context: Send; - | ^^^^ required by this bound in `FromForm::Context` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:14:12 - | -14 | field: Foo, - | ^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-stable/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` - -error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:12:10 - | -12 | #[derive(FromForm)] - | ^------- - | | - | __________in this derive macro expansion - | | -13 | | struct Other { - | |____________^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-stable/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` -note: required because it appears within the type `_::FromFormGeneratedContext<'r>` - --> tests/ui-fail-stable/from_form_type_errors.rs:13:8 - | -12 | #[derive(FromForm)] - | -------- in this derive macro expansion -13 | struct Other { - | ^^^^^ -note: required by a bound in `rkt::form::FromForm::Context` - --> $WORKSPACE/core/lib/src/form/from_form.rs - | - | type Context: Send; - | ^^^^ required by this bound in `FromForm::Context` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:5:10 - | -5 | #[derive(FromForm)] - | ^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-stable/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Unknown: FromForm<'r>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:7:12 - | -7 | field: Unknown, - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-stable/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` - -error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:7:12 - | -5 | #[derive(FromForm)] - | -------- in this derive macro expansion -6 | struct BadType3 { -7 | field: Unknown, - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Unknown` - --> tests/ui-fail-stable/from_form_type_errors.rs:3:1 - | -3 | struct Unknown; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Unknown` to implement `FromForm<'r>` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:12:10 - | -12 | #[derive(FromForm)] - | ^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-stable/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `Foo: FromForm<'r>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:14:12 - | -14 | field: Foo, - | ^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-stable/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` - -error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/from_form_type_errors.rs:14:12 - | -12 | #[derive(FromForm)] - | -------- in this derive macro expansion -13 | struct Other { -14 | field: Foo, - | ^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Foo` - --> tests/ui-fail-stable/from_form_type_errors.rs:10:1 - | -10 | struct Foo(T); - | ^^^^^^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Foo` to implement `FromForm<'r>` - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-stable/from_param.stderr b/core/codegen/tests/ui-fail-stable/from_param.stderr index 0db8a63e1..4ab4a856c 100644 --- a/core/codegen/tests/ui-fail-stable/from_param.stderr +++ b/core/codegen/tests/ui-fail-stable/from_param.stderr @@ -1,10 +1,8 @@ error: named structs are not supported --> tests/ui-fail-stable/from_param.rs:4:1 | -4 | / struct Foo1 { -5 | | a: String -6 | | } - | |_^ +4 | struct Foo1 { + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromParam`␛[0m --> tests/ui-fail-stable/from_param.rs:3:10 @@ -18,7 +16,7 @@ error: named structs are not supported --> tests/ui-fail-stable/from_param.rs:9:1 | 9 | struct Foo2 {} - | ^^^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromParam`␛[0m --> tests/ui-fail-stable/from_param.rs:8:10 @@ -46,7 +44,7 @@ error: tuple structs are not supported --> tests/ui-fail-stable/from_param.rs:18:1 | 18 | struct Foo4(usize); - | ^^^^^^^^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `FromParam`␛[0m --> tests/ui-fail-stable/from_param.rs:17:10 diff --git a/core/codegen/tests/ui-fail-stable/responder-types.rs b/core/codegen/tests/ui-fail-stable/responder-types.rs deleted file mode 100644 index 97fd9e0bb..000000000 --- a/core/codegen/tests/ui-fail-stable/responder-types.rs +++ /dev/null @@ -1,30 +0,0 @@ -#[macro_use] extern crate rkt; - -#[derive(Responder)] -struct Thing1 { - thing: u8, -} - -#[derive(Responder)] -struct Thing2 { - thing: String, - other: u8, -} - -#[derive(Responder)] -struct Thing3 { - thing: u8, - other: u8, -} - -#[derive(Responder)] -struct Thing4 { - thing: String, - other: rkt::http::ContentType, - then: String, -} - -#[get("/")] -fn foo() -> usize { 0 } - -fn main() { } diff --git a/core/codegen/tests/ui-fail-stable/responder-types.stderr b/core/codegen/tests/ui-fail-stable/responder-types.stderr deleted file mode 100644 index a85f90a19..000000000 --- a/core/codegen/tests/ui-fail-stable/responder-types.stderr +++ /dev/null @@ -1,136 +0,0 @@ -error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-stable/responder-types.rs:5:12 - | -5 | thing: u8, - | ^^ the trait `Responder<'_, '_>` is not implemented for `u8` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-stable/responder-types.rs:11:5 - | -11 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: `Header<'_>` implements trait `From`: - From<&Cookie<'_>> - From<&ExpectCt> - From<&Frame> - From<&Hsts> - From<&NoSniff> - From<&Permission> - From<&Prefetch> - From<&Referrer> - From<&XssFilter> - From - From - From> - = note: required for `u8` to implement `Into>` -note: required by a bound in `Response::<'r>::set_header` - --> $WORKSPACE/core/lib/src/response/response.rs - | - | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` - -error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-stable/responder-types.rs:16:12 - | -16 | thing: u8, - | ^^ the trait `Responder<'_, '_>` is not implemented for `u8` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others - -error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-stable/responder-types.rs:17:5 - | -17 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: `Header<'_>` implements trait `From`: - From<&Cookie<'_>> - From<&ExpectCt> - From<&Frame> - From<&Hsts> - From<&NoSniff> - From<&Permission> - From<&Prefetch> - From<&Referrer> - From<&XssFilter> - From - From - From> - = note: required for `u8` to implement `Into>` -note: required by a bound in `Response::<'r>::set_header` - --> $WORKSPACE/core/lib/src/response/response.rs - | - | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` - -error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-stable/responder-types.rs:24:5 - | -24 | then: String, - | ^^^^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: `Header<'_>` implements trait `From`: - From<&Cookie<'_>> - From<&ExpectCt> - From<&Frame> - From<&Hsts> - From<&NoSniff> - From<&Permission> - From<&Prefetch> - From<&Referrer> - From<&XssFilter> - From - From - From> - = note: required for `std::string::String` to implement `Into>` -note: required by a bound in `Response::<'r>::set_header` - --> $WORKSPACE/core/lib/src/response/response.rs - | - | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` - -error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-stable/responder-types.rs:28:13 - | -27 | #[get("/")] - | ----------- in this attribute macro expansion -28 | fn foo() -> usize { 0 } - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = help: the following other types implement trait `Responder<'r, 'o>`: - `&'o [u8]` implements `Responder<'r, 'o>` - `&'o str` implements `Responder<'r, 'o>` - `()` implements `Responder<'r, 'static>` - `(ContentType, R)` implements `Responder<'r, 'o>` - `(Status, R)` implements `Responder<'r, 'o>` - `Accepted` implements `Responder<'r, 'o>` - `Arc<[u8]>` implements `Responder<'r, 'static>` - `Arc` implements `Responder<'r, 'static>` - and $N others -note: required by a bound in `route::handler::, Status, (rkt::Data<'o>, Status)>>::from` - --> $WORKSPACE/core/lib/src/route/handler.rs - | - | pub fn from>(req: &'r Request<'_>, responder: R) -> Outcome<'r> { - | ^^^^^^^^^^^^^^^^^ required by this bound in `route::handler::, Status, (Data<'o>, Status)>>::from` - = note: this error originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-stable/responder.stderr b/core/codegen/tests/ui-fail-stable/responder.stderr index a6e312582..792d509cc 100644 --- a/core/codegen/tests/ui-fail-stable/responder.stderr +++ b/core/codegen/tests/ui-fail-stable/responder.stderr @@ -2,7 +2,7 @@ error: need at least one field --> tests/ui-fail-stable/responder.rs:4:1 | 4 | struct Thing1; - | ^^^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `Responder`␛[0m --> tests/ui-fail-stable/responder.rs:3:10 @@ -44,7 +44,7 @@ error: only one lifetime is supported --> tests/ui-fail-stable/responder.rs:16:14 | 16 | struct Thing4<'a, 'b>(&'a str, &'b str); - | ^^^^^^^^ + | ^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `Responder`␛[0m --> tests/ui-fail-stable/responder.rs:15:10 diff --git a/core/codegen/tests/ui-fail-stable/route-attribute-general-syntax.stderr b/core/codegen/tests/ui-fail-stable/route-attribute-general-syntax.stderr index f0dc0ae81..ba2ec7451 100644 --- a/core/codegen/tests/ui-fail-stable/route-attribute-general-syntax.stderr +++ b/core/codegen/tests/ui-fail-stable/route-attribute-general-syntax.stderr @@ -50,26 +50,26 @@ error: unexpected keyed parameter: expected literal or identifier --> tests/ui-fail-stable/route-attribute-general-syntax.rs:27:7 | 27 | #[get(data = "", "/")] - | ^^^^^^^^^^^^^^ + | ^^^^ error: unexpected attribute parameter: `unknown` --> tests/ui-fail-stable/route-attribute-general-syntax.rs:30:12 | 30 | #[get("/", unknown = "foo")] - | ^^^^^^^^^^^^^^^ + | ^^^^^^^ error: expected key/value `key = value` --> tests/ui-fail-stable/route-attribute-general-syntax.rs:33:12 | 33 | #[get("/", ...)] - | ^^^ + | ^ error: handler arguments must be named ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mto name an ignored handler argument, use `_name`␛[0m --> tests/ui-fail-stable/route-attribute-general-syntax.rs:39:7 | 39 | fn c1(_: usize) {} - | ^^^^^^^^ + | ^ error: invalid value: expected string literal --> tests/ui-fail-stable/route-attribute-general-syntax.rs:43:7 @@ -181,17 +181,17 @@ error: expected literal, found bare path "FIX" error: invalid route URI: expected token '/' but found 'h' at index 0 ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mexpected URI in origin form: "/path/"␛[0m - --> tests/ui-fail-stable/route-attribute-general-syntax.rs:101:10 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:101:9 | 101 | #[route("hi", "/")] - | ^ + | ^^^^ error: invalid route URI: expected token '/' but found 'G' at index 0 ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mexpected URI in origin form: "/path/"␛[0m - --> tests/ui-fail-stable/route-attribute-general-syntax.rs:104:10 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:104:9 | 104 | #[route("GET", "/")] - | ^ + | ^^^^^ error: invalid value: expected string literal --> tests/ui-fail-stable/route-attribute-general-syntax.rs:107:9 diff --git a/core/codegen/tests/ui-fail-stable/route-path-bad-syntax.stderr b/core/codegen/tests/ui-fail-stable/route-path-bad-syntax.stderr index 17e92a09c..1ed1010c9 100644 --- a/core/codegen/tests/ui-fail-stable/route-path-bad-syntax.stderr +++ b/core/codegen/tests/ui-fail-stable/route-path-bad-syntax.stderr @@ -1,57 +1,57 @@ error: invalid route URI: expected token '/' but found 'a' at index 0 ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mexpected URI in origin form: "/path/"␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:5:8 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:5:7 | 5 | #[get("a")] - | ^ + | ^^^ error: invalid route URI: unexpected EOF: expected token '/' at index 0 ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mexpected URI in origin form: "/path/"␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:8:8 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:8:7 | 8 | #[get("")] - | ^ + | ^^ error: invalid route URI: expected token '/' but found 'a' at index 0 ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mexpected URI in origin form: "/path/"␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:11:8 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:11:7 | 11 | #[get("a/b/c")] - | ^ + | ^^^^^^^ error: route URIs cannot contain empty segments ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mexpected "/a/b", found "/a///b"␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:14:10 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:14:7 | 14 | #[get("/a///b")] - | ^^ + | ^^^^^^^^ error: route URIs cannot contain empty segments ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mexpected "/?bat", found "/?bat&&"␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:17:13 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:17:7 | 17 | #[get("/?bat&&")] - | ^^ + | ^^^^^^^^^ error: route URIs cannot contain empty segments ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mexpected "/?bat", found "/?bat&&"␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:20:13 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:20:7 | 20 | #[get("/?bat&&")] - | ^^ + | ^^^^^^^^^ error: route URIs cannot contain empty segments ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mexpected "/a/b/", found "/a/b//"␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:23:12 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:23:7 | 23 | #[get("/a/b//")] - | ^^ + | ^^^^^^^^ error: unused parameter - --> tests/ui-fail-stable/route-path-bad-syntax.rs:42:10 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:42:7 | 42 | #[get("/")] - | ^^^^ + | ^^^^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected argument named `name` here␛[0m --> tests/ui-fail-stable/route-path-bad-syntax.rs:43:6 @@ -60,10 +60,10 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected arg | ^^^^^^^^^^^^^^ error: unused parameter - --> tests/ui-fail-stable/route-path-bad-syntax.rs:45:12 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:45:7 | 45 | #[get("/a?")] - | ^ + | ^^^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected argument named `r` here␛[0m --> tests/ui-fail-stable/route-path-bad-syntax.rs:46:6 @@ -72,10 +72,10 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected arg | ^^ error: unused parameter - --> tests/ui-fail-stable/route-path-bad-syntax.rs:48:23 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:48:21 | 48 | #[post("/a", data = "")] - | ^^^^ + | ^^^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected argument named `test` here␛[0m --> tests/ui-fail-stable/route-path-bad-syntax.rs:49:6 @@ -84,10 +84,10 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected arg | ^^ error: unused parameter - --> tests/ui-fail-stable/route-path-bad-syntax.rs:51:10 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:51:7 | 51 | #[get("/<_r>")] - | ^^ + | ^^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected argument named `_r` here␛[0m --> tests/ui-fail-stable/route-path-bad-syntax.rs:52:6 @@ -96,10 +96,10 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected arg | ^^ error: unused parameter - --> tests/ui-fail-stable/route-path-bad-syntax.rs:54:15 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:54:7 | 54 | #[get("/<_r>/")] - | ^ + | ^^^^^^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected argument named `b` here␛[0m --> tests/ui-fail-stable/route-path-bad-syntax.rs:55:6 @@ -110,73 +110,73 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mexpected arg error: invalid identifier: `foo_.` ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mdynamic parameters must be valid identifiers␛[0m ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mdid you mean ``?␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:60:10 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:60:7 | 60 | #[get("/")] - | ^^^^^ + | ^^^^^^^^^^ error: invalid identifier: `foo*` ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mdynamic parameters must be valid identifiers␛[0m ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mdid you mean ``?␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:63:10 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:63:7 | 63 | #[get("/")] - | ^^^^ + | ^^^^^^^^^ error: invalid identifier: `!` ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mdynamic parameters must be valid identifiers␛[0m ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mdid you mean ``?␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:66:10 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:66:7 | 66 | #[get("/")] - | ^ + | ^^^^^^ error: invalid identifier: `name>:`?␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:69:10 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:69:7 | 69 | #[get("/:")] - | ^^^^^^^^^ + | ^^^^^^^^^^^^^^ error: unexpected static parameter ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mparameter must be dynamic: ``␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:74:20 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:74:19 | 74 | #[get("/", data = "foo")] - | ^^^ + | ^^^^^ error: parameter cannot be trailing ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mdid you mean ``?␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:77:20 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:77:19 | 77 | #[get("/", data = "")] - | ^^^^^^^ + | ^^^^^^^^^ error: unexpected static parameter ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mparameter must be dynamic: ``␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:80:20 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:80:19 | 80 | #[get("/", data = "`?␛[0m - --> tests/ui-fail-stable/route-path-bad-syntax.rs:83:21 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:83:19 | 83 | #[get("/", data = "")] - | ^^^^^ + | ^^^^^^^^^ error: handler arguments must be named ␛[1;34m= ␛[0m␛[1;36mhelp␛[0m␛[39m: ␛[0m␛[1;39mto name an ignored handler argument, use `_name`␛[0m --> tests/ui-fail-stable/route-path-bad-syntax.rs:89:7 | 89 | fn k0(_: usize) {} - | ^^^^^^^^ + | ^ error: parameters cannot be empty - --> tests/ui-fail-stable/route-path-bad-syntax.rs:93:9 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:93:7 | 93 | #[get("/<>")] - | ^^ + | ^^^^^ diff --git a/core/codegen/tests/ui-fail-stable/route-type-errors.rs b/core/codegen/tests/ui-fail-stable/route-type-errors.rs deleted file mode 100644 index f303109a9..000000000 --- a/core/codegen/tests/ui-fail-stable/route-type-errors.rs +++ /dev/null @@ -1,26 +0,0 @@ -#[macro_use] extern crate rkt; - -struct Q; - -#[get("/<_foo>")] -fn f0(_foo: Q) {} - -#[get("/<_foo..>")] -fn f1(_foo: Q) {} - -#[get("/?<_foo>")] -fn f2(_foo: Q) {} - -#[get("/?<_foo..>")] -fn f3(_foo: Q) {} - -#[post("/", data = "<_foo>")] -fn f4(_foo: Q) {} - -#[get("/<_foo>")] -fn f5(_a: Q, _foo: Q) {} - -#[get("/<_foo>/other/<_bar>/<_good>/okay")] -fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - -fn main() { } diff --git a/core/codegen/tests/ui-fail-stable/route-type-errors.stderr b/core/codegen/tests/ui-fail-stable/route-type-errors.stderr deleted file mode 100644 index 93c432743..000000000 --- a/core/codegen/tests/ui-fail-stable/route-type-errors.stderr +++ /dev/null @@ -1,225 +0,0 @@ -error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:6:13 - | -6 | fn f0(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromParam<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | -3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromParam<'a>`: - `&'a str` implements `FromParam<'a>` - `IpAddr` implements `FromParam<'a>` - `Ipv4Addr` implements `FromParam<'a>` - `Ipv6Addr` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - and $N others - -error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:9:13 - | -9 | fn f1(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromSegments<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | -3 | struct Q; - | ^^^^^^^^ -help: the following other types implement trait `FromSegments<'r>` - --> $WORKSPACE/core/lib/src/request/from_param.rs - | - | impl<'r> FromSegments<'r> for Segments<'r, Path> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Segments<'r, rkt::http::uri::fmt::Path>` implements `FromSegments<'r>` -... - | impl FromSegments<'_> for PathBuf { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `PathBuf` implements `FromSegments<'_>` -... - | impl<'r, T: FromSegments<'r>> FromSegments<'r> for Result { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Result>::Error>` implements `FromSegments<'r>` -... - | impl<'r, T: FromSegments<'r>> FromSegments<'r> for Option { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::option::Option` implements `FromSegments<'r>` - -error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:12:13 - | -12 | fn f2(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Q` to implement `FromForm<'_>` - -error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:15:13 - | -15 | fn f3(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromFormField<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> - and $N others - = note: required for `Q` to implement `FromForm<'_>` - -error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:18:13 - | -18 | fn f4(_foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromData<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromData<'r>`: - &'r RawStr - &'r [u8] - &'r str - Capped<&'r RawStr> - Capped<&'r [u8]> - Capped<&'r str> - Capped> - Capped> - and $N others - -error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:21:11 - | -21 | fn f5(_a: Q, _foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromRequest<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromRequest<'r>`: - &'r Accept - &'r ContentType - &'r CookieJar<'r> - &'r Endpoint - &'r Host<'r> - &'r Limits - &'r Route - &'r State - and $N others - -error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:21:20 - | -21 | fn f5(_a: Q, _foo: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromParam<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromParam<'a>`: - `&'a str` implements `FromParam<'a>` - `IpAddr` implements `FromParam<'a>` - `Ipv4Addr` implements `FromParam<'a>` - `Ipv6Addr` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - and $N others - -error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:24:11 - | -24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromRequest<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromRequest<'r>`: - &'r Accept - &'r ContentType - &'r CookieJar<'r> - &'r Endpoint - &'r Host<'r> - &'r Limits - &'r Route - &'r State - and $N others - -error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:24:20 - | -24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromParam<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromParam<'a>`: - `&'a str` implements `FromParam<'a>` - `IpAddr` implements `FromParam<'a>` - `Ipv4Addr` implements `FromParam<'a>` - `Ipv6Addr` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - and $N others - -error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> tests/ui-fail-stable/route-type-errors.rs:24:43 - | -24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - | ^ unsatisfied trait bound - | -help: the trait `FromParam<'_>` is not implemented for `Q` - --> tests/ui-fail-stable/route-type-errors.rs:3:1 - | - 3 | struct Q; - | ^^^^^^^^ - = help: the following other types implement trait `FromParam<'a>`: - `&'a str` implements `FromParam<'a>` - `IpAddr` implements `FromParam<'a>` - `Ipv4Addr` implements `FromParam<'a>` - `Ipv6Addr` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - `NonZero` implements `FromParam<'a>` - and $N others diff --git a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.rs b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.rs deleted file mode 100644 index 78f050e5b..000000000 --- a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.rs +++ /dev/null @@ -1,85 +0,0 @@ -#![allow(unused_variables)] - -#[macro_use] extern crate rkt; - -use rkt::request::FromParam; - -struct S; - -impl<'a> FromParam<'a> for S { - type Error = (); - fn from_param(param: &'a str) -> Result { Ok(S) } -} - -#[post("/")] -fn simple(id: usize) { } - -#[post("//")] -fn not_uri_display(id: i32, name: S) { } - -#[post("//")] -fn not_uri_display_but_unused(id: i32, name: S) { } - -#[post("//")] -fn optionals(id: Option, name: Result) { } - -use rkt::form::{FromFormField, Errors, ValueField, DataField}; - -#[rkt::async_trait] -impl<'v> FromFormField<'v> for S { - fn default() -> Option { None } - - fn from_value(_: ValueField<'v>) -> Result> { Ok(S) } - - async fn from_data(_: DataField<'v, '_>) -> Result> { Ok(S) } -} - -#[post("/?")] -fn simple_q(id: isize) { } - -#[post("/?&")] -fn other_q(id: usize, rest: S) { } - -#[post("/?&")] -fn optionals_q(id: Option, name: Result>) { } - -fn main() { - uri!(simple(id = "hi")); - - uri!(simple("hello")); - - uri!(simple(id = 239239i64)); - - uri!(not_uri_display(10, S)); - - // This one is okay. In paths, a value _must_ be supplied. - uri!(optionals(id = 10, name = "bob".to_string())); - - uri!(optionals(id = Some(10), name = Ok("bob".into()))); - - uri!(simple_q("hi")); - - uri!(simple_q(id = "hi")); - - uri!(other_q(100, S)); - - uri!(other_q(rest = S, id = 100)); - - uri!(other_q(rest = _, id = 100)); - - uri!(other_q(rest = S, id = _)); - - // These are all okay. - uri!(optionals_q(_, _)); - uri!(optionals_q(id = Some(10), name = Some("Bob".to_string()))); - uri!(optionals_q(_, Some("Bob".into()))); - uri!(optionals_q(id = _, name = _)); - - // Invalid prefixes. - uri!(uri!("?foo#bar"), simple(id = "hi")); - uri!(uri!("*"), simple(id = "hi")); - - // Invalid suffix. - uri!(_, simple(id = "hi"), uri!("*")); - uri!(_, simple(id = "hi"), uri!("/foo/bar")); -} diff --git a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr deleted file mode 100644 index 66ad32b71..000000000 --- a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr +++ /dev/null @@ -1,925 +0,0 @@ -error[E0271]: type mismatch resolving `>::Error == &str` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:24:37 - | -24 | fn optionals(id: Option, name: Result) { } - | ^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `Empty` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -47 | uri!(simple(id = "hi")); - | ----------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -49 | uri!(simple("hello")); - | --------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -51 | uri!(simple(id = 239239i64)); - | ---------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:18:35 - | -18 | fn not_uri_display(id: i32, name: S) { } - | ^ unsatisfied trait bound -... -53 | uri!(not_uri_display(10, S)); - | ---------------------------- in this macro invocation - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `rocket_uri_macro_not_uri_display` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:53:30 - | -53 | uri!(not_uri_display(10, S)); - | ^ unsatisfied trait bound - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:24:18 - | -24 | fn optionals(id: Option, name: Result) { } - | ^^^^^^^^^^^ the trait `FromUriParam>` is not implemented for `i32` -... -58 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); - | ------------------------------------------------------- in this macro invocation - | -help: `i32` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: required for `std::option::Option` to implement `FromUriParam>` - = note: this error originates in the macro `rocket_uri_macro_optionals` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:24:37 - | -24 | fn optionals(id: Option, name: Result) { } - | ^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam>` is not implemented for `std::string::String` -... -58 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); - | ------------------------------------------------------- in this macro invocation - | - = help: `std::string::String` implements trait `FromUriParam`: - FromUriParam - FromUriParam - FromUriParam - FromUriParam - FromUriParam - FromUriParam - = note: required for `Result` to implement `FromUriParam>` - = note: this error originates in the macro `rocket_uri_macro_optionals` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:38:17 - | -38 | fn simple_q(id: isize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `isize` -... -60 | uri!(simple_q("hi")); - | -------------------- in this macro invocation - | -help: `isize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple_q` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:38:17 - | -38 | fn simple_q(id: isize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `isize` -... -62 | uri!(simple_q(id = "hi")); - | ------------------------- in this macro invocation - | -help: `isize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple_q` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:41:29 - | -41 | fn other_q(id: usize, rest: S) { } - | ^ unsatisfied trait bound -... -64 | uri!(other_q(100, S)); - | --------------------- in this macro invocation - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:64:23 - | -64 | uri!(other_q(100, S)); - | ^ unsatisfied trait bound - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:41:29 - | -41 | fn other_q(id: usize, rest: S) { } - | ^ unsatisfied trait bound -... -66 | uri!(other_q(rest = S, id = 100)); - | --------------------------------- in this macro invocation - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:66:25 - | -66 | uri!(other_q(rest = S, id = 100)); - | ^ unsatisfied trait bound - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: Ignorable` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:68:25 - | -68 | uri!(other_q(rest = _, id = 100)); - | ^ unsatisfied trait bound - | -help: the trait `Ignorable` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ -help: the following other types implement trait `Ignorable

` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | impl Ignorable for Option {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::option::Option` - | impl Ignorable for Result {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Result` -note: required by a bound in `rkt::http::uri::fmt::assert_ignorable` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | pub fn assert_ignorable>() {} - | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` - -error[E0277]: the trait bound `usize: Ignorable` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:70:33 - | -70 | uri!(other_q(rest = S, id = _)); - | ^ the trait `Ignorable` is not implemented for `usize` - | -help: the following other types implement trait `Ignorable

` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | impl Ignorable for Option {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::option::Option` - | impl Ignorable for Result {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Result` -note: required by a bound in `rkt::http::uri::fmt::assert_ignorable` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | pub fn assert_ignorable>() {} - | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:41:29 - | -41 | fn other_q(id: usize, rest: S) { } - | ^ unsatisfied trait bound -... -70 | uri!(other_q(rest = S, id = _)); - | ------------------------------- in this macro invocation - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:70:25 - | -70 | uri!(other_q(rest = S, id = _)); - | ^ unsatisfied trait bound - | -help: the trait `FromUriParam` is not implemented for `S` - --> tests/ui-fail-stable/typed-uri-bad-type.rs:7:1 - | - 7 | struct S; - | ^^^^^^^^ - = help: the following other types implement trait `FromUriParam`: - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a [u8]` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - `&'a std::path::Path` implements `FromUriParam` - and $N others - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -79 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | ----------------------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `rkt::http::uri::Reference<'_>: rkt::http::uri::fmt::ValidRoutePrefix` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:79:15 - | -79 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | -----^^^^^^^^^^- - | | | - | | the trait `rkt::http::uri::fmt::ValidRoutePrefix` is not implemented for `rkt::http::uri::Reference<'_>` - | required by a bound introduced by this call - | -help: the following other types implement trait `rkt::http::uri::fmt::ValidRoutePrefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | impl<'a> ValidRoutePrefix for Origin<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Origin<'a>` -... - | impl<'a> ValidRoutePrefix for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` -note: required by a bound in `rkt::http::uri::fmt::RouteUriBuilder::with_prefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { - | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -80 | uri!(uri!("*"), simple(id = "hi")); - | ---------------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `rkt::http::uri::Asterisk: rkt::http::uri::fmt::ValidRoutePrefix` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:80:15 - | -80 | uri!(uri!("*"), simple(id = "hi")); - | -----^^^- - | | | - | | the trait `rkt::http::uri::fmt::ValidRoutePrefix` is not implemented for `rkt::http::uri::Asterisk` - | required by a bound introduced by this call - | -help: the following other types implement trait `rkt::http::uri::fmt::ValidRoutePrefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | impl<'a> ValidRoutePrefix for Origin<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Origin<'a>` -... - | impl<'a> ValidRoutePrefix for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` -note: required by a bound in `rkt::http::uri::fmt::RouteUriBuilder::with_prefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { - | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -83 | uri!(_, simple(id = "hi"), uri!("*")); - | ------------------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `rkt::http::uri::Asterisk: rkt::http::uri::fmt::ValidRouteSuffix>` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:83:37 - | -83 | uri!(_, simple(id = "hi"), uri!("*")); - | -----^^^- - | | | - | | the trait `rkt::http::uri::fmt::ValidRouteSuffix>` is not implemented for `rkt::http::uri::Asterisk` - | required by a bound introduced by this call - | -help: the following other types implement trait `rkt::http::uri::fmt::ValidRouteSuffix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | impl<'a> ValidRouteSuffix> for Reference<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Reference<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Reference<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Reference<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -note: required by a bound in `rkt::http::uri::fmt::RouteUriBuilder::with_suffix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri - | ----------- required by a bound in this associated function - | where - | S: ValidRouteSuffix>, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15 - | -15 | fn simple(id: usize) { } - | ^^^^^ the trait `FromUriParam` is not implemented for `usize` -... -84 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | -------------------------------------------- in this macro invocation - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `rkt::http::uri::Origin<'_>: rkt::http::uri::fmt::ValidRouteSuffix>` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:84:37 - | -84 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | -----^^^^^^^^^^- - | | | - | | the trait `rkt::http::uri::fmt::ValidRouteSuffix>` is not implemented for `rkt::http::uri::Origin<'_>` - | required by a bound introduced by this call - | -help: the following other types implement trait `rkt::http::uri::fmt::ValidRouteSuffix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | impl<'a> ValidRouteSuffix> for Reference<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Reference<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Reference<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Reference<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -... - | impl<'a> ValidRouteSuffix> for Absolute<'a> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `rkt::http::uri::Absolute<'a>` implements `rkt::http::uri::fmt::ValidRouteSuffix>` -note: required by a bound in `rkt::http::uri::fmt::RouteUriBuilder::with_suffix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri - | ----------- required by a bound in this associated function - | where - | S: ValidRouteSuffix>, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:47:22 - | -47 | uri!(simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:49:17 - | -49 | uri!(simple("hello")); - | ^^^^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:51:22 - | -51 | uri!(simple(id = 239239i64)); - | ^^^^^^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:58:25 - | -58 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); - | ^^^^^^^^ the trait `FromUriParam>` is not implemented for `i32` - | -help: `i32` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: required for `std::option::Option` to implement `FromUriParam>` - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:60:19 - | -60 | uri!(simple_q("hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `isize` - | -help: `isize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:62:24 - | -62 | uri!(simple_q(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `isize` - | -help: `isize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:79:40 - | -79 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:80:33 - | -80 | uri!(uri!("*"), simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:83:25 - | -83 | uri!(_, simple(id = "hi"), uri!("*")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> tests/ui-fail-stable/typed-uri-bad-type.rs:84:25 - | -84 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | -help: `usize` implements trait `FromUriParam` - --> $WORKSPACE/core/http/src/uri/fmt/from_uri_param.rs - | - | impl<$($l)*> $crate::uri::fmt::FromUriParam<$P, $A> for $B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `FromUriParam` - | `FromUriParam` - | `FromUriParam` -... - | / impl_from_uri_param_identity! { - | | String, - | | i8, i16, i32, i64, i128, isize, - | | u8, u16, u32, u64, u128, usize, -... | - | | time::Date, time::Time, time::PrimitiveDateTime, - | | } - | |_- in this macro invocation - = note: this error originates in the macro `::rkt::rocket_internal_uri` which comes from the expansion of the macro `impl_from_uri_param_identity` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr index 670e389de..561b75bb5 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr @@ -9,21 +9,21 @@ error: route expects 1 parameter but 2 were supplied --> tests/ui-fail-stable/typed-uris-bad-params.rs:71:18 | 71 | uri!(ignored(10, "10")); - | ^^^^^^^^ + | ^^ error: expected unnamed arguments due to ignored parameters ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39muri for route `ignored` ignores 1 path parameters: "/<_>"␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:69:18 | 69 | uri!(ignored(num = 10)); - | ^^^^^^^^ + | ^^^ error: route expects 1 parameter but 2 were supplied ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mroute `ignored` has uri "/<_>"␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:67:18 | 67 | uri!(ignored(10, 20)); - | ^^^^^^ + | ^^ error: path parameters cannot be ignored --> tests/ui-fail-stable/typed-uris-bad-params.rs:63:18 @@ -49,7 +49,7 @@ error: invalid parameters for `has_two` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:57:18 | 57 | uri!(has_two(id = 100, cookies = "hi")); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameter: `cookies`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:57:28 @@ -63,7 +63,7 @@ error: invalid parameters for `has_two` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:55:18 | 55 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameter: `cookies`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:55:18 @@ -83,7 +83,7 @@ error: invalid parameters for `has_two` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:53:18 | 53 | uri!(has_two(name = "hi")); - | ^^^^^^^^^^^ + | ^^^^ error: invalid parameters for `has_two` route uri ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39muri parameters are: id: i32, name: String␛[0m @@ -91,7 +91,7 @@ error: invalid parameters for `has_two` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:51:18 | 51 | uri!(has_two(id = 100, id = 100, )); - | ^^^^^^^^^^^^^^^^^^^ + | ^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mduplicate parameter: `id`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:51:28 @@ -104,7 +104,7 @@ error: invalid parameters for `has_one_guarded` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:49:26 | 49 | uri!(has_one_guarded(id = 100, cookies = "hi")); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameter: `cookies`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:49:36 @@ -117,7 +117,7 @@ error: invalid parameters for `has_one_guarded` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:47:26 | 47 | uri!(has_one_guarded(cookies = "hi", id = 100)); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameter: `cookies`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:47:26 @@ -131,7 +131,7 @@ error: invalid parameters for `has_one` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:45:18 | 45 | uri!(has_one(name = "hi")); - | ^^^^^^^^^^^ + | ^^^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameter: `name`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:45:18 @@ -144,7 +144,7 @@ error: invalid parameters for `has_one` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:43:18 | 43 | uri!(has_one(id = 100, id = 100, )); - | ^^^^^^^^^^^^^^^^^^^ + | ^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mduplicate parameter: `id`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:43:28 @@ -157,7 +157,7 @@ error: invalid parameters for `has_one` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:41:18 | 41 | uri!(has_one(id = 100, id = 100)); - | ^^^^^^^^^^^^^^^^^^ + | ^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39mduplicate parameter: `id`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:41:28 @@ -170,7 +170,7 @@ error: invalid parameters for `has_one` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:39:18 | 39 | uri!(has_one(name = 100, age = 50, id = 100, id = 50)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameters: `name`, `age`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:39:18 @@ -189,7 +189,7 @@ error: invalid parameters for `has_one` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18 | 37 | uri!(has_one(name = 100, age = 50, id = 100)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameters: `name`, `age`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18 @@ -202,7 +202,7 @@ error: invalid parameters for `has_one` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18 | 35 | uri!(has_one(name = 100, id = 100)); - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameter: `name`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18 @@ -215,7 +215,7 @@ error: invalid parameters for `has_one` route uri --> tests/ui-fail-stable/typed-uris-bad-params.rs:33:18 | 33 | uri!(has_one(id = 100, name = "hi")); - | ^^^^^^^^^^^^^^^^^^^^^ + | ^^ error: ␛[1;34m[␛[0m␛[1;36mhelp␛[0m␛[1;34m] ␛[0m␛[1;39munknown parameter: `name`␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:33:28 @@ -235,28 +235,28 @@ error: route expects 2 parameters but 3 were supplied --> tests/ui-fail-stable/typed-uris-bad-params.rs:30:18 | 30 | uri!(has_two(10, "hi", "there")); - | ^^^^^^^^^^^^^^^^^ + | ^^ error: route expects 1 parameter but 2 were supplied ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mroute `has_one_guarded` has uri "/"␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:28:26 | 28 | uri!(has_one_guarded("hi", 100)); - | ^^^^^^^^^ + | ^^^^ error: route expects 1 parameter but 2 were supplied ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mroute `has_one` has uri "/"␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:27:18 | 27 | uri!(has_one("Hello", 23, )); - | ^^^^^^^^^^^^ + | ^^^^^^^ error: route expects 1 parameter but 2 were supplied ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mroute `has_one` has uri "/"␛[0m --> tests/ui-fail-stable/typed-uris-bad-params.rs:26:18 | 26 | uri!(has_one(1, 23)); - | ^^^^^ + | ^ error: route expects 1 parameter but 0 were supplied ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mroute `has_one` has uri "/"␛[0m @@ -272,6 +272,12 @@ error: route expects 1 parameter but 0 were supplied 23 | uri!(has_one); | ^^^^^^^ +error[E0271]: type mismatch resolving `>::Error == &str` + --> tests/ui-fail-stable/typed-uris-bad-params.rs:17:37 + | +17 | fn optionals(id: Option, name: Result) { } + | ^^^^^^ expected `&str`, found `Empty` + error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uris-bad-params.rs:17:37 | diff --git a/core/codegen/tests/ui-fail-stable/typed-uris-invalid-syntax.stderr b/core/codegen/tests/ui-fail-stable/typed-uris-invalid-syntax.stderr index dada0e78e..770c0ec9a 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uris-invalid-syntax.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uris-invalid-syntax.stderr @@ -8,13 +8,13 @@ error: named and unnamed parameters cannot be mixed --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:11:17 | 11 | uri!(simple(id = 100, "Hello")); - | ^^^^^^^^^^^^^^^^^ + | ^^ error: named and unnamed parameters cannot be mixed --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:12:17 | 12 | uri!(simple("Hello", id = 100)); - | ^^^^^^^^^^^^^^^^^ + | ^^^^^^^ error: unexpected token --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:14:16 @@ -23,16 +23,16 @@ error: unexpected token | ^ error: invalid URI: unexpected EOF: expected token ':' at index 5 - --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:16:16 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:16:10 | 16 | uri!("mount", simple); - | ^ + | ^^^^^^^ error: invalid URI: unexpected EOF: expected token ':' at index 5 - --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:17:16 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:17:10 | 17 | uri!("mount", simple, "http://"); - | ^ + | ^^^^^^^ error: URI suffix must contain only query and/or fragment --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:18:28 @@ -47,10 +47,10 @@ error: expected 1, 2, or 3 arguments, found 4 | ^^^^^^ error: invalid URI: unexpected EOF: expected token ':' at index 5 - --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:20:16 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:20:10 | 20 | uri!("mount", simple(10, "hi"), "http://"); - | ^ + | ^^^^^^^ error: URI suffix must contain only query and/or fragment --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:21:38 @@ -77,10 +77,10 @@ error: expected 1, 2, or 3 arguments, found 4 | ^^^^^^ error: invalid URI: unexpected token '<' at index 7 - --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:25:18 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:25:10 | 25 | uri!("/mount/", simple); - | ^ + | ^^^^^^^^^^^^^ error: expected at least 1 argument, found none --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:26:5 @@ -103,10 +103,10 @@ error: unexpected end of input, expected an expression | ^ error: invalid URI: unexpected EOF: expected some token at index 0 - --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:29:11 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:29:10 | 29 | uri!("*", simple(10), "hi"); - | ^ + | ^^^ error: URI suffix must contain only query and/or fragment --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:30:40 diff --git a/core/codegen/tests/ui-fail-stable/uri_display.stderr b/core/codegen/tests/ui-fail-stable/uri_display.stderr index 9e934c8ee..913f7a4ea 100644 --- a/core/codegen/tests/ui-fail-stable/uri_display.stderr +++ b/core/codegen/tests/ui-fail-stable/uri_display.stderr @@ -2,7 +2,7 @@ error: fieldless structs are not supported --> tests/ui-fail-stable/uri_display.rs:4:1 | 4 | struct Foo1; - | ^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `UriDisplay`␛[0m --> tests/ui-fail-stable/uri_display.rs:3:10 @@ -16,7 +16,7 @@ error: fieldless structs are not supported --> tests/ui-fail-stable/uri_display.rs:7:1 | 7 | struct Foo2(); - | ^^^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `UriDisplay`␛[0m --> tests/ui-fail-stable/uri_display.rs:6:10 @@ -86,7 +86,7 @@ error: struct must have exactly one field --> tests/ui-fail-stable/uri_display.rs:30:1 | 30 | struct Foo8; - | ^^^^^^^^^^^^ + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `UriDisplay`␛[0m --> tests/ui-fail-stable/uri_display.rs:29:10 @@ -100,7 +100,7 @@ error: enums are not supported --> tests/ui-fail-stable/uri_display.rs:33:1 | 33 | enum Foo9 { } - | ^^^^^^^^^^^^^^ + | ^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `UriDisplay`␛[0m --> tests/ui-fail-stable/uri_display.rs:32:10 @@ -113,10 +113,8 @@ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurr error: named structs are not supported --> tests/ui-fail-stable/uri_display.rs:36:1 | -36 | / struct Foo10 { -37 | | named: usize -38 | | } - | |_^ +36 | struct Foo10 { + | ^^^^^^ error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39merror occurred while deriving `UriDisplay`␛[0m --> tests/ui-fail-stable/uri_display.rs:35:10 diff --git a/core/codegen/tests/ui-fail-stable/uri_display_type_errors.rs b/core/codegen/tests/ui-fail-stable/uri_display_type_errors.rs deleted file mode 100644 index b5ed0282e..000000000 --- a/core/codegen/tests/ui-fail-stable/uri_display_type_errors.rs +++ /dev/null @@ -1,42 +0,0 @@ -#[macro_use] extern crate rkt; - -struct BadType; - -#[derive(UriDisplayQuery)] -struct Bar1(BadType); - -#[derive(UriDisplayQuery)] -struct Bar2 { - field: BadType, -} - -#[derive(UriDisplayQuery)] -struct Bar3 { - field: String, - bad: BadType, -} - -#[derive(UriDisplayQuery)] -enum Bar4 { - Inner(BadType), -} - -#[derive(UriDisplayQuery)] -enum Bar5 { - Inner { - field: BadType, - }, -} - -#[derive(UriDisplayQuery)] -enum Bar6 { - Inner { - field: String, - other: BadType, - }, -} - -#[derive(UriDisplayPath)] -struct Baz(BadType); - -fn main() { } diff --git a/core/codegen/tests/ui-fail-stable/uri_display_type_errors.stderr b/core/codegen/tests/ui-fail-stable/uri_display_type_errors.stderr deleted file mode 100644 index 715b759dd..000000000 --- a/core/codegen/tests/ui-fail-stable/uri_display_type_errors.stderr +++ /dev/null @@ -1,205 +0,0 @@ -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-stable/uri_display_type_errors.rs:6:13 - | -6 | struct Bar1(BadType); - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-stable/uri_display_type_errors.rs:3:1 - | -3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'i, P>::write_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_value>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-stable/uri_display_type_errors.rs:10:5 - | -10 | field: BadType, - | ^^^^^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-stable/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'_, rkt::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-stable/uri_display_type_errors.rs:16:5 - | -16 | bad: BadType, - | ^^^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-stable/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'_, rkt::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-stable/uri_display_type_errors.rs:21:11 - | -21 | Inner(BadType), - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-stable/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'i, P>::write_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_value>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-stable/uri_display_type_errors.rs:27:9 - | -27 | field: BadType, - | ^^^^^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-stable/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'_, rkt::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-stable/uri_display_type_errors.rs:35:9 - | -35 | other: BadType, - | ^^^^^^^^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-stable/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ - = help: the following other types implement trait `UriDisplay

`: - BTreeMap - Bar1 - Bar2 - Bar3 - Bar4 - Bar5 - Bar6 - HashMap - and $N others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'_, rkt::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` - -error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-stable/uri_display_type_errors.rs:40:12 - | -40 | struct Baz(BadType); - | ^^^^^^^ unsatisfied trait bound - | -help: the trait `UriDisplay` is not implemented for `BadType` - --> tests/ui-fail-stable/uri_display_type_errors.rs:3:1 - | - 3 | struct BadType; - | ^^^^^^^^^^^^^^ -help: the following other types implement trait `UriDisplay

` - --> tests/ui-fail-stable/uri_display_type_errors.rs:39:10 - | -39 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ `Baz` - | - ::: $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | impl UriDisplay for path::Path { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::path::Path` -... - | impl UriDisplay for path::PathBuf { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `PathBuf` - = note: required for `&BadType` to implement `UriDisplay` -note: required by a bound in `rkt::http::uri::fmt::Formatter::<'i, P>::write_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_value>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` - = note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail/catch_type_errors.rs b/core/codegen/tests/ui-fail/catch_type_errors.rs deleted file mode 100644 index 16a0d6c08..000000000 --- a/core/codegen/tests/ui-fail/catch_type_errors.rs +++ /dev/null @@ -1,25 +0,0 @@ -#[macro_use] extern crate rkt; - -use rkt::Request; - -#[catch(404)] -fn f1(_request: &Request) -> usize { - 10 -} - -#[catch(404)] -fn f2(_request: &Request) -> bool { - false -} - -#[catch(404)] -fn f3(_request: bool) -> usize { - 10 -} - -#[catch(404)] -fn f4() -> usize { - 10 -} - -fn main() { } diff --git a/core/codegen/tests/ui-fail/from_form_type_errors.rs b/core/codegen/tests/ui-fail/from_form_type_errors.rs deleted file mode 100644 index 4d6de4fd1..000000000 --- a/core/codegen/tests/ui-fail/from_form_type_errors.rs +++ /dev/null @@ -1,17 +0,0 @@ -#[macro_use] extern crate rkt; - -struct Unknown; - -#[derive(FromForm)] -struct BadType3 { - field: Unknown, -} - -struct Foo(T); - -#[derive(FromForm)] -struct Other { - field: Foo, -} - -fn main() { } diff --git a/core/codegen/tests/ui-fail/responder-types.rs b/core/codegen/tests/ui-fail/responder-types.rs deleted file mode 100644 index 97fd9e0bb..000000000 --- a/core/codegen/tests/ui-fail/responder-types.rs +++ /dev/null @@ -1,30 +0,0 @@ -#[macro_use] extern crate rkt; - -#[derive(Responder)] -struct Thing1 { - thing: u8, -} - -#[derive(Responder)] -struct Thing2 { - thing: String, - other: u8, -} - -#[derive(Responder)] -struct Thing3 { - thing: u8, - other: u8, -} - -#[derive(Responder)] -struct Thing4 { - thing: String, - other: rkt::http::ContentType, - then: String, -} - -#[get("/")] -fn foo() -> usize { 0 } - -fn main() { } diff --git a/core/codegen/tests/ui-fail/route-type-errors.rs b/core/codegen/tests/ui-fail/route-type-errors.rs deleted file mode 100644 index f303109a9..000000000 --- a/core/codegen/tests/ui-fail/route-type-errors.rs +++ /dev/null @@ -1,26 +0,0 @@ -#[macro_use] extern crate rkt; - -struct Q; - -#[get("/<_foo>")] -fn f0(_foo: Q) {} - -#[get("/<_foo..>")] -fn f1(_foo: Q) {} - -#[get("/?<_foo>")] -fn f2(_foo: Q) {} - -#[get("/?<_foo..>")] -fn f3(_foo: Q) {} - -#[post("/", data = "<_foo>")] -fn f4(_foo: Q) {} - -#[get("/<_foo>")] -fn f5(_a: Q, _foo: Q) {} - -#[get("/<_foo>/other/<_bar>/<_good>/okay")] -fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {} - -fn main() { } diff --git a/core/codegen/tests/ui-fail/typed-uri-bad-type.rs b/core/codegen/tests/ui-fail/typed-uri-bad-type.rs deleted file mode 100644 index 78f050e5b..000000000 --- a/core/codegen/tests/ui-fail/typed-uri-bad-type.rs +++ /dev/null @@ -1,85 +0,0 @@ -#![allow(unused_variables)] - -#[macro_use] extern crate rkt; - -use rkt::request::FromParam; - -struct S; - -impl<'a> FromParam<'a> for S { - type Error = (); - fn from_param(param: &'a str) -> Result { Ok(S) } -} - -#[post("/")] -fn simple(id: usize) { } - -#[post("//")] -fn not_uri_display(id: i32, name: S) { } - -#[post("//")] -fn not_uri_display_but_unused(id: i32, name: S) { } - -#[post("//")] -fn optionals(id: Option, name: Result) { } - -use rkt::form::{FromFormField, Errors, ValueField, DataField}; - -#[rkt::async_trait] -impl<'v> FromFormField<'v> for S { - fn default() -> Option { None } - - fn from_value(_: ValueField<'v>) -> Result> { Ok(S) } - - async fn from_data(_: DataField<'v, '_>) -> Result> { Ok(S) } -} - -#[post("/?")] -fn simple_q(id: isize) { } - -#[post("/?&")] -fn other_q(id: usize, rest: S) { } - -#[post("/?&")] -fn optionals_q(id: Option, name: Result>) { } - -fn main() { - uri!(simple(id = "hi")); - - uri!(simple("hello")); - - uri!(simple(id = 239239i64)); - - uri!(not_uri_display(10, S)); - - // This one is okay. In paths, a value _must_ be supplied. - uri!(optionals(id = 10, name = "bob".to_string())); - - uri!(optionals(id = Some(10), name = Ok("bob".into()))); - - uri!(simple_q("hi")); - - uri!(simple_q(id = "hi")); - - uri!(other_q(100, S)); - - uri!(other_q(rest = S, id = 100)); - - uri!(other_q(rest = _, id = 100)); - - uri!(other_q(rest = S, id = _)); - - // These are all okay. - uri!(optionals_q(_, _)); - uri!(optionals_q(id = Some(10), name = Some("Bob".to_string()))); - uri!(optionals_q(_, Some("Bob".into()))); - uri!(optionals_q(id = _, name = _)); - - // Invalid prefixes. - uri!(uri!("?foo#bar"), simple(id = "hi")); - uri!(uri!("*"), simple(id = "hi")); - - // Invalid suffix. - uri!(_, simple(id = "hi"), uri!("*")); - uri!(_, simple(id = "hi"), uri!("/foo/bar")); -} diff --git a/core/codegen/tests/ui-fail/uri_display_type_errors.rs b/core/codegen/tests/ui-fail/uri_display_type_errors.rs deleted file mode 100644 index b5ed0282e..000000000 --- a/core/codegen/tests/ui-fail/uri_display_type_errors.rs +++ /dev/null @@ -1,42 +0,0 @@ -#[macro_use] extern crate rkt; - -struct BadType; - -#[derive(UriDisplayQuery)] -struct Bar1(BadType); - -#[derive(UriDisplayQuery)] -struct Bar2 { - field: BadType, -} - -#[derive(UriDisplayQuery)] -struct Bar3 { - field: String, - bad: BadType, -} - -#[derive(UriDisplayQuery)] -enum Bar4 { - Inner(BadType), -} - -#[derive(UriDisplayQuery)] -enum Bar5 { - Inner { - field: BadType, - }, -} - -#[derive(UriDisplayQuery)] -enum Bar6 { - Inner { - field: String, - other: BadType, - }, -} - -#[derive(UriDisplayPath)] -struct Baz(BadType); - -fn main() { }