From 0ba5aac53e553926255dfd4c4d7875ac39e7cd2a Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Wed, 16 Feb 2022 10:08:55 -0800 Subject: [PATCH] Update codebase for latest nightly and stable. --- .../ui-fail-nightly/database-syntax.stderr | 32 +- .../ui-fail-nightly/database-types.stderr | 12 +- .../ui-fail-stable/database-types.stderr | 14 +- contrib/sync_db_pools/codegen/src/database.rs | 5 +- .../ui-fail-nightly/database-syntax.stderr | 18 +- .../ui-fail-nightly/database-types.stderr | 12 +- .../ui-fail-stable/database-syntax.stderr | 20 +- .../ui-fail-stable/database-types.stderr | 14 +- .../tests/ui-fail-nightly/async-entry.stderr | 46 +- .../bad-ignored-segments.stderr | 4 +- .../tests/ui-fail-nightly/catch.stderr | 20 +- .../ui-fail-nightly/catch_type_errors.stderr | 66 +-- .../tests/ui-fail-nightly/catchers.stderr | 6 +- .../tests/ui-fail-nightly/from_form.stderr | 148 +++--- .../ui-fail-nightly/from_form_field.stderr | 96 ++-- .../from_form_type_errors.stderr | 4 +- .../ui-fail-nightly/responder-types.stderr | 125 ++--- .../tests/ui-fail-nightly/responder.stderr | 44 +- .../route-attribute-general-syntax.stderr | 64 +-- .../route-path-bad-syntax.stderr | 66 +-- .../ui-fail-nightly/route-type-errors.stderr | 116 ++--- .../ui-fail-nightly/route-warnings.stderr | 16 +- .../tests/ui-fail-nightly/routes.stderr | 6 +- .../ui-fail-nightly/typed-uri-bad-type.stderr | 429 +++++++++--------- .../typed-uris-bad-params.stderr | 84 ++-- .../typed-uris-invalid-syntax.stderr | 52 +-- .../tests/ui-fail-nightly/uri_display.stderr | 36 +- .../uri_display_type_errors.stderr | 131 ++++-- .../tests/ui-fail-stable/async-entry.stderr | 46 +- .../bad-ignored-segments.stderr | 8 +- .../codegen/tests/ui-fail-stable/catch.stderr | 36 +- .../ui-fail-stable/catch_type_errors.stderr | 26 +- .../tests/ui-fail-stable/from_form.stderr | 170 +++---- .../ui-fail-stable/responder-types.stderr | 111 +++-- .../route-attribute-general-syntax.stderr | 84 ++-- .../route-path-bad-syntax.stderr | 96 ++-- .../ui-fail-stable/route-type-errors.stderr | 63 +-- .../ui-fail-stable/typed-uri-bad-type.stderr | 137 +++--- .../typed-uris-bad-params.stderr | 140 +++--- .../typed-uris-invalid-syntax.stderr | 56 +-- .../uri_display_type_errors.stderr | 131 ++++-- core/http/src/ext.rs | 3 + core/lib/src/request/request.rs | 1 + core/lib/src/response/stream/sse.rs | 3 + core/lib/src/route/uri.rs | 6 +- core/lib/tests/form-validation-names.rs | 3 + 46 files changed, 1403 insertions(+), 1403 deletions(-) diff --git a/contrib/db_pools/codegen/tests/ui-fail-nightly/database-syntax.stderr b/contrib/db_pools/codegen/tests/ui-fail-nightly/database-syntax.stderr index 96b79e34..052998ea 100644 --- a/contrib/db_pools/codegen/tests/ui-fail-nightly/database-syntax.stderr +++ b/contrib/db_pools/codegen/tests/ui-fail-nightly/database-syntax.stderr @@ -1,99 +1,99 @@ error: invalid value: expected string literal - --> $DIR/database-syntax.rs:4:12 + --> tests/ui-fail-nightly/database-syntax.rs:4:12 | 4 | #[database(123)] | ^^^ | note: error occurred while deriving `Database` - --> $DIR/database-syntax.rs:3:10 + --> tests/ui-fail-nightly/database-syntax.rs:3:10 | 3 | #[derive(Database)] | ^^^^^^^^ = note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected key/value `key = value` - --> $DIR/database-syntax.rs:8:25 + --> tests/ui-fail-nightly/database-syntax.rs:8:25 | 8 | #[database("some-name", "another")] | ^^^^^^^^^ | note: error occurred while deriving `Database` - --> $DIR/database-syntax.rs:7:10 + --> tests/ui-fail-nightly/database-syntax.rs:7:10 | 7 | #[derive(Database)] | ^^^^^^^^ = note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected attribute parameter: `name` - --> $DIR/database-syntax.rs:12:25 + --> tests/ui-fail-nightly/database-syntax.rs:12:25 | 12 | #[database("some-name", name = "another")] | ^^^^^^^^^^^^^^^^ | note: error occurred while deriving `Database` - --> $DIR/database-syntax.rs:11:10 + --> tests/ui-fail-nightly/database-syntax.rs:11:10 | 11 | #[derive(Database)] | ^^^^^^^^ = note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info) error: enums are not supported - --> $DIR/database-syntax.rs:16:1 + --> tests/ui-fail-nightly/database-syntax.rs:16:1 | 16 | / #[database("foo")] 17 | | enum D { } | |___________^ | note: error occurred while deriving `Database` - --> $DIR/database-syntax.rs:15:10 + --> tests/ui-fail-nightly/database-syntax.rs:15:10 | 15 | #[derive(Database)] | ^^^^^^^^ = note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info) error: missing `#[database("name")]` attribute - --> $DIR/database-syntax.rs:20:1 + --> tests/ui-fail-nightly/database-syntax.rs:20:1 | 20 | struct E(deadpool_postgres::Pool); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: error occurred while deriving `Database` - --> $DIR/database-syntax.rs:19:10 + --> tests/ui-fail-nightly/database-syntax.rs:19:10 | 19 | #[derive(Database)] | ^^^^^^^^ = note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info) error: struct must have exactly one unnamed field - --> $DIR/database-syntax.rs:23:1 + --> tests/ui-fail-nightly/database-syntax.rs:23:1 | 23 | / #[database("foo")] 24 | | struct F; | |_________^ | note: error occurred while deriving `Database` - --> $DIR/database-syntax.rs:22:10 + --> tests/ui-fail-nightly/database-syntax.rs:22:10 | 22 | #[derive(Database)] | ^^^^^^^^ = note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info) error: struct must have exactly one unnamed field - --> $DIR/database-syntax.rs:27:1 + --> tests/ui-fail-nightly/database-syntax.rs:27:1 | 27 | / #[database("foo")] 28 | | struct G(deadpool_postgres::Pool, deadpool_postgres::Pool); | |___________________________________________________________^ | note: error occurred while deriving `Database` - --> $DIR/database-syntax.rs:26:10 + --> tests/ui-fail-nightly/database-syntax.rs:26:10 | 26 | #[derive(Database)] | ^^^^^^^^ = note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info) error: named structs are not supported - --> $DIR/database-syntax.rs:31:1 + --> tests/ui-fail-nightly/database-syntax.rs:31:1 | 31 | / #[database("foo")] 32 | | struct H { @@ -102,7 +102,7 @@ error: named structs are not supported | |_^ | note: error occurred while deriving `Database` - --> $DIR/database-syntax.rs:30:10 + --> tests/ui-fail-nightly/database-syntax.rs:30:10 | 30 | #[derive(Database)] | ^^^^^^^^ diff --git a/contrib/db_pools/codegen/tests/ui-fail-nightly/database-types.stderr b/contrib/db_pools/codegen/tests/ui-fail-nightly/database-types.stderr index 3574666b..2911ff25 100644 --- a/contrib/db_pools/codegen/tests/ui-fail-nightly/database-types.stderr +++ b/contrib/db_pools/codegen/tests/ui-fail-nightly/database-types.stderr @@ -1,23 +1,23 @@ error[E0277]: the trait bound `Unknown: Pool` is not satisfied - --> $DIR/database-types.rs:7:10 + --> tests/ui-fail-nightly/database-types.rs:7:10 | 7 | struct A(Unknown); | ^^^^^^^ the trait `Pool` is not implemented for `Unknown` | note: required by a bound in `rocket_db_pools::Database::Pool` - --> $DIR/database.rs:41:16 + --> $WORKSPACE/contrib/db_pools/lib/src/database.rs | -41 | type Pool: Pool; + | type Pool: Pool; | ^^^^ required by this bound in `rocket_db_pools::Database::Pool` error[E0277]: the trait bound `Vec: Pool` is not satisfied - --> $DIR/database-types.rs:11:10 + --> tests/ui-fail-nightly/database-types.rs:11:10 | 11 | struct B(Vec); | ^^^^^^^^ the trait `Pool` is not implemented for `Vec` | note: required by a bound in `rocket_db_pools::Database::Pool` - --> $DIR/database.rs:41:16 + --> $WORKSPACE/contrib/db_pools/lib/src/database.rs | -41 | type Pool: Pool; + | type Pool: Pool; | ^^^^ required by this bound in `rocket_db_pools::Database::Pool` diff --git a/contrib/db_pools/codegen/tests/ui-fail-stable/database-types.stderr b/contrib/db_pools/codegen/tests/ui-fail-stable/database-types.stderr index 30b52af1..4e1bec5e 100644 --- a/contrib/db_pools/codegen/tests/ui-fail-stable/database-types.stderr +++ b/contrib/db_pools/codegen/tests/ui-fail-stable/database-types.stderr @@ -1,21 +1,23 @@ error[E0277]: the trait bound `Unknown: Pool` is not satisfied - --> $DIR/database-types.rs:7:10 + --> tests/ui-fail-stable/database-types.rs:7:10 | 7 | struct A(Unknown); | ^^^^^^^ the trait `Pool` is not implemented for `Unknown` | - ::: $WORKSPACE/contrib/db_pools/lib/src/database.rs +note: required by a bound in `rocket_db_pools::Database::Pool` + --> $WORKSPACE/contrib/db_pools/lib/src/database.rs | | type Pool: Pool; - | ---- required by this bound in `rocket_db_pools::Database::Pool` + | ^^^^ required by this bound in `rocket_db_pools::Database::Pool` error[E0277]: the trait bound `Vec: Pool` is not satisfied - --> $DIR/database-types.rs:11:10 + --> tests/ui-fail-stable/database-types.rs:11:10 | 11 | struct B(Vec); | ^^^ the trait `Pool` is not implemented for `Vec` | - ::: $WORKSPACE/contrib/db_pools/lib/src/database.rs +note: required by a bound in `rocket_db_pools::Database::Pool` + --> $WORKSPACE/contrib/db_pools/lib/src/database.rs | | type Pool: Pool; - | ---- required by this bound in `rocket_db_pools::Database::Pool` + | ^^^^ required by this bound in `rocket_db_pools::Database::Pool` diff --git a/contrib/sync_db_pools/codegen/src/database.rs b/contrib/sync_db_pools/codegen/src/database.rs index 989cc0a6..8ec5e4e9 100644 --- a/contrib/sync_db_pools/codegen/src/database.rs +++ b/contrib/sync_db_pools/codegen/src/database.rs @@ -1,7 +1,7 @@ use proc_macro::TokenStream; use devise::{Spanned, Result, ext::SpanDiagnosticExt}; -use crate::syn::{DataStruct, Fields, Data, Type, LitStr, DeriveInput, Ident, Visibility}; +use crate::syn::{Fields, Data, Type, LitStr, DeriveInput, Ident, Visibility}; #[derive(Debug)] struct DatabaseInvocation { @@ -11,8 +11,6 @@ struct DatabaseInvocation { visibility: Visibility, /// The database name as passed in via #[database('database name')]. db_name: String, - /// The entire structure that the `database` attribute was called on. - structure: DataStruct, /// The type inside the structure: struct MyDb(ThisType). connection_type: Type, } @@ -47,7 +45,6 @@ fn parse_invocation(attr: TokenStream, input: TokenStream) -> Result $DIR/database-syntax.rs:6:1 + --> tests/ui-fail-nightly/database-syntax.rs:6:1 | 6 | #[database] | ^^^^^^^^^^^ @@ -7,31 +7,31 @@ error: unexpected end of input, expected string literal = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected string literal - --> $DIR/database-syntax.rs:9:12 + --> tests/ui-fail-nightly/database-syntax.rs:9:12 | 9 | #[database(1)] | ^ error: expected string literal - --> $DIR/database-syntax.rs:12:12 + --> tests/ui-fail-nightly/database-syntax.rs:12:12 | 12 | #[database(123)] | ^^^ error: unexpected token - --> $DIR/database-syntax.rs:15:20 + --> tests/ui-fail-nightly/database-syntax.rs:15:20 | 15 | #[database("hello" "hi")] | ^^^^ error: `database` attribute can only be used on structs - --> $DIR/database-syntax.rs:19:1 + --> tests/ui-fail-nightly/database-syntax.rs:19:1 | 19 | enum Foo { } | ^^^^^^^^^^^^^ error: `database` attribute can only be applied to structs with exactly one unnamed field - --> $DIR/database-syntax.rs:22:11 + --> tests/ui-fail-nightly/database-syntax.rs:22:11 | 22 | struct Bar(diesel::SqliteConnection, diesel::SqliteConnection); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -39,19 +39,19 @@ error: `database` attribute can only be applied to structs with exactly one unna = help: example: `struct MyDatabase(diesel::SqliteConnection);` error: `database` attribute can only be used on structs - --> $DIR/database-syntax.rs:25:1 + --> tests/ui-fail-nightly/database-syntax.rs:25:1 | 25 | union Baz { } | ^^^^^^^^^^^^^^ error: `database` attribute cannot be applied to structs with generics - --> $DIR/database-syntax.rs:28:9 + --> tests/ui-fail-nightly/database-syntax.rs:28:9 | 28 | struct E<'r>(&'r str); | ^^^^ error: `database` attribute cannot be applied to structs with generics - --> $DIR/database-syntax.rs:31:9 + --> tests/ui-fail-nightly/database-syntax.rs:31:9 | 31 | struct F(T); | ^^^ diff --git a/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-types.stderr b/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-types.stderr index 7143b4a8..2987650f 100644 --- a/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-types.stderr +++ b/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-types.stderr @@ -1,23 +1,23 @@ error[E0277]: the trait bound `Unknown: Poolable` is not satisfied - --> $DIR/database-types.rs:6:10 + --> tests/ui-fail-nightly/database-types.rs:6:10 | 6 | struct A(Unknown); | ^^^^^^^ the trait `Poolable` is not implemented for `Unknown` | note: required by a bound in `rocket_sync_db_pools::Connection` - --> $DIR/connection.rs:44:29 + --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs | -44 | pub struct Connection { + | pub struct Connection { | ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection` error[E0277]: the trait bound `Vec: Poolable` is not satisfied - --> $DIR/database-types.rs:9:10 + --> tests/ui-fail-nightly/database-types.rs:9:10 | 9 | struct B(Vec); | ^^^^^^^^ the trait `Poolable` is not implemented for `Vec` | note: required by a bound in `rocket_sync_db_pools::Connection` - --> $DIR/connection.rs:44:29 + --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs | -44 | pub struct Connection { + | pub struct Connection { | ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection` diff --git a/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr b/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr index 35c0ad99..6e532315 100644 --- a/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr +++ b/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr @@ -1,5 +1,5 @@ error: unexpected end of input, expected string literal - --> $DIR/database-syntax.rs:6:1 + --> tests/ui-fail-stable/database-syntax.rs:6:1 | 6 | #[database] | ^^^^^^^^^^^ @@ -7,50 +7,50 @@ error: unexpected end of input, expected string literal = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected string literal - --> $DIR/database-syntax.rs:9:12 + --> tests/ui-fail-stable/database-syntax.rs:9:12 | 9 | #[database(1)] | ^ error: expected string literal - --> $DIR/database-syntax.rs:12:12 + --> tests/ui-fail-stable/database-syntax.rs:12:12 | 12 | #[database(123)] | ^^^ error: unexpected token - --> $DIR/database-syntax.rs:15:20 + --> tests/ui-fail-stable/database-syntax.rs:15:20 | 15 | #[database("hello" "hi")] | ^^^^ error: `database` attribute can only be used on structs - --> $DIR/database-syntax.rs:19:1 + --> tests/ui-fail-stable/database-syntax.rs:19:1 | 19 | enum Foo { } | ^^^^ error: `database` attribute can only be applied to structs with exactly one unnamed field - --- help: example: `struct MyDatabase(diesel::SqliteConnection);` - --> $DIR/database-syntax.rs:22:11 + --- help: example: `struct MyDatabase(diesel::SqliteConnection);` + --> tests/ui-fail-stable/database-syntax.rs:22:11 | 22 | struct Bar(diesel::SqliteConnection, diesel::SqliteConnection); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `database` attribute can only be used on structs - --> $DIR/database-syntax.rs:25:1 + --> tests/ui-fail-stable/database-syntax.rs:25:1 | 25 | union Baz { } | ^^^^^ error: `database` attribute cannot be applied to structs with generics - --> $DIR/database-syntax.rs:28:9 + --> tests/ui-fail-stable/database-syntax.rs:28:9 | 28 | struct E<'r>(&'r str); | ^ error: `database` attribute cannot be applied to structs with generics - --> $DIR/database-syntax.rs:31:9 + --> tests/ui-fail-stable/database-syntax.rs:31:9 | 31 | struct F(T); | ^ diff --git a/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-types.stderr b/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-types.stderr index 65e3ed8f..ab23da6a 100644 --- a/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-types.stderr +++ b/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-types.stderr @@ -1,21 +1,23 @@ error[E0277]: the trait bound `Unknown: Poolable` is not satisfied - --> $DIR/database-types.rs:6:10 + --> tests/ui-fail-stable/database-types.rs:6:10 | 6 | struct A(Unknown); | ^^^^^^^ the trait `Poolable` is not implemented for `Unknown` | - ::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs +note: required by a bound in `rocket_sync_db_pools::Connection` + --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs | | pub struct Connection { - | -------- required by this bound in `rocket_sync_db_pools::Connection` + | ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection` error[E0277]: the trait bound `Vec: Poolable` is not satisfied - --> $DIR/database-types.rs:9:10 + --> tests/ui-fail-stable/database-types.rs:9:10 | 9 | struct B(Vec); | ^^^ the trait `Poolable` is not implemented for `Vec` | - ::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs +note: required by a bound in `rocket_sync_db_pools::Connection` + --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs | | pub struct Connection { - | -------- required by this bound in `rocket_sync_db_pools::Connection` + | ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection` diff --git a/core/codegen/tests/ui-fail-nightly/async-entry.stderr b/core/codegen/tests/ui-fail-nightly/async-entry.stderr index 60447483..3949b02f 100644 --- a/core/codegen/tests/ui-fail-nightly/async-entry.stderr +++ b/core/codegen/tests/ui-fail-nightly/async-entry.stderr @@ -1,120 +1,120 @@ error: attribute can only be applied to `async` functions - --> $DIR/async-entry.rs:4:5 + --> tests/ui-fail-nightly/async-entry.rs:4:5 | 4 | #[rocket::main] | ^^^^^^^^^^^^^^^ | note: this function must be `async` - --> $DIR/async-entry.rs:5:5 + --> tests/ui-fail-nightly/async-entry.rs:5:5 | 5 | fn foo() { } | ^^^^^^^^ = note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info) warning: attribute is typically applied to `main` function - --> $DIR/async-entry.rs:10:5 + --> tests/ui-fail-nightly/async-entry.rs:10:5 | 10 | #[rocket::main] | ^^^^^^^^^^^^^^^ | note: this function is not `main` - --> $DIR/async-entry.rs:11:14 + --> tests/ui-fail-nightly/async-entry.rs:11:14 | 11 | async fn foo() { } | ^^^ = note: this warning originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info) error: attribute can only be applied to `async` functions - --> $DIR/async-entry.rs:16:5 + --> tests/ui-fail-nightly/async-entry.rs:16:5 | 16 | #[rocket::main] | ^^^^^^^^^^^^^^^ | note: this function must be `async` - --> $DIR/async-entry.rs:17:5 + --> tests/ui-fail-nightly/async-entry.rs:17:5 | 17 | fn main() { | ^^^^^^^^^ = note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info) error: attribute cannot be applied to `main` function - --> $DIR/async-entry.rs:49:5 + --> tests/ui-fail-nightly/async-entry.rs:49:5 | 49 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ | = note: this attribute generates a `main` function note: this function cannot be `main` - --> $DIR/async-entry.rs:50:8 + --> tests/ui-fail-nightly/async-entry.rs:50:8 | 50 | fn main() -> rocekt::Rocket { | ^^^^ = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: attribute can only be applied to functions that return a value - --> $DIR/async-entry.rs:56:5 + --> tests/ui-fail-nightly/async-entry.rs:56:5 | 56 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ | note: this function must return a value - --> $DIR/async-entry.rs:57:5 + --> tests/ui-fail-nightly/async-entry.rs:57:5 | 57 | async fn rocket() { | ^^^^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: attribute can only be applied to functions that return a value - --> $DIR/async-entry.rs:64:5 + --> tests/ui-fail-nightly/async-entry.rs:64:5 | 64 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ | note: this function must return a value - --> $DIR/async-entry.rs:65:5 + --> tests/ui-fail-nightly/async-entry.rs:65:5 | 65 | fn rocket() { | ^^^^^^^^^^^ = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: attribute cannot be applied to `main` function - --> $DIR/async-entry.rs:79:5 + --> tests/ui-fail-nightly/async-entry.rs:79:5 | 79 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ | = note: this attribute generates a `main` function note: this function cannot be `main` - --> $DIR/async-entry.rs:80:8 + --> tests/ui-fail-nightly/async-entry.rs:80:8 | 80 | fn main() -> &'static str { | ^^^^ = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: attribute cannot be applied to `main` function - --> $DIR/async-entry.rs:87:5 + --> tests/ui-fail-nightly/async-entry.rs:87:5 | 87 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ | = note: this attribute generates a `main` function note: this function cannot be `main` - --> $DIR/async-entry.rs:88:14 + --> tests/ui-fail-nightly/async-entry.rs:88:14 | 88 | async fn main() -> _ { | ^^^^ = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/async-entry.rs:73:17 + --> tests/ui-fail-nightly/async-entry.rs:73:41 | 72 | fn rocket() -> _ { | ------ this is not `async` 73 | let _ = rocket::build().launch().await; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks + | ^^^^^^ only allowed inside `async` functions and blocks error[E0308]: mismatched types - --> $DIR/async-entry.rs:35:9 + --> tests/ui-fail-nightly/async-entry.rs:35:9 | 35 | rocket::build() | ^^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `Rocket` @@ -123,7 +123,7 @@ error[E0308]: mismatched types found struct `Rocket` error[E0308]: mismatched types - --> $DIR/async-entry.rs:44:9 + --> tests/ui-fail-nightly/async-entry.rs:44:9 | 44 | "hi".to_string() | ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `std::string::String` @@ -132,7 +132,7 @@ error[E0308]: mismatched types found struct `std::string::String` error[E0308]: mismatched types - --> $DIR/async-entry.rs:24:21 + --> tests/ui-fail-nightly/async-entry.rs:24:21 | 24 | async fn main() { | ^ expected `()` because of default return type @@ -148,7 +148,7 @@ error[E0308]: mismatched types found struct `Rocket` error[E0308]: mismatched types - --> $DIR/async-entry.rs:33:26 + --> tests/ui-fail-nightly/async-entry.rs:33:26 | 33 | async fn rocket() -> String { | ^^^^^^ @@ -160,7 +160,7 @@ error[E0308]: mismatched types found struct `std::string::String` error[E0277]: `main` has invalid return type `Rocket` - --> $DIR/async-entry.rs:94:20 + --> tests/ui-fail-nightly/async-entry.rs:94:20 | 94 | async fn main() -> rocket::Rocket { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination` diff --git a/core/codegen/tests/ui-fail-nightly/bad-ignored-segments.stderr b/core/codegen/tests/ui-fail-nightly/bad-ignored-segments.stderr index ce8b42f6..6a1d4acf 100644 --- a/core/codegen/tests/ui-fail-nightly/bad-ignored-segments.stderr +++ b/core/codegen/tests/ui-fail-nightly/bad-ignored-segments.stderr @@ -1,5 +1,5 @@ error: parameter must be named - --> $DIR/bad-ignored-segments.rs:6:12 + --> tests/ui-fail-nightly/bad-ignored-segments.rs:6:12 | 6 | #[get("/c?<_>")] | ^ @@ -7,7 +7,7 @@ error: parameter must be named = help: use a name such as `_guard` or `_param` error: parameter must be named - --> $DIR/bad-ignored-segments.rs:9:22 + --> tests/ui-fail-nightly/bad-ignored-segments.rs:9:22 | 9 | #[post("/d", data = "<_>")] | ^^^ diff --git a/core/codegen/tests/ui-fail-nightly/catch.stderr b/core/codegen/tests/ui-fail-nightly/catch.stderr index 14a830f5..2989a7bb 100644 --- a/core/codegen/tests/ui-fail-nightly/catch.stderr +++ b/core/codegen/tests/ui-fail-nightly/catch.stderr @@ -1,5 +1,5 @@ error: expected `fn` - --> $DIR/catch.rs:6:1 + --> tests/ui-fail-nightly/catch.rs:6:1 | 6 | struct Catcher(String); | ^^^^^^ @@ -7,7 +7,7 @@ error: expected `fn` = help: `#[catch]` can only be used on functions error: expected `fn` - --> $DIR/catch.rs:9:7 + --> tests/ui-fail-nightly/catch.rs:9:7 | 9 | const CATCH: &str = "Catcher"; | ^^^^^ @@ -15,7 +15,7 @@ error: expected `fn` = help: `#[catch]` can only be used on functions error: expected integer or `default`, found string literal - --> $DIR/catch.rs:11:9 + --> tests/ui-fail-nightly/catch.rs:11:9 | 11 | #[catch("404")] | ^^^^^ @@ -23,7 +23,7 @@ error: expected integer or `default`, found string literal = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` error: unexpected keyed parameter: expected literal or identifier - --> $DIR/catch.rs:14:9 + --> tests/ui-fail-nightly/catch.rs:14:9 | 14 | #[catch(code = "404")] | ^^^^^^^^^^^^ @@ -31,7 +31,7 @@ error: unexpected keyed parameter: expected literal or identifier = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` error: unexpected keyed parameter: expected literal or identifier - --> $DIR/catch.rs:17:9 + --> tests/ui-fail-nightly/catch.rs:17:9 | 17 | #[catch(code = 404)] | ^^^^^^^^^^ @@ -39,7 +39,7 @@ error: unexpected keyed parameter: expected literal or identifier = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` error: status must be in range [100, 599] - --> $DIR/catch.rs:20:9 + --> tests/ui-fail-nightly/catch.rs:20:9 | 20 | #[catch(99)] | ^^ @@ -47,7 +47,7 @@ error: status must be in range [100, 599] = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` error: status must be in range [100, 599] - --> $DIR/catch.rs:23:9 + --> tests/ui-fail-nightly/catch.rs:23:9 | 23 | #[catch(600)] | ^^^ @@ -55,7 +55,7 @@ error: status must be in range [100, 599] = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` error: unexpected attribute parameter: `message` - --> $DIR/catch.rs:26:14 + --> tests/ui-fail-nightly/catch.rs:26:14 | 26 | #[catch(400, message = "foo")] | ^^^^^^^^^^^^^^^ @@ -63,13 +63,13 @@ error: unexpected attribute parameter: `message` = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` error[E0308]: mismatched types - --> $DIR/catch.rs:30:17 + --> tests/ui-fail-nightly/catch.rs:30:17 | 30 | fn f3(_request: &Request, other: bool) { } | ^^^^^^^^ expected `&rocket::Request<'_>`, found struct `Status` error[E0308]: mismatched types - --> $DIR/catch.rs:30:34 + --> tests/ui-fail-nightly/catch.rs:30:34 | 30 | fn f3(_request: &Request, other: bool) { } | ^^^^ expected `bool`, found `&rocket::Request<'_>` diff --git a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr b/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr index d761eeae..90f585a2 100644 --- a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr @@ -1,53 +1,37 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/catch_type_errors.rs:6:30 - | -6 | fn f1(_request: &Request) -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | -note: required by `respond_to` - --> $DIR/responder.rs:298:5 - | -298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> 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` error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied - --> $DIR/catch_type_errors.rs:11:30 - | -11 | fn f2(_request: &Request) -> bool { - | ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool` - | -note: required by `respond_to` - --> $DIR/responder.rs:298:5 - | -298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> 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` error[E0308]: mismatched types - --> $DIR/catch_type_errors.rs:16:17 + --> tests/ui-fail-nightly/catch_type_errors.rs:16:17 | 16 | fn f3(_request: bool) -> usize { | ^^^^ expected `bool`, found `&rocket::Request<'_>` error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/catch_type_errors.rs:16:26 - | -16 | fn f3(_request: bool) -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | -note: required by `respond_to` - --> $DIR/responder.rs:298:5 - | -298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> 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` error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/catch_type_errors.rs:21:12 - | -21 | fn f4() -> usize { - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | -note: required by `respond_to` - --> $DIR/responder.rs:298:5 - | -298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> 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` diff --git a/core/codegen/tests/ui-fail-nightly/catchers.stderr b/core/codegen/tests/ui-fail-nightly/catchers.stderr index 59f164bb..518a3f64 100644 --- a/core/codegen/tests/ui-fail-nightly/catchers.stderr +++ b/core/codegen/tests/ui-fail-nightly/catchers.stderr @@ -1,17 +1,17 @@ error: expected `,` - --> $DIR/catchers.rs:4:25 + --> tests/ui-fail-nightly/catchers.rs:4:25 | 4 | let _ = catchers![a b]; | ^ error: expected identifier - --> $DIR/catchers.rs:6:26 + --> tests/ui-fail-nightly/catchers.rs:6:26 | 6 | let _ = catchers![a::, ]; | ^ error: unexpected end of input, expected identifier - --> $DIR/catchers.rs:7:13 + --> tests/ui-fail-nightly/catchers.rs:7:13 | 7 | let _ = catchers![a::]; | ^^^^^^^^^^^^^^ diff --git a/core/codegen/tests/ui-fail-nightly/from_form.stderr b/core/codegen/tests/ui-fail-nightly/from_form.stderr index 508ace0f..a97bea5c 100644 --- a/core/codegen/tests/ui-fail-nightly/from_form.stderr +++ b/core/codegen/tests/ui-fail-nightly/from_form.stderr @@ -1,222 +1,222 @@ error: enums are not supported - --> $DIR/from_form.rs:4:1 + --> tests/ui-fail-nightly/from_form.rs:4:1 | 4 | enum Thing { } | ^^^^^^^^^^^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:3:10 + --> tests/ui-fail-nightly/from_form.rs:3:10 | 3 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: at least one field is required - --> $DIR/from_form.rs:7:1 + --> tests/ui-fail-nightly/from_form.rs:7:1 | 7 | struct Foo1; | ^^^^^^^^^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:6:10 + --> tests/ui-fail-nightly/from_form.rs:6:10 | 6 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: at least one field is required - --> $DIR/from_form.rs:10:13 + --> tests/ui-fail-nightly/from_form.rs:10:13 | 10 | struct Foo2 { } | ^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:9:10 + --> tests/ui-fail-nightly/from_form.rs:9:10 | 9 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: tuple struct must have exactly one field - --> $DIR/from_form.rs:16:12 + --> tests/ui-fail-nightly/from_form.rs:16:12 | 16 | struct Foo4(usize, usize, usize); | ^^^^^^^^^^^^^^^^^^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:15:10 + --> tests/ui-fail-nightly/from_form.rs:15:10 | 15 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: only one lifetime is supported - --> $DIR/from_form.rs:19:25 + --> tests/ui-fail-nightly/from_form.rs:19:25 | 19 | struct NextTodoTask<'f, 'a> { | ^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:18:10 + --> tests/ui-fail-nightly/from_form.rs:18:10 | 18 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --> $DIR/from_form.rs:28:20 + --> tests/ui-fail-nightly/from_form.rs:28:20 | 28 | #[field(name = "isindex")] | ^^^^^^^^^ | = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:26:10 + --> tests/ui-fail-nightly/from_form.rs:26:10 | 26 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form.rs:36:5 + --> tests/ui-fail-nightly/from_form.rs:36:5 | 36 | foo: usize, | ^^^ | help: declared in this field - --> $DIR/from_form.rs:36:5 + --> tests/ui-fail-nightly/from_form.rs:36:5 | 36 | foo: usize, | ^^^^^^^^^^ note: previous field with conflicting name - --> $DIR/from_form.rs:34:5 + --> tests/ui-fail-nightly/from_form.rs:34:5 | 34 | / #[field(name = "foo")] 35 | | field: String, | |_________________^ note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:32:10 + --> tests/ui-fail-nightly/from_form.rs:32:10 | 32 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form.rs:43:20 + --> tests/ui-fail-nightly/from_form.rs:43:20 | 43 | #[field(name = "hello")] | ^^^^^^^ | help: declared in this field - --> $DIR/from_form.rs:43:5 + --> tests/ui-fail-nightly/from_form.rs:43:5 | 43 | / #[field(name = "hello")] 44 | | other: String, | |_________________^ note: previous field with conflicting name - --> $DIR/from_form.rs:41:5 + --> tests/ui-fail-nightly/from_form.rs:41:5 | 41 | / #[field(name = "hello")] 42 | | first: String, | |_________________^ note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:39:10 + --> tests/ui-fail-nightly/from_form.rs:39:10 | 39 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form.rs:50:20 + --> tests/ui-fail-nightly/from_form.rs:50:20 | 50 | #[field(name = "first")] | ^^^^^^^ | help: declared in this field - --> $DIR/from_form.rs:50:5 + --> tests/ui-fail-nightly/from_form.rs:50:5 | 50 | / #[field(name = "first")] 51 | | other: String, | |_________________^ note: previous field with conflicting name - --> $DIR/from_form.rs:49:5 + --> tests/ui-fail-nightly/from_form.rs:49:5 | 49 | first: String, | ^^^^^^^^^^^^^ note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:47:10 + --> tests/ui-fail-nightly/from_form.rs:47:10 | 47 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected attribute parameter: `field` - --> $DIR/from_form.rs:56:28 + --> tests/ui-fail-nightly/from_form.rs:56:28 | 56 | #[field(name = "blah", field = "bloo")] | ^^^^^^^^^^^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:54:10 + --> tests/ui-fail-nightly/from_form.rs:54:10 | 54 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected list `#[field(..)]`, found bare path "field" - --> $DIR/from_form.rs:62:7 + --> tests/ui-fail-nightly/from_form.rs:62:7 | 62 | #[field] | ^^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:60:10 + --> tests/ui-fail-nightly/from_form.rs:60:10 | 60 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected key/value `key = value` - --> $DIR/from_form.rs:68:13 + --> tests/ui-fail-nightly/from_form.rs:68:13 | 68 | #[field("blah")] | ^^^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:66:10 + --> tests/ui-fail-nightly/from_form.rs:66:10 | 66 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected key/value `key = value` - --> $DIR/from_form.rs:74:13 + --> tests/ui-fail-nightly/from_form.rs:74:13 | 74 | #[field(123)] | ^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:72:10 + --> tests/ui-fail-nightly/from_form.rs:72:10 | 72 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected attribute parameter: `beep` - --> $DIR/from_form.rs:80:13 + --> tests/ui-fail-nightly/from_form.rs:80:13 | 80 | #[field(beep = "bop")] | ^^^^^^^^^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:78:10 + --> tests/ui-fail-nightly/from_form.rs:78:10 | 78 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field has conflicting names - --> $DIR/from_form.rs:86:5 + --> tests/ui-fail-nightly/from_form.rs:86:5 | 86 | / #[field(name = "blah")] 87 | | #[field(name = "blah")] @@ -224,218 +224,218 @@ error: field has conflicting names | |____________________^ | note: this field name... - --> $DIR/from_form.rs:86:20 + --> tests/ui-fail-nightly/from_form.rs:86:20 | 86 | #[field(name = "blah")] | ^^^^^^ note: ...conflicts with this field name - --> $DIR/from_form.rs:87:20 + --> tests/ui-fail-nightly/from_form.rs:87:20 | 87 | #[field(name = "blah")] | ^^^^^^ note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:84:10 + --> tests/ui-fail-nightly/from_form.rs:84:10 | 84 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected list `#[attr(..)]`, found bare boolean literal - --> $DIR/from_form.rs:93:20 + --> tests/ui-fail-nightly/from_form.rs:93:20 | 93 | #[field(name = true)] | ^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:91:10 + --> tests/ui-fail-nightly/from_form.rs:91:10 | 91 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found bare path "name" - --> $DIR/from_form.rs:99:13 + --> tests/ui-fail-nightly/from_form.rs:99:13 | 99 | #[field(name)] | ^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:97:10 + --> tests/ui-fail-nightly/from_form.rs:97:10 | 97 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected list `#[attr(..)]`, found bare integer literal - --> $DIR/from_form.rs:105:20 + --> tests/ui-fail-nightly/from_form.rs:105:20 | 105 | #[field(name = 123)] | ^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:103:10 + --> tests/ui-fail-nightly/from_form.rs:103:10 | 103 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --> $DIR/from_form.rs:111:20 + --> tests/ui-fail-nightly/from_form.rs:111:20 | 111 | #[field(name = "hello&world")] | ^^^^^^^^^^^^^ | = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:109:10 + --> tests/ui-fail-nightly/from_form.rs:109:10 | 109 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --> $DIR/from_form.rs:117:20 + --> tests/ui-fail-nightly/from_form.rs:117:20 | 117 | #[field(name = "!@#$%^&*()_")] | ^^^^^^^^^^^^^ | = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:115:10 + --> tests/ui-fail-nightly/from_form.rs:115:10 | 115 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --> $DIR/from_form.rs:123:20 + --> tests/ui-fail-nightly/from_form.rs:123:20 | 123 | #[field(name = "?")] | ^^^ | = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:121:10 + --> tests/ui-fail-nightly/from_form.rs:121:10 | 121 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --> $DIR/from_form.rs:129:20 + --> tests/ui-fail-nightly/from_form.rs:129:20 | 129 | #[field(name = "")] | ^^ | = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:127:10 + --> tests/ui-fail-nightly/from_form.rs:127:10 | 127 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --> $DIR/from_form.rs:135:20 + --> tests/ui-fail-nightly/from_form.rs:135:20 | 135 | #[field(name = "a&b")] | ^^^^^ | = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:133:10 + --> tests/ui-fail-nightly/from_form.rs:133:10 | 133 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --> $DIR/from_form.rs:141:20 + --> tests/ui-fail-nightly/from_form.rs:141:20 | 141 | #[field(name = "a=")] | ^^^^ | = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:139:10 + --> tests/ui-fail-nightly/from_form.rs:139:10 | 139 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: duplicate attribute parameter: default - --> $DIR/from_form.rs:177:26 + --> tests/ui-fail-nightly/from_form.rs:177:26 | 177 | #[field(default = 1, default = 2)] | ^^^^^^^^^^^ | note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:175:10 + --> tests/ui-fail-nightly/from_form.rs:175:10 | 175 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: duplicate default field expression - --> $DIR/from_form.rs:184:23 + --> tests/ui-fail-nightly/from_form.rs:184:23 | 184 | #[field(default = 2)] | ^ | = help: at most one `default` or `default_with` is allowed note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:181:10 + --> tests/ui-fail-nightly/from_form.rs:181:10 | 181 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: duplicate default expressions - --> $DIR/from_form.rs:190:23 + --> tests/ui-fail-nightly/from_form.rs:190:23 | 190 | #[field(default = 1, default_with = None)] | ^ | = help: only one of `default` or `default_with` must be used note: other default expression is here - --> $DIR/from_form.rs:190:41 + --> tests/ui-fail-nightly/from_form.rs:190:41 | 190 | #[field(default = 1, default_with = None)] | ^^^^ note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:188:10 + --> tests/ui-fail-nightly/from_form.rs:188:10 | 188 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: duplicate default expressions - --> $DIR/from_form.rs:197:23 + --> tests/ui-fail-nightly/from_form.rs:197:23 | 197 | #[field(default = 1)] | ^ | = help: only one of `default` or `default_with` must be used note: other default expression is here - --> $DIR/from_form.rs:196:28 + --> tests/ui-fail-nightly/from_form.rs:196:28 | 196 | #[field(default_with = None)] | ^^^^ note: error occurred while deriving `FromForm` - --> $DIR/from_form.rs:194:10 + --> tests/ui-fail-nightly/from_form.rs:194:10 | 194 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `unknown` in this scope - --> $DIR/from_form.rs:153:24 + --> tests/ui-fail-nightly/from_form.rs:153:24 | 153 | #[field(validate = unknown())] | ^^^^^^^ not found in this scope error[E0308]: mismatched types - --> $DIR/from_form.rs:147:24 + --> tests/ui-fail-nightly/from_form.rs:147:24 | 147 | #[field(validate = 123)] | -------- ^^^ expected enum `Result`, found integer @@ -446,7 +446,7 @@ error[E0308]: mismatched types found type `{integer}` error[E0308]: mismatched types - --> $DIR/from_form.rs:160:12 + --> tests/ui-fail-nightly/from_form.rs:160:12 | 160 | first: String, | ^^^^^^ expected enum `TempFile`, found struct `std::string::String` @@ -455,7 +455,7 @@ error[E0308]: mismatched types found reference `&std::string::String` error[E0308]: mismatched types - --> $DIR/from_form.rs:166:12 + --> tests/ui-fail-nightly/from_form.rs:166:12 | 166 | first: String, | ^^^^^^ expected enum `TempFile`, found struct `std::string::String` @@ -464,13 +464,13 @@ error[E0308]: mismatched types found reference `&std::string::String` error[E0308]: mismatched types - --> $DIR/from_form.rs:165:28 + --> tests/ui-fail-nightly/from_form.rs:165:28 | 165 | #[field(validate = ext("hello"))] | ^^^^^^^ expected struct `ContentType`, found `&str` error[E0277]: the trait bound `i32: From<&str>` is not satisfied - --> $DIR/from_form.rs:171:23 + --> tests/ui-fail-nightly/from_form.rs:171:23 | 171 | #[field(default = "no conversion")] | ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `i32` @@ -480,11 +480,11 @@ error[E0277]: the trait bound `i32: From<&str>` is not satisfied > > > - and 5 others + and 88 others = note: required because of the requirements on the impl of `Into` for `&str` error[E0308]: mismatched types - --> $DIR/from_form.rs:203:33 + --> tests/ui-fail-nightly/from_form.rs:203:33 | 203 | #[field(default_with = Some("hi"))] | ^^^^ expected struct `std::string::String`, found `&str` diff --git a/core/codegen/tests/ui-fail-nightly/from_form_field.stderr b/core/codegen/tests/ui-fail-nightly/from_form_field.stderr index 270f8e14..806e37b8 100644 --- a/core/codegen/tests/ui-fail-nightly/from_form_field.stderr +++ b/core/codegen/tests/ui-fail-nightly/from_form_field.stderr @@ -1,31 +1,31 @@ error: tuple structs are not supported - --> $DIR/from_form_field.rs:4:1 + --> tests/ui-fail-nightly/from_form_field.rs:4:1 | 4 | struct Foo1; | ^^^^^^^^^^^^ | note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:3:10 + --> tests/ui-fail-nightly/from_form_field.rs:3:10 | 3 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: tuple structs are not supported - --> $DIR/from_form_field.rs:7:1 + --> tests/ui-fail-nightly/from_form_field.rs:7:1 | 7 | struct Foo2(usize); | ^^^^^^^^^^^^^^^^^^^ | note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:6:10 + --> tests/ui-fail-nightly/from_form_field.rs:6:10 | 6 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: named structs are not supported - --> $DIR/from_form_field.rs:10:1 + --> tests/ui-fail-nightly/from_form_field.rs:10:1 | 10 | / struct Foo3 { 11 | | foo: usize, @@ -33,79 +33,79 @@ error: named structs are not supported | |_^ | note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:9:10 + --> tests/ui-fail-nightly/from_form_field.rs:9:10 | 9 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: variants cannot have fields - --> $DIR/from_form_field.rs:16:6 + --> tests/ui-fail-nightly/from_form_field.rs:16:6 | 16 | A(usize), | ^^^^^^^ | note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:14:10 + --> tests/ui-fail-nightly/from_form_field.rs:14:10 | 14 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: enum must have at least one variant - --> $DIR/from_form_field.rs:20:1 + --> tests/ui-fail-nightly/from_form_field.rs:20:1 | 20 | enum Foo5 { } | ^^^^^^^^^^^^^ | note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:19:10 + --> tests/ui-fail-nightly/from_form_field.rs:19:10 | 19 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: type generics are not supported - --> $DIR/from_form_field.rs:23:11 + --> tests/ui-fail-nightly/from_form_field.rs:23:11 | 23 | enum Foo6 { | ^ | note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:22:10 + --> tests/ui-fail-nightly/from_form_field.rs:22:10 | 22 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid value: expected string literal - --> $DIR/from_form_field.rs:29:21 + --> tests/ui-fail-nightly/from_form_field.rs:29:21 | 29 | #[field(value = 123)] | ^^^ | note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:27:10 + --> tests/ui-fail-nightly/from_form_field.rs:27:10 | 27 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected literal, found bare path "value" - --> $DIR/from_form_field.rs:35:13 + --> tests/ui-fail-nightly/from_form_field.rs:35:13 | 35 | #[field(value)] | ^^^^^ | note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:33:10 + --> tests/ui-fail-nightly/from_form_field.rs:33:10 | 33 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: variant has conflicting values - --> $DIR/from_form_field.rs:41:5 + --> tests/ui-fail-nightly/from_form_field.rs:41:5 | 41 | / #[field(value = "bar")] 42 | | #[field(value = "bar")] @@ -113,73 +113,73 @@ error: variant has conflicting values | |_____^ | note: this value... - --> $DIR/from_form_field.rs:41:21 + --> tests/ui-fail-nightly/from_form_field.rs:41:21 | 41 | #[field(value = "bar")] | ^^^^^ note: ...conflicts with this value - --> $DIR/from_form_field.rs:42:21 + --> tests/ui-fail-nightly/from_form_field.rs:42:21 | 42 | #[field(value = "bar")] | ^^^^^ note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:39:10 + --> tests/ui-fail-nightly/from_form_field.rs:39:10 | 39 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: field value conflicts with previous value - --> $DIR/from_form_field.rs:50:21 + --> tests/ui-fail-nightly/from_form_field.rs:50:21 | 50 | #[field(value = "BAr")] | ^^^^^ | help: ...declared in this variant - --> $DIR/from_form_field.rs:50:5 + --> tests/ui-fail-nightly/from_form_field.rs:50:5 | 50 | / #[field(value = "BAr")] 51 | | B, | |_____^ note: previous field with conflicting name - --> $DIR/from_form_field.rs:48:5 + --> tests/ui-fail-nightly/from_form_field.rs:48:5 | 48 | / #[field(value = "bar")] 49 | | A, | |_____^ note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:46:10 + --> tests/ui-fail-nightly/from_form_field.rs:46:10 | 46 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: field value conflicts with previous value - --> $DIR/from_form_field.rs:57:21 + --> tests/ui-fail-nightly/from_form_field.rs:57:21 | 57 | #[field(value = "a")] | ^^^ | help: ...declared in this variant - --> $DIR/from_form_field.rs:57:5 + --> tests/ui-fail-nightly/from_form_field.rs:57:5 | 57 | / #[field(value = "a")] 58 | | B, | |_____^ note: previous field with conflicting name - --> $DIR/from_form_field.rs:56:5 + --> tests/ui-fail-nightly/from_form_field.rs:56:5 | 56 | A, | ^ note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:54:10 + --> tests/ui-fail-nightly/from_form_field.rs:54:10 | 54 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: variant has conflicting values - --> $DIR/from_form_field.rs:80:5 + --> tests/ui-fail-nightly/from_form_field.rs:80:5 | 80 | / #[field(value = "FoO")] 81 | | #[field(value = "foo")] @@ -187,24 +187,24 @@ error: variant has conflicting values | |_____^ | note: this value... - --> $DIR/from_form_field.rs:80:21 + --> tests/ui-fail-nightly/from_form_field.rs:80:21 | 80 | #[field(value = "FoO")] | ^^^^^ note: ...conflicts with this value - --> $DIR/from_form_field.rs:81:21 + --> tests/ui-fail-nightly/from_form_field.rs:81:21 | 81 | #[field(value = "foo")] | ^^^^^ note: error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:78:10 + --> tests/ui-fail-nightly/from_form_field.rs:78:10 | 78 | #[derive(FromFormField)] | ^^^^^^^^^^^^^ = note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info) error: field has conflicting names - --> $DIR/from_form_field.rs:87:5 + --> tests/ui-fail-nightly/from_form_field.rs:87:5 | 87 | / #[field(name = "foo")] 88 | | #[field(name = uncased("FOO"))] @@ -212,90 +212,90 @@ error: field has conflicting names | |_________________^ | note: this field name... - --> $DIR/from_form_field.rs:87:20 + --> tests/ui-fail-nightly/from_form_field.rs:87:20 | 87 | #[field(name = "foo")] | ^^^^^ note: ...conflicts with this field name - --> $DIR/from_form_field.rs:88:28 + --> tests/ui-fail-nightly/from_form_field.rs:88:28 | 88 | #[field(name = uncased("FOO"))] | ^^^^^ note: error occurred while deriving `FromForm` - --> $DIR/from_form_field.rs:85:10 + --> tests/ui-fail-nightly/from_form_field.rs:85:10 | 85 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form_field.rs:96:20 + --> tests/ui-fail-nightly/from_form_field.rs:96:20 | 96 | #[field(name = "foo")] | ^^^^^ | help: declared in this field - --> $DIR/from_form_field.rs:96:5 + --> tests/ui-fail-nightly/from_form_field.rs:96:5 | 96 | / #[field(name = "foo")] 97 | | other: usize, | |________________^ note: previous field with conflicting name - --> $DIR/from_form_field.rs:94:5 + --> tests/ui-fail-nightly/from_form_field.rs:94:5 | 94 | / #[field(name = "foo")] 95 | | single: usize, | |_________________^ note: error occurred while deriving `FromForm` - --> $DIR/from_form_field.rs:92:10 + --> tests/ui-fail-nightly/from_form_field.rs:92:10 | 92 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form_field.rs:104:5 + --> tests/ui-fail-nightly/from_form_field.rs:104:5 | 104 | hello_there: usize, | ^^^^^^^^^^^ | help: declared in this field - --> $DIR/from_form_field.rs:104:5 + --> tests/ui-fail-nightly/from_form_field.rs:104:5 | 104 | hello_there: usize, | ^^^^^^^^^^^^^^^^^^ note: previous field with conflicting name - --> $DIR/from_form_field.rs:102:5 + --> tests/ui-fail-nightly/from_form_field.rs:102:5 | 102 | / #[field(name = uncased("HELLO_THERE"))] 103 | | single: usize, | |_________________^ note: error occurred while deriving `FromForm` - --> $DIR/from_form_field.rs:100:10 + --> tests/ui-fail-nightly/from_form_field.rs:100:10 | 100 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form_field.rs:111:5 + --> tests/ui-fail-nightly/from_form_field.rs:111:5 | 111 | hello_there: usize, | ^^^^^^^^^^^ | help: declared in this field - --> $DIR/from_form_field.rs:111:5 + --> tests/ui-fail-nightly/from_form_field.rs:111:5 | 111 | hello_there: usize, | ^^^^^^^^^^^^^^^^^^ note: previous field with conflicting name - --> $DIR/from_form_field.rs:109:5 + --> tests/ui-fail-nightly/from_form_field.rs:109:5 | 109 | / #[field(name = "hello_there")] 110 | | single: usize, | |_________________^ note: error occurred while deriving `FromForm` - --> $DIR/from_form_field.rs:107:10 + --> tests/ui-fail-nightly/from_form_field.rs:107:10 | 107 | #[derive(FromForm)] | ^^^^^^^^ 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 index 4b5d39fb..37cdf3fa 100644 --- a/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied - --> $DIR/from_form_type_errors.rs:7:12 + --> tests/ui-fail-nightly/from_form_type_errors.rs:7:12 | 7 | field: Unknown, | ^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown` @@ -7,7 +7,7 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied = note: required because of the requirements on the impl of `FromForm<'r>` for `Unknown` error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied - --> $DIR/from_form_type_errors.rs:14:12 + --> tests/ui-fail-nightly/from_form_type_errors.rs:14:12 | 14 | field: Foo, | ^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo` diff --git a/core/codegen/tests/ui-fail-nightly/responder-types.stderr b/core/codegen/tests/ui-fail-nightly/responder-types.stderr index 7fbba7e7..c37a38be 100644 --- a/core/codegen/tests/ui-fail-nightly/responder-types.stderr +++ b/core/codegen/tests/ui-fail-nightly/responder-types.stderr @@ -1,77 +1,80 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:5:5 - | -5 | thing: u8, - | ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` - | -note: required by `respond_to` - --> $DIR/responder.rs:298:5 - | -298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/responder-types.rs:5:5 + | +5 | thing: u8, + | ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:11:5 - | -11 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following implementations were found: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - and 8 others - = note: required because of the requirements on the impl of `Into>` for `u8` + --> tests/ui-fail-nightly/responder-types.rs:11:5 + | +11 | other: u8, + | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following implementations were found: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + and 8 others + = note: required because of the requirements on the impl of `Into>` for `u8` +note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header` error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:16:5 - | -16 | thing: u8, - | ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` - | -note: required by `respond_to` - --> $DIR/responder.rs:298:5 - | -298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/responder-types.rs:16:5 + | +16 | thing: u8, + | ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:17:5 - | -17 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following implementations were found: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - and 8 others - = note: required because of the requirements on the impl of `Into>` for `u8` + --> tests/ui-fail-nightly/responder-types.rs:17:5 + | +17 | other: u8, + | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following implementations were found: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + and 8 others + = note: required because of the requirements on the impl of `Into>` for `u8` +note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:24:5 - | -24 | then: String, - | ^^^^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following implementations were found: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - and 8 others - = note: required because of the requirements on the impl of `Into>` for `std::string::String` + --> tests/ui-fail-nightly/responder-types.rs:24:5 + | +24 | then: String, + | ^^^^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following implementations were found: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + and 8 others + = note: required because of the requirements on the impl of `Into>` for `std::string::String` +note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header` error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:28:13 + --> tests/ui-fail-nightly/responder-types.rs:28:13 | 28 | fn foo() -> usize { 0 } | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` | -note: required by `route::handler::, Status, rocket::Data<'o>>>::from` - --> $DIR/handler.rs:188:5 +note: required by a bound in `route::handler::, Status, rocket::Data<'o>>>::from` + --> $WORKSPACE/core/lib/src/route/handler.rs | -188 | pub fn from>(req: &'r Request<'_>, responder: R) -> Outcome<'r> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | pub fn from>(req: &'r Request<'_>, responder: R) -> Outcome<'r> { + | ^^^^^^^^^^^^^^^^^ required by this bound in `route::handler::, Status, rocket::Data<'o>>>::from` diff --git a/core/codegen/tests/ui-fail-nightly/responder.stderr b/core/codegen/tests/ui-fail-nightly/responder.stderr index 1a0ec920..b211d1f2 100644 --- a/core/codegen/tests/ui-fail-nightly/responder.stderr +++ b/core/codegen/tests/ui-fail-nightly/responder.stderr @@ -1,141 +1,141 @@ error: need at least one field - --> $DIR/responder.rs:4:1 + --> tests/ui-fail-nightly/responder.rs:4:1 | 4 | struct Thing1; | ^^^^^^^^^^^^^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:3:10 + --> tests/ui-fail-nightly/responder.rs:3:10 | 3 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: need at least one field - --> $DIR/responder.rs:7:14 + --> tests/ui-fail-nightly/responder.rs:7:14 | 7 | struct Thing2(); | ^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:6:10 + --> tests/ui-fail-nightly/responder.rs:6:10 | 6 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: need at least one field - --> $DIR/responder.rs:13:12 + --> tests/ui-fail-nightly/responder.rs:13:12 | 13 | enum Foo { Bark, } | ^^^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:12:10 + --> tests/ui-fail-nightly/responder.rs:12:10 | 12 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: only one lifetime is supported - --> $DIR/responder.rs:16:14 + --> tests/ui-fail-nightly/responder.rs:16:14 | 16 | struct Thing4<'a, 'b>(&'a str, &'b str); | ^^^^^^^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:15:10 + --> tests/ui-fail-nightly/responder.rs:15:10 | 15 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid or unknown content type - --> $DIR/responder.rs:25:27 + --> tests/ui-fail-nightly/responder.rs:25:27 | 25 | #[response(content_type = "")] | ^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:24:10 + --> tests/ui-fail-nightly/responder.rs:24:10 | 24 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid or unknown content type - --> $DIR/responder.rs:29:27 + --> tests/ui-fail-nightly/responder.rs:29:27 | 29 | #[response(content_type = "idk")] | ^^^^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:28:10 + --> tests/ui-fail-nightly/responder.rs:28:10 | 28 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid value: expected string literal - --> $DIR/responder.rs:33:27 + --> tests/ui-fail-nightly/responder.rs:33:27 | 33 | #[response(content_type = 100)] | ^^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:32:10 + --> tests/ui-fail-nightly/responder.rs:32:10 | 32 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: status must be in range [100, 599] - --> $DIR/responder.rs:37:21 + --> tests/ui-fail-nightly/responder.rs:37:21 | 37 | #[response(status = 8)] | ^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:36:10 + --> tests/ui-fail-nightly/responder.rs:36:10 | 36 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid value: expected unsigned integer literal - --> $DIR/responder.rs:41:21 + --> tests/ui-fail-nightly/responder.rs:41:21 | 41 | #[response(status = "404")] | ^^^^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:40:10 + --> tests/ui-fail-nightly/responder.rs:40:10 | 40 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid value: expected unsigned integer literal - --> $DIR/responder.rs:45:21 + --> tests/ui-fail-nightly/responder.rs:45:21 | 45 | #[response(status = "404", content_type = "html")] | ^^^^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:44:10 + --> tests/ui-fail-nightly/responder.rs:44:10 | 44 | #[derive(Responder)] | ^^^^^^^^^ = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid value: expected string literal - --> $DIR/responder.rs:49:41 + --> tests/ui-fail-nightly/responder.rs:49:41 | 49 | #[response(status = 404, content_type = 120)] | ^^^ | note: error occurred while deriving `Responder` - --> $DIR/responder.rs:48:10 + --> tests/ui-fail-nightly/responder.rs:48:10 | 48 | #[derive(Responder)] | ^^^^^^^^^ diff --git a/core/codegen/tests/ui-fail-nightly/route-attribute-general-syntax.stderr b/core/codegen/tests/ui-fail-nightly/route-attribute-general-syntax.stderr index b545a0cd..1b0c39b1 100644 --- a/core/codegen/tests/ui-fail-nightly/route-attribute-general-syntax.stderr +++ b/core/codegen/tests/ui-fail-nightly/route-attribute-general-syntax.stderr @@ -1,5 +1,5 @@ error: missing expected parameter: `uri` - --> $DIR/route-attribute-general-syntax.rs:4:1 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:4:1 | 4 | #[get()] | ^^^^^^^^ @@ -7,7 +7,7 @@ error: missing expected parameter: `uri` = note: this error originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected `fn` - --> $DIR/route-attribute-general-syntax.rs:9:1 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:9:1 | 9 | struct S; | ^^^^^^ @@ -15,7 +15,7 @@ error: expected `fn` = help: #[get] can only be used on functions error: expected `fn` - --> $DIR/route-attribute-general-syntax.rs:12:1 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:12:1 | 12 | enum A { } | ^^^^ @@ -23,7 +23,7 @@ error: expected `fn` = help: #[get] can only be used on functions error: expected `fn` - --> $DIR/route-attribute-general-syntax.rs:15:1 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:15:1 | 15 | trait Foo { } | ^^^^^ @@ -31,7 +31,7 @@ error: expected `fn` = help: #[get] can only be used on functions error: expected `fn` - --> $DIR/route-attribute-general-syntax.rs:18:1 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:18:1 | 18 | impl S { } | ^^^^ @@ -39,37 +39,37 @@ error: expected `fn` = help: #[get] can only be used on functions error: expected key/value `key = value` - --> $DIR/route-attribute-general-syntax.rs:21:12 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:21:12 | 21 | #[get("/", 123)] | ^^^ error: expected key/value `key = value` - --> $DIR/route-attribute-general-syntax.rs:24:12 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:24:12 | 24 | #[get("/", "/")] | ^^^ error: unexpected keyed parameter: expected literal or identifier - --> $DIR/route-attribute-general-syntax.rs:27:7 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:27:7 | 27 | #[get(data = "", "/")] | ^^^^^^^^^^^^^^ error: unexpected attribute parameter: `unknown` - --> $DIR/route-attribute-general-syntax.rs:30:12 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:30:12 | 30 | #[get("/", unknown = "foo")] | ^^^^^^^^^^^^^^^ error: expected key/value `key = value` - --> $DIR/route-attribute-general-syntax.rs:33:12 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:33:12 | 33 | #[get("/", ...)] | ^^^ error: handler arguments must be named - --> $DIR/route-attribute-general-syntax.rs:39:7 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:39:7 | 39 | fn c1(_: usize) {} | ^^^^^^^^ @@ -77,103 +77,103 @@ error: handler arguments must be named = help: to name an ignored handler argument, use `_name` error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:43:7 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:43:7 | 43 | #[get(100)] | ^^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:46:7 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:46:7 | 46 | #[get('/')] | ^^^ error: invalid value: expected integer literal - --> $DIR/route-attribute-general-syntax.rs:49:19 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:49:19 | 49 | #[get("/", rank = "1")] | ^^^ error: invalid value: expected integer literal - --> $DIR/route-attribute-general-syntax.rs:52:19 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:52:19 | 52 | #[get("/", rank = '1')] | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:57:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:57:21 | 57 | #[get("/", format = "applicationx-custom")] | ^^^^^^^^^^^^^^^^^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:60:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:60:21 | 60 | #[get("/", format = "")] | ^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:63:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:63:21 | 63 | #[get("/", format = "//")] | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:66:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:66:21 | 66 | #[get("/", format = "/")] | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:69:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:69:21 | 69 | #[get("/", format = "a/")] | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:72:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:72:21 | 72 | #[get("/", format = "/a")] | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:75:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:75:21 | 75 | #[get("/", format = "/a/")] | ^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:78:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:78:21 | 78 | #[get("/", format = "a/b/")] | ^^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:81:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:81:21 | 81 | #[get("/", format = "unknown")] | ^^^^^^^^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:84:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:84:21 | 84 | #[get("/", format = 12)] | ^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:87:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:87:21 | 87 | #[get("/", format = 'j')] | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:90:21 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:90:21 | 90 | #[get("/", format = "text//foo")] | ^^^^^^^^^^^ error: invalid HTTP method for route handlers - --> $DIR/route-attribute-general-syntax.rs:95:9 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:95:9 | 95 | #[route(CONNECT, "/")] | ^^^^^^^ @@ -181,7 +181,7 @@ error: invalid HTTP method for route handlers = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` error: invalid HTTP method - --> $DIR/route-attribute-general-syntax.rs:98:9 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:98:9 | 98 | #[route(FIX, "/")] | ^^^ @@ -189,7 +189,7 @@ error: invalid HTTP method = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` error: expected identifier, found string literal - --> $DIR/route-attribute-general-syntax.rs:101:9 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:101:9 | 101 | #[route("hi", "/")] | ^^^^ @@ -197,7 +197,7 @@ error: expected identifier, found string literal = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` error: expected identifier, found string literal - --> $DIR/route-attribute-general-syntax.rs:104:9 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:104:9 | 104 | #[route("GET", "/")] | ^^^^^ @@ -205,7 +205,7 @@ error: expected identifier, found string literal = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` error: expected identifier, found integer literal - --> $DIR/route-attribute-general-syntax.rs:107:9 + --> tests/ui-fail-nightly/route-attribute-general-syntax.rs:107:9 | 107 | #[route(120, "/")] | ^^^ diff --git a/core/codegen/tests/ui-fail-nightly/route-path-bad-syntax.stderr b/core/codegen/tests/ui-fail-nightly/route-path-bad-syntax.stderr index d5618e3e..c59c4ebc 100644 --- a/core/codegen/tests/ui-fail-nightly/route-path-bad-syntax.stderr +++ b/core/codegen/tests/ui-fail-nightly/route-path-bad-syntax.stderr @@ -1,5 +1,5 @@ error: invalid route URI: expected token '/' but found 'a' at index 0 - --> $DIR/route-path-bad-syntax.rs:5:8 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:5:8 | 5 | #[get("a")] | ^ @@ -7,7 +7,7 @@ error: invalid route URI: expected token '/' but found 'a' at index 0 = help: expected URI in origin form: "/path/" error: invalid route URI: unexpected EOF: expected token '/' at index 0 - --> $DIR/route-path-bad-syntax.rs:8:8 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:8:8 | 8 | #[get("")] | ^ @@ -15,7 +15,7 @@ error: invalid route URI: unexpected EOF: expected token '/' at index 0 = help: expected URI in origin form: "/path/" error: invalid route URI: expected token '/' but found 'a' at index 0 - --> $DIR/route-path-bad-syntax.rs:11:8 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:11:8 | 11 | #[get("a/b/c")] | ^ @@ -23,7 +23,7 @@ error: invalid route URI: expected token '/' but found 'a' at index 0 = help: expected URI in origin form: "/path/" error: route URIs cannot contain empty segments - --> $DIR/route-path-bad-syntax.rs:14:10 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:14:10 | 14 | #[get("/a///b")] | ^^ @@ -31,7 +31,7 @@ error: route URIs cannot contain empty segments = note: expected "/a/b", found "/a///b" error: route URIs cannot contain empty segments - --> $DIR/route-path-bad-syntax.rs:17:13 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:17:13 | 17 | #[get("/?bat&&")] | ^^ @@ -39,7 +39,7 @@ error: route URIs cannot contain empty segments = note: expected "/?bat", found "/?bat&&" error: route URIs cannot contain empty segments - --> $DIR/route-path-bad-syntax.rs:20:13 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:20:13 | 20 | #[get("/?bat&&")] | ^^ @@ -47,7 +47,7 @@ error: route URIs cannot contain empty segments = note: expected "/?bat", found "/?bat&&" error: route URIs cannot contain empty segments - --> $DIR/route-path-bad-syntax.rs:23:12 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:23:12 | 23 | #[get("/a/b//")] | ^^ @@ -55,79 +55,79 @@ error: route URIs cannot contain empty segments = note: expected "/a/b", found "/a/b//" error: unused parameter - --> $DIR/route-path-bad-syntax.rs:42:10 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:42:10 | 42 | #[get("/")] | ^^^^ | note: expected argument named `name` here - --> $DIR/route-path-bad-syntax.rs:43:6 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:43:6 | 43 | fn h0(_name: usize) {} | ^^^^^^^^^^^^^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:45:12 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:45:12 | 45 | #[get("/a?")] | ^ | note: expected argument named `r` here - --> $DIR/route-path-bad-syntax.rs:46:6 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:46:6 | 46 | fn h1() {} | ^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:48:23 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:48:23 | 48 | #[post("/a", data = "")] | ^^^^ | note: expected argument named `test` here - --> $DIR/route-path-bad-syntax.rs:49:6 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:49:6 | 49 | fn h2() {} | ^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:51:10 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:51:10 | 51 | #[get("/<_r>")] | ^^ | note: expected argument named `_r` here - --> $DIR/route-path-bad-syntax.rs:52:6 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:52:6 | 52 | fn h3() {} | ^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:54:10 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:54:10 | 54 | #[get("/<_r>/")] | ^^ | note: expected argument named `_r` here - --> $DIR/route-path-bad-syntax.rs:55:6 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:55:6 | 55 | fn h4() {} | ^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:54:15 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:54:15 | 54 | #[get("/<_r>/")] | ^ | note: expected argument named `b` here - --> $DIR/route-path-bad-syntax.rs:55:6 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:55:6 | 55 | fn h4() {} | ^^ error: invalid identifier: `foo_.` - --> $DIR/route-path-bad-syntax.rs:60:10 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:60:10 | 60 | #[get("/")] | ^^^^^ @@ -136,7 +136,7 @@ error: invalid identifier: `foo_.` = help: did you mean ``? error: invalid identifier: `foo*` - --> $DIR/route-path-bad-syntax.rs:63:10 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:63:10 | 63 | #[get("/")] | ^^^^ @@ -145,7 +145,7 @@ error: invalid identifier: `foo*` = help: did you mean ``? error: invalid identifier: `!` - --> $DIR/route-path-bad-syntax.rs:66:10 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:66:10 | 66 | #[get("/")] | ^ @@ -154,7 +154,7 @@ error: invalid identifier: `!` = help: did you mean ``? error: invalid identifier: `name>: $DIR/route-path-bad-syntax.rs:69:10 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:69:10 | 69 | #[get("/:")] | ^^^^^^^^^ @@ -163,7 +163,7 @@ error: invalid identifier: `name>:`? error: unexpected static parameter - --> $DIR/route-path-bad-syntax.rs:74:20 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:74:20 | 74 | #[get("/", data = "foo")] | ^^^ @@ -171,7 +171,7 @@ error: unexpected static parameter = help: parameter must be dynamic: `` error: parameter cannot be trailing - --> $DIR/route-path-bad-syntax.rs:77:20 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:77:20 | 77 | #[get("/", data = "")] | ^^^^^^^ @@ -179,7 +179,7 @@ error: parameter cannot be trailing = help: did you mean ``? warning: `segment` starts with `<` but does not end with `>` - --> $DIR/route-path-bad-syntax.rs:80:20 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:80:20 | 80 | #[get("/", data = "` = help: perhaps you meant the dynamic parameter ``? error: unexpected static parameter - --> $DIR/route-path-bad-syntax.rs:80:20 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:80:20 | 80 | #[get("/", data = "` error: invalid identifier: `test ` - --> $DIR/route-path-bad-syntax.rs:83:21 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:83:21 | 83 | #[get("/", data = "")] | ^^^^^ @@ -204,7 +204,7 @@ error: invalid identifier: `test ` = help: did you mean ``? error: handler arguments must be named - --> $DIR/route-path-bad-syntax.rs:89:7 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:89:7 | 89 | fn k0(_: usize) {} | ^^^^^^^^ @@ -212,13 +212,13 @@ error: handler arguments must be named = help: to name an ignored handler argument, use `_name` error: parameters cannot be empty - --> $DIR/route-path-bad-syntax.rs:93:9 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:93:9 | 93 | #[get("/<>")] | ^^ warning: `segment` starts with `<` but does not end with `>` - --> $DIR/route-path-bad-syntax.rs:96:9 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:96:9 | 96 | #[get("/<")] | ^^^^^ @@ -226,7 +226,7 @@ warning: `segment` starts with `<` but does not end with `>` = help: perhaps you meant the dynamic parameter ``? warning: `segment` starts with `<` but does not end with `>` - --> $DIR/route-path-bad-syntax.rs:99:9 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:99:9 | 99 | #[get("/<<<<")] | ^^^^^^^^ @@ -234,7 +234,7 @@ warning: `segment` starts with `<` but does not end with `>` = help: perhaps you meant the dynamic parameter ``? warning: `segment` starts with `<` but does not end with `>` - --> $DIR/route-path-bad-syntax.rs:102:9 + --> tests/ui-fail-nightly/route-path-bad-syntax.rs:102:9 | 102 | #[get("/<>name><")] | ^^^^^^^^ diff --git a/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr b/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr index 3bf72a28..3d370408 100644 --- a/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr @@ -1,29 +1,17 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:6:12 - | -6 | fn f0(foo: Q) {} - | ^ the trait `FromParam<'_>` is not implemented for `Q` - | -note: required by `from_param` - --> $DIR/from_param.rs:183:5 - | -183 | fn from_param(param: &'a str) -> Result; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/route-type-errors.rs:6:12 + | +6 | fn f0(foo: Q) {} + | ^ the trait `FromParam<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied - --> $DIR/route-type-errors.rs:9:12 - | -9 | fn f1(foo: Q) {} - | ^ the trait `FromSegments<'_>` is not implemented for `Q` - | -note: required by `from_segments` - --> $DIR/from_param.rs:291:5 - | -291 | fn from_segments(segments: Segments<'r, Path>) -> Result; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/route-type-errors.rs:9:12 + | +9 | fn f1(foo: Q) {} + | ^ the trait `FromSegments<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied - --> $DIR/route-type-errors.rs:12:12 + --> tests/ui-fail-nightly/route-type-errors.rs:12:12 | 12 | fn f2(foo: Q) {} | ^ the trait `FromFormField<'_>` is not implemented for `Q` @@ -31,7 +19,7 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied = note: required because of the requirements on the impl of `FromForm<'_>` for `Q` error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied - --> $DIR/route-type-errors.rs:15:12 + --> tests/ui-fail-nightly/route-type-errors.rs:15:12 | 15 | fn f3(foo: Q) {} | ^ the trait `FromFormField<'_>` is not implemented for `Q` @@ -39,73 +27,37 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied = note: required because of the requirements on the impl of `FromForm<'_>` for `Q` error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied - --> $DIR/route-type-errors.rs:18:12 - | -18 | fn f4(foo: Q) {} - | ^ the trait `FromData<'_>` is not implemented for `Q` - | -note: required by a bound in `rocket::data::FromData::from_data` - --> $DIR/from_data.rs:194:41 - | -194 | async fn from_data(req: &'r Request<'_>, data: Data<'r>) -> Outcome<'r, Self>; - | ^^ required by this bound in `rocket::data::FromData::from_data` + --> tests/ui-fail-nightly/route-type-errors.rs:18:12 + | +18 | fn f4(foo: Q) {} + | ^ the trait `FromData<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> $DIR/route-type-errors.rs:21:10 - | -21 | fn f5(a: Q, foo: Q) {} - | ^ the trait `FromRequest<'_>` is not implemented for `Q` - | -note: required by a bound in `from_request` - --> $DIR/from_request.rs:388:48 - | -388 | async fn from_request(request: &'r Request<'_>) -> Outcome; - | ^^ required by this bound in `from_request` + --> tests/ui-fail-nightly/route-type-errors.rs:21:10 + | +21 | fn f5(a: Q, foo: Q) {} + | ^ the trait `FromRequest<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:21:18 - | -21 | fn f5(a: Q, foo: Q) {} - | ^ the trait `FromParam<'_>` is not implemented for `Q` - | -note: required by `from_param` - --> $DIR/from_param.rs:183:5 - | -183 | fn from_param(param: &'a str) -> Result; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/route-type-errors.rs:21:18 + | +21 | fn f5(a: Q, foo: Q) {} + | ^ the trait `FromParam<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> $DIR/route-type-errors.rs:24:10 - | -24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} - | ^ the trait `FromRequest<'_>` is not implemented for `Q` - | -note: required by a bound in `from_request` - --> $DIR/from_request.rs:388:48 - | -388 | async fn from_request(request: &'r Request<'_>) -> Outcome; - | ^^ required by this bound in `from_request` + --> tests/ui-fail-nightly/route-type-errors.rs:24:10 + | +24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} + | ^ the trait `FromRequest<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:24:18 - | -24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} - | ^ the trait `FromParam<'_>` is not implemented for `Q` - | -note: required by `from_param` - --> $DIR/from_param.rs:183:5 - | -183 | fn from_param(param: &'a str) -> Result; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/route-type-errors.rs:24:18 + | +24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} + | ^ the trait `FromParam<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:24:39 - | -24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} - | ^ the trait `FromParam<'_>` is not implemented for `Q` - | -note: required by `from_param` - --> $DIR/from_param.rs:183:5 - | -183 | fn from_param(param: &'a str) -> Result; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/route-type-errors.rs:24:39 + | +24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} + | ^ the trait `FromParam<'_>` is not implemented for `Q` diff --git a/core/codegen/tests/ui-fail-nightly/route-warnings.stderr b/core/codegen/tests/ui-fail-nightly/route-warnings.stderr index cb36048f..ba8e4657 100644 --- a/core/codegen/tests/ui-fail-nightly/route-warnings.stderr +++ b/core/codegen/tests/ui-fail-nightly/route-warnings.stderr @@ -1,49 +1,49 @@ warning: 'application/x-custom' is not a known media type - --> $DIR/route-warnings.rs:7:21 + --> tests/ui-fail-nightly/route-warnings.rs:7:21 | 7 | #[get("/", format = "application/x-custom")] | ^^^^^^^^^^^^^^^^^^^^^^ warning: 'x-custom/plain' is not a known media type - --> $DIR/route-warnings.rs:10:21 + --> tests/ui-fail-nightly/route-warnings.rs:10:21 | 10 | #[get("/", format = "x-custom/plain")] | ^^^^^^^^^^^^^^^^ warning: 'x-custom/x-custom' is not a known media type - --> $DIR/route-warnings.rs:13:21 + --> tests/ui-fail-nightly/route-warnings.rs:13:21 | 13 | #[get("/", format = "x-custom/x-custom")] | ^^^^^^^^^^^^^^^^^^^ warning: `data` used with non-payload-supporting method - --> $DIR/route-warnings.rs:18:12 + --> tests/ui-fail-nightly/route-warnings.rs:18:12 | 18 | #[get("/", data = "<_foo>")] | ^^^^^^^^^^^^^^^ | note: 'GET' does not typically support payloads - --> $DIR/route-warnings.rs:18:3 + --> tests/ui-fail-nightly/route-warnings.rs:18:3 | 18 | #[get("/", data = "<_foo>")] | ^^^ = note: this warning originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info) warning: `data` used with non-payload-supporting method - --> $DIR/route-warnings.rs:21:13 + --> tests/ui-fail-nightly/route-warnings.rs:21:13 | 21 | #[head("/", data = "<_foo>")] | ^^^^^^^^^^^^^^^ | note: 'HEAD' does not typically support payloads - --> $DIR/route-warnings.rs:21:3 + --> tests/ui-fail-nightly/route-warnings.rs:21:3 | 21 | #[head("/", data = "<_foo>")] | ^^^^ = note: this warning originates in the attribute macro `head` (in Nightly builds, run with -Z macro-backtrace for more info) error: checking for warnings! - --> $DIR/route-warnings.rs:25:5 + --> tests/ui-fail-nightly/route-warnings.rs:25:5 | 25 | compile_error!("checking for warnings!") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/core/codegen/tests/ui-fail-nightly/routes.stderr b/core/codegen/tests/ui-fail-nightly/routes.stderr index 1ec99110..d034681d 100644 --- a/core/codegen/tests/ui-fail-nightly/routes.stderr +++ b/core/codegen/tests/ui-fail-nightly/routes.stderr @@ -1,17 +1,17 @@ error: expected `,` - --> $DIR/routes.rs:4:23 + --> tests/ui-fail-nightly/routes.rs:4:23 | 4 | let _ = routes![a b]; | ^ error: expected identifier - --> $DIR/routes.rs:6:24 + --> tests/ui-fail-nightly/routes.rs:6:24 | 6 | let _ = routes![a::, ]; | ^ error: unexpected end of input, expected identifier - --> $DIR/routes.rs:7:13 + --> tests/ui-fail-nightly/routes.rs:7:13 | 7 | let _ = routes![a::]; | ^^^^^^^^^^^^ 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 index d0f3135a..8f4a2e1f 100644 --- a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr @@ -1,281 +1,258 @@ -error[E0271]: type mismatch resolving `>::Error == &str` - --> $DIR/typed-uri-bad-type.rs:22:37 +error[E0277]: the trait bound `usize: FromUriParam` is not satisfied + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:45:22 | -22 | fn optionals(id: Option, name: Result) { } - | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str` +45 | uri!(simple(id = "hi")); + | ^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:45:22 - | -45 | uri!(simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:47:17 - | -47 | uri!(simple("hello")); - | ^^^^^^^ the trait `FromUriParam` is not implemented for `usize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:17 + | +47 | uri!(simple("hello")); + | ^^^^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:49:22 - | -49 | uri!(simple(id = 239239i64)); - | ^^^^^^^^^ the trait `FromUriParam` is not implemented for `usize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:22 + | +49 | uri!(simple(id = 239239i64)); + | ^^^^^^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:51:30 - | -51 | uri!(not_uri_display(10, S)); - | ^ the trait `FromUriParam` is not implemented for `S` - | -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:30 + | +51 | uri!(not_uri_display(10, S)); + | ^ the trait `FromUriParam` is not implemented for `S` error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:56:25 - | -56 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); - | ^^^^^^^^ the trait `FromUriParam>` is not implemented for `i32` - | - = help: the following implementations were found: - > - > - > - = note: required because of the requirements on the impl of `FromUriParam>` for `std::option::Option` -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:25 + | +56 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); + | ^^^^^^^^ the trait `FromUriParam>` is not implemented for `i32` + | + = help: the following implementations were found: + > + > + > + > + and 38 others + = note: required because of the requirements on the impl of `FromUriParam>` for `std::option::Option` error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:56:42 - | -56 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); - | ^^^^^^^^^^^^^^^^ the trait `FromUriParam>` is not implemented for `std::string::String` - | - = help: the following implementations were found: - > - > - > - > - and 2 others - = note: required because of the requirements on the impl of `FromUriParam>` for `Result` -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:42 + | +56 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); + | ^^^^^^^^^^^^^^^^ the trait `FromUriParam>` is not implemented for `std::string::String` + | + = help: the following implementations were found: + > + > + > + > + and 8 others + = note: required because of the requirements on the impl of `FromUriParam>` for `Result` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:58:19 - | -58 | uri!(simple_q("hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `isize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:58:19 + | +58 | uri!(simple_q("hi")); + | ^^^^ the trait `FromUriParam` is not implemented for `isize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:60:24 - | -60 | uri!(simple_q(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `isize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:24 + | +60 | uri!(simple_q(id = "hi")); + | ^^^^ the trait `FromUriParam` is not implemented for `isize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:62:23 - | -62 | uri!(other_q(100, S)); - | ^ the trait `FromUriParam` is not implemented for `S` - | -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:23 + | +62 | uri!(other_q(100, S)); + | ^ the trait `FromUriParam` is not implemented for `S` error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:64:25 - | -64 | uri!(other_q(rest = S, id = 100)); - | ^ the trait `FromUriParam` is not implemented for `S` - | -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:64:25 + | +64 | uri!(other_q(rest = S, id = 100)); + | ^ the trait `FromUriParam` is not implemented for `S` error[E0277]: the trait bound `S: Ignorable` is not satisfied - --> $DIR/typed-uri-bad-type.rs:66:25 + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:66:25 | 66 | uri!(other_q(rest = _, id = 100)); | ^ the trait `Ignorable` is not implemented for `S` | note: required by a bound in `assert_ignorable` - --> $DIR/uri_display.rs:544:37 + --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs | -544 | pub fn assert_ignorable>() { } + | pub fn assert_ignorable>() { } | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` error[E0277]: the trait bound `usize: Ignorable` is not satisfied - --> $DIR/typed-uri-bad-type.rs:68:33 + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:33 | 68 | uri!(other_q(rest = S, id = _)); | ^ the trait `Ignorable` is not implemented for `usize` | note: required by a bound in `assert_ignorable` - --> $DIR/uri_display.rs:544:37 + --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs | -544 | pub fn assert_ignorable>() { } + | pub fn assert_ignorable>() { } | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:68:25 - | -68 | uri!(other_q(rest = S, id = _)); - | ^ the trait `FromUriParam` is not implemented for `S` - | -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:25 + | +68 | uri!(other_q(rest = S, id = _)); + | ^ the trait `FromUriParam` is not implemented for `S` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:77:40 - | -77 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied - --> $DIR/typed-uri-bad-type.rs:77:15 + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:40 | 77 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | ^^^^^^^^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>` + | ^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others + +error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:15 + | +77 | uri!(uri!("?foo#bar"), simple(id = "hi")); + | -----^^^^^^^^^^- + | | | + | | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>` + | required by a bound introduced by this call + | +note: required by a bound in `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 - --> $DIR/typed-uri-bad-type.rs:78:33 - | -78 | uri!(uri!("*"), simple(id = "hi")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied - --> $DIR/typed-uri-bad-type.rs:78:15 + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:33 | 78 | uri!(uri!("*"), simple(id = "hi")); - | ^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk` + | ^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others + +error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:15 + | +78 | uri!(uri!("*"), simple(id = "hi")); + | -----^^^- + | | | + | | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk` + | required by a bound introduced by this call + | +note: required by a bound in `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 - --> $DIR/typed-uri-bad-type.rs:81:25 - | -81 | uri!(_, simple(id = "hi"), uri!("*")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:81:37 + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:25 | 81 | uri!(_, simple(id = "hi"), uri!("*")); - | ^^^ the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Asterisk` + | ^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others + +error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix>` is not satisfied + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:37 + | +81 | uri!(_, simple(id = "hi"), uri!("*")); + | -----^^^- + | | | + | | the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Asterisk` + | required by a bound introduced by this call + | +note: required by a bound in `RouteUriBuilder::with_suffix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | where S: ValidRouteSuffix> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:82:25 - | -82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | ^^^^ the trait `FromUriParam` is not implemented for `usize` - | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 - | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:82:37 + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:25 | 82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | ^^^^^^^^^^ the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Origin<'_>` + | ^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > + > + and 38 others + +error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix>` is not satisfied + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:37 + | +82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); + | -----^^^^^^^^^^- + | | | + | | the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Origin<'_>` + | required by a bound introduced by this call + | +note: required by a bound in `RouteUriBuilder::with_suffix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | where S: ValidRouteSuffix> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` + +error[E0271]: type mismatch resolving `>::Error == &str` + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:22:37 + | +22 | fn optionals(id: Option, name: Result) { } + | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str` diff --git a/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr index bb655f68..9adb9936 100644 --- a/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr @@ -1,11 +1,11 @@ error: expected identifier - --> $DIR/typed-uris-bad-params.rs:63:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:63:18 | 63 | uri!(ignored(_ = 10)); | ^ error: route expects 1 parameter but 2 were supplied - --> $DIR/typed-uris-bad-params.rs:69:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:69:18 | 69 | uri!(ignored(10, "10")); | ^^^^^^^^ @@ -13,7 +13,7 @@ error: route expects 1 parameter but 2 were supplied = note: route `ignored` has uri "/<_>" error: expected unnamed arguments due to ignored parameters - --> $DIR/typed-uris-bad-params.rs:67:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:67:18 | 67 | uri!(ignored(num = 10)); | ^^^^^^^^ @@ -21,7 +21,7 @@ error: expected unnamed arguments due to ignored parameters = note: uri for route `ignored` ignores path parameters: "/<_>" error: route expects 1 parameter but 2 were supplied - --> $DIR/typed-uris-bad-params.rs:65:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:65:18 | 65 | uri!(ignored(10, 20)); | ^^^^^^ @@ -29,25 +29,25 @@ error: route expects 1 parameter but 2 were supplied = note: route `ignored` has uri "/<_>" error: path parameters cannot be ignored - --> $DIR/typed-uris-bad-params.rs:61:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:61:18 | 61 | uri!(ignored(_)); | ^ error: path parameters cannot be ignored - --> $DIR/typed-uris-bad-params.rs:59:36 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:59:36 | 59 | uri!(optionals(id = 10, name = _)); | ^ error: path parameters cannot be ignored - --> $DIR/typed-uris-bad-params.rs:57:25 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:57:25 | 57 | uri!(optionals(id = _, name = "bob".into())); | ^ error: invalid parameters for `has_two` route uri - --> $DIR/typed-uris-bad-params.rs:55:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:55:18 | 55 | uri!(has_two(id = 100, cookies = "hi")); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -55,13 +55,13 @@ error: invalid parameters for `has_two` route uri = note: uri parameters are: id: i32, name: String = help: missing parameter: `name` help: unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:55:28 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:55:28 | 55 | uri!(has_two(id = 100, cookies = "hi")); | ^^^^^^^ error: invalid parameters for `has_two` route uri - --> $DIR/typed-uris-bad-params.rs:53:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:53:18 | 53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -69,18 +69,18 @@ error: invalid parameters for `has_two` route uri = note: uri parameters are: id: i32, name: String = help: missing parameter: `name` help: unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:53:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:53:18 | 53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10)); | ^^^^^^^ help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:53:44 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:53:44 | 53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10)); | ^^ ^^ error: invalid parameters for `has_two` route uri - --> $DIR/typed-uris-bad-params.rs:51:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:51:18 | 51 | uri!(has_two(name = "hi")); | ^^^^^^^^^^^ @@ -89,7 +89,7 @@ error: invalid parameters for `has_two` route uri = help: missing parameter: `id` error: invalid parameters for `has_two` route uri - --> $DIR/typed-uris-bad-params.rs:49:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:49:18 | 49 | uri!(has_two(id = 100, id = 100, )); | ^^^^^^^^^^^^^^^^^^^ @@ -97,39 +97,39 @@ error: invalid parameters for `has_two` route uri = note: uri parameters are: id: i32, name: String = help: missing parameter: `name` help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:49:28 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:49:28 | 49 | uri!(has_two(id = 100, id = 100, )); | ^^ error: invalid parameters for `has_one_guarded` route uri - --> $DIR/typed-uris-bad-params.rs:47:26 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:47:26 | 47 | uri!(has_one_guarded(id = 100, cookies = "hi")); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:47:36 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:47:36 | 47 | uri!(has_one_guarded(id = 100, cookies = "hi")); | ^^^^^^^ error: invalid parameters for `has_one_guarded` route uri - --> $DIR/typed-uris-bad-params.rs:45:26 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:45:26 | 45 | uri!(has_one_guarded(cookies = "hi", id = 100)); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:45:26 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:45:26 | 45 | uri!(has_one_guarded(cookies = "hi", id = 100)); | ^^^^^^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:43:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:43:18 | 43 | uri!(has_one(name = "hi")); | ^^^^^^^^^^^ @@ -137,96 +137,96 @@ error: invalid parameters for `has_one` route uri = note: uri parameters are: id: i32 = help: missing parameter: `id` help: unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:43:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:43:18 | 43 | uri!(has_one(name = "hi")); | ^^^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:41:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:41:18 | 41 | uri!(has_one(id = 100, id = 100, )); | ^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:41:28 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:41:28 | 41 | uri!(has_one(id = 100, id = 100, )); | ^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:39:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:39:18 | 39 | uri!(has_one(id = 100, id = 100)); | ^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:39:28 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:39:28 | 39 | uri!(has_one(id = 100, id = 100)); | ^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:37:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:37:18 | 37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameters: `name`, `age` - --> $DIR/typed-uris-bad-params.rs:37:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:37:18 | 37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50)); | ^^^^ ^^^ help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:37:50 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:37:50 | 37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50)); | ^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:35:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:35:18 | 35 | uri!(has_one(name = 100, age = 50, id = 100)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameters: `name`, `age` - --> $DIR/typed-uris-bad-params.rs:35:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:35:18 | 35 | uri!(has_one(name = 100, age = 50, id = 100)); | ^^^^ ^^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:33:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:33:18 | 33 | uri!(has_one(name = 100, id = 100)); | ^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:33:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:33:18 | 33 | uri!(has_one(name = 100, id = 100)); | ^^^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:31:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:31:18 | 31 | uri!(has_one(id = 100, name = "hi")); | ^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:31:28 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:31:28 | 31 | uri!(has_one(id = 100, name = "hi")); | ^^^^ error: route expects 2 parameters but 1 was supplied - --> $DIR/typed-uris-bad-params.rs:29:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:29:18 | 29 | uri!(has_two(10)); | ^^ @@ -234,7 +234,7 @@ error: route expects 2 parameters but 1 was supplied = note: route `has_two` has uri "/?" error: route expects 2 parameters but 3 were supplied - --> $DIR/typed-uris-bad-params.rs:28:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:28:18 | 28 | uri!(has_two(10, "hi", "there")); | ^^^^^^^^^^^^^^^^^ @@ -242,7 +242,7 @@ error: route expects 2 parameters but 3 were supplied = note: route `has_two` has uri "/?" error: route expects 1 parameter but 2 were supplied - --> $DIR/typed-uris-bad-params.rs:26:26 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:26:26 | 26 | uri!(has_one_guarded("hi", 100)); | ^^^^^^^^^ @@ -250,7 +250,7 @@ error: route expects 1 parameter but 2 were supplied = note: route `has_one_guarded` has uri "/" error: route expects 1 parameter but 2 were supplied - --> $DIR/typed-uris-bad-params.rs:25:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:25:18 | 25 | uri!(has_one("Hello", 23, )); | ^^^^^^^^^^^^ @@ -258,7 +258,7 @@ error: route expects 1 parameter but 2 were supplied = note: route `has_one` has uri "/" error: route expects 1 parameter but 2 were supplied - --> $DIR/typed-uris-bad-params.rs:24:18 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:24:18 | 24 | uri!(has_one(1, 23)); | ^^^^^ @@ -266,7 +266,7 @@ error: route expects 1 parameter but 2 were supplied = note: route `has_one` has uri "/" error: route expects 1 parameter but 0 were supplied - --> $DIR/typed-uris-bad-params.rs:22:10 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:22:10 | 22 | uri!(has_one()); | ^^^^^^^ @@ -274,7 +274,7 @@ error: route expects 1 parameter but 0 were supplied = note: route `has_one` has uri "/" error: route expects 1 parameter but 0 were supplied - --> $DIR/typed-uris-bad-params.rs:21:10 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:21:10 | 21 | uri!(has_one); | ^^^^^^^ @@ -282,7 +282,7 @@ error: route expects 1 parameter but 0 were supplied = note: route `has_one` has uri "/" error[E0271]: type mismatch resolving `>::Error == &str` - --> $DIR/typed-uris-bad-params.rs:15:37 + --> tests/ui-fail-nightly/typed-uris-bad-params.rs:15:37 | 15 | fn optionals(id: Option, name: Result) { } | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str` diff --git a/core/codegen/tests/ui-fail-nightly/typed-uris-invalid-syntax.stderr b/core/codegen/tests/ui-fail-nightly/typed-uris-invalid-syntax.stderr index c0cd9ecc..c0b52477 100644 --- a/core/codegen/tests/ui-fail-nightly/typed-uris-invalid-syntax.stderr +++ b/core/codegen/tests/ui-fail-nightly/typed-uris-invalid-syntax.stderr @@ -1,151 +1,151 @@ error: expected identifier - --> $DIR/typed-uris-invalid-syntax.rs:10:28 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:10:28 | 10 | uri!(simple: id = 100, "Hello"); | ^^^^^^^ error: named and unnamed parameters cannot be mixed - --> $DIR/typed-uris-invalid-syntax.rs:11:17 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:11:17 | 11 | uri!(simple(id = 100, "Hello")); | ^^^^^^^^^^^^^^^^^ error: named and unnamed parameters cannot be mixed - --> $DIR/typed-uris-invalid-syntax.rs:12:17 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:12:17 | 12 | uri!(simple("Hello", id = 100)); | ^^^^^^^^^^^^^^^^^ error: unexpected token - --> $DIR/typed-uris-invalid-syntax.rs:14:16 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:14:16 | 14 | uri!(simple:); | ^ error: invalid URI: unexpected EOF: expected token ':' at index 5 - --> $DIR/typed-uris-invalid-syntax.rs:16:16 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:16:16 | 16 | uri!("mount", simple); | ^ error: invalid URI: unexpected EOF: expected token ':' at index 5 - --> $DIR/typed-uris-invalid-syntax.rs:17:16 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:17:16 | 17 | uri!("mount", simple, "http://"); | ^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:18:28 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:18:28 | 18 | uri!("/mount", simple, "http://"); | ^^^^^^^^^ error: expected 1, 2, or 3 arguments, found 4 - --> $DIR/typed-uris-invalid-syntax.rs:19:36 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:19:36 | 19 | uri!("/mount", simple, "#foo", "?foo"); | ^^^^^^ error: invalid URI: unexpected EOF: expected token ':' at index 5 - --> $DIR/typed-uris-invalid-syntax.rs:20:16 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:20:16 | 20 | uri!("mount", simple(10, "hi"), "http://"); | ^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:21:38 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:21:38 | 21 | uri!("/mount", simple(10, "hi"), "http://"); | ^^^^^^^^^ error: URI prefix cannot contain query part - --> $DIR/typed-uris-invalid-syntax.rs:22:10 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:22:10 | 22 | uri!("/mount?foo", simple(10, "hi"), "foo/bar?foo#bar"); | ^^^^^^^^^^^^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:23:38 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:23:38 | 23 | uri!("/mount", simple(10, "hi"), "a/b"); | ^^^^^ error: expected 1, 2, or 3 arguments, found 4 - --> $DIR/typed-uris-invalid-syntax.rs:24:46 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:24:46 | 24 | uri!("/mount", simple(10, "hi"), "#foo", "?foo"); | ^^^^^^ error: invalid URI: unexpected token '<' at index 7 - --> $DIR/typed-uris-invalid-syntax.rs:25:18 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:25:18 | 25 | uri!("/mount/", simple); | ^ error: expected at least 1 argument, found none - --> $DIR/typed-uris-invalid-syntax.rs:26:5 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:26:5 | 26 | uri!(); - | ^^^^^^^ + | ^^^^^^ | = note: this error originates in the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected token - --> $DIR/typed-uris-invalid-syntax.rs:27:16 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:27:16 | 27 | uri!(simple: id = ); | ^ error: unexpected end of input, expected expression - --> $DIR/typed-uris-invalid-syntax.rs:28:22 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:28:22 | 28 | uri!(simple(id = )); | ^ error: invalid URI: unexpected EOF: expected some token at index 0 - --> $DIR/typed-uris-invalid-syntax.rs:29:11 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:29:11 | 29 | uri!("*", simple(10), "hi"); | ^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:30:40 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:30:40 | 30 | uri!("some.host:8088", simple(10), "hi"); | ^^^^ error: expected identifier - --> $DIR/typed-uris-invalid-syntax.rs:33:18 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:33:18 | 33 | uri!("/foo", "bar"); | ^^^^^ error: unexpected token - --> $DIR/typed-uris-invalid-syntax.rs:34:17 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:34:17 | 34 | uri!("/foo" ("bar")); | ^^^^^^^ error: URI prefix cannot contain query part - --> $DIR/typed-uris-invalid-syntax.rs:35:10 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:35:10 | 35 | uri!("ftp:?", index); | ^^^^^^^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:36:25 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:36:25 | 36 | uri!("ftp:", index, "foo#bar"); | ^^^^^^^^^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:37:25 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:37:25 | 37 | uri!("ftp:", index, "foo?bar"); | ^^^^^^^^^ error: route expects 2 parameters but 0 were supplied - --> $DIR/typed-uris-invalid-syntax.rs:13:10 + --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:13:10 | 13 | uri!(simple,); | ^^^^^^ diff --git a/core/codegen/tests/ui-fail-nightly/uri_display.stderr b/core/codegen/tests/ui-fail-nightly/uri_display.stderr index 6caf4379..96ada3fa 100644 --- a/core/codegen/tests/ui-fail-nightly/uri_display.stderr +++ b/core/codegen/tests/ui-fail-nightly/uri_display.stderr @@ -1,109 +1,109 @@ error: fieldless structs are not supported - --> $DIR/uri_display.rs:4:1 + --> tests/ui-fail-nightly/uri_display.rs:4:1 | 4 | struct Foo1; | ^^^^^^^^^^^^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:3:10 + --> tests/ui-fail-nightly/uri_display.rs:3:10 | 3 | #[derive(UriDisplayQuery)] | ^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info) error: fieldless structs are not supported - --> $DIR/uri_display.rs:7:1 + --> tests/ui-fail-nightly/uri_display.rs:7:1 | 7 | struct Foo2(); | ^^^^^^^^^^^^^^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:6:10 + --> tests/ui-fail-nightly/uri_display.rs:6:10 | 6 | #[derive(UriDisplayQuery)] | ^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info) error: empty enums are not supported - --> $DIR/uri_display.rs:10:11 + --> tests/ui-fail-nightly/uri_display.rs:10:11 | 10 | enum Foo3 { } | ^^^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:9:10 + --> tests/ui-fail-nightly/uri_display.rs:9:10 | 9 | #[derive(UriDisplayQuery)] | ^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info) error: tuple structs or variants must have exactly one field - --> $DIR/uri_display.rs:18:12 + --> tests/ui-fail-nightly/uri_display.rs:18:12 | 18 | struct Foo5(String, String); | ^^^^^^^^^^^^^^^^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:17:10 + --> tests/ui-fail-nightly/uri_display.rs:17:10 | 17 | #[derive(UriDisplayQuery)] | ^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected list `#[attr(..)]`, found bare integer literal - --> $DIR/uri_display.rs:22:20 + --> tests/ui-fail-nightly/uri_display.rs:22:20 | 22 | #[field(name = 123)] | ^^^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:20:10 + --> tests/ui-fail-nightly/uri_display.rs:20:10 | 20 | #[derive(UriDisplayQuery)] | ^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info) error: struct must have exactly one field - --> $DIR/uri_display.rs:27:12 + --> tests/ui-fail-nightly/uri_display.rs:27:12 | 27 | struct Foo7(String, usize); | ^^^^^^^^^^^^^^^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:26:10 + --> tests/ui-fail-nightly/uri_display.rs:26:10 | 26 | #[derive(UriDisplayPath)] | ^^^^^^^^^^^^^^ = note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info) error: struct must have exactly one field - --> $DIR/uri_display.rs:30:1 + --> tests/ui-fail-nightly/uri_display.rs:30:1 | 30 | struct Foo8; | ^^^^^^^^^^^^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:29:10 + --> tests/ui-fail-nightly/uri_display.rs:29:10 | 29 | #[derive(UriDisplayPath)] | ^^^^^^^^^^^^^^ = note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info) error: enums are not supported - --> $DIR/uri_display.rs:33:1 + --> tests/ui-fail-nightly/uri_display.rs:33:1 | 33 | enum Foo9 { } | ^^^^^^^^^^^^^^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:32:10 + --> tests/ui-fail-nightly/uri_display.rs:32:10 | 32 | #[derive(UriDisplayPath)] | ^^^^^^^^^^^^^^ = note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info) error: named structs are not supported - --> $DIR/uri_display.rs:36:1 + --> tests/ui-fail-nightly/uri_display.rs:36:1 | 36 | / struct Foo10 { 37 | | named: usize @@ -111,7 +111,7 @@ error: named structs are not supported | |_^ | note: error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:35:10 + --> tests/ui-fail-nightly/uri_display.rs:35:10 | 35 | #[derive(UriDisplayPath)] | ^^^^^^^^^^^^^^ 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 index 13d31426..99cf3b73 100644 --- a/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr @@ -1,61 +1,96 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:6:13 - | -6 | struct Bar1(BadType); - | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:6:13 + | +6 | struct Bar1(BadType); + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` +note: required by a bound in `rocket::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 `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:10:5 - | -10 | field: BadType, - | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:10:5 + | +10 | field: BadType, + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` +note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::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 `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:16:5 - | -16 | bad: BadType, - | ^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:16:5 + | +16 | bad: BadType, + | ^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` +note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::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 `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:21:11 - | -21 | Inner(BadType), - | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` - = note: 1 redundant requirements hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:21:11 + | +21 | Inner(BadType), + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: 1 redundant requirement hidden + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` +note: required by a bound in `rocket::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 `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:27:9 - | -27 | field: BadType, - | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` - = note: 1 redundant requirements hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:27:9 + | +27 | field: BadType, + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: 1 redundant requirement hidden + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` +note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::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 `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:35:9 - | -35 | other: BadType, - | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` - = note: 1 redundant requirements hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:35:9 + | +35 | other: BadType, + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: 1 redundant requirement hidden + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` +note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::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 `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:40:12 - | -40 | struct Baz(BadType); - | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:40:12 + | +40 | struct Baz(BadType); + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` +note: required by a bound in `rocket::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 `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` diff --git a/core/codegen/tests/ui-fail-stable/async-entry.stderr b/core/codegen/tests/ui-fail-stable/async-entry.stderr index d5eb48ef..ae9c0593 100644 --- a/core/codegen/tests/ui-fail-stable/async-entry.stderr +++ b/core/codegen/tests/ui-fail-stable/async-entry.stderr @@ -1,5 +1,5 @@ error: attribute can only be applied to `async` functions - --> $DIR/async-entry.rs:4:5 + --> tests/ui-fail-stable/async-entry.rs:4:5 | 4 | #[rocket::main] | ^^^^^^^^^^^^^^^ @@ -7,13 +7,13 @@ error: attribute can only be applied to `async` functions = note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info) error: [note] this function must be `async` - --> $DIR/async-entry.rs:5:5 + --> tests/ui-fail-stable/async-entry.rs:5:5 | 5 | fn foo() { } | ^^ error: attribute can only be applied to `async` functions - --> $DIR/async-entry.rs:16:5 + --> tests/ui-fail-stable/async-entry.rs:16:5 | 16 | #[rocket::main] | ^^^^^^^^^^^^^^^ @@ -21,14 +21,14 @@ error: attribute can only be applied to `async` functions = note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info) error: [note] this function must be `async` - --> $DIR/async-entry.rs:17:5 + --> tests/ui-fail-stable/async-entry.rs:17:5 | 17 | fn main() { | ^^ error: attribute cannot be applied to `main` function - --- note: this attribute generates a `main` function - --> $DIR/async-entry.rs:49:5 + --- note: this attribute generates a `main` function + --> tests/ui-fail-stable/async-entry.rs:49:5 | 49 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ @@ -36,13 +36,13 @@ error: attribute cannot be applied to `main` function = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: [note] this function cannot be `main` - --> $DIR/async-entry.rs:50:8 + --> tests/ui-fail-stable/async-entry.rs:50:8 | 50 | fn main() -> rocekt::Rocket { | ^^^^ error: attribute can only be applied to functions that return a value - --> $DIR/async-entry.rs:56:5 + --> tests/ui-fail-stable/async-entry.rs:56:5 | 56 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ @@ -50,13 +50,13 @@ error: attribute can only be applied to functions that return a value = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: [note] this function must return a value - --> $DIR/async-entry.rs:57:5 + --> 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 - --> $DIR/async-entry.rs:64:5 + --> tests/ui-fail-stable/async-entry.rs:64:5 | 64 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ @@ -64,14 +64,14 @@ error: attribute can only be applied to functions that return a value = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: [note] this function must return a value - --> $DIR/async-entry.rs:65:5 + --> tests/ui-fail-stable/async-entry.rs:65:5 | 65 | fn rocket() { | ^^ error: attribute cannot be applied to `main` function - --- note: this attribute generates a `main` function - --> $DIR/async-entry.rs:79:5 + --- note: this attribute generates a `main` function + --> tests/ui-fail-stable/async-entry.rs:79:5 | 79 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ @@ -79,14 +79,14 @@ error: attribute cannot be applied to `main` function = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: [note] this function cannot be `main` - --> $DIR/async-entry.rs:80:8 + --> tests/ui-fail-stable/async-entry.rs:80:8 | 80 | fn main() -> &'static str { | ^^^^ error: attribute cannot be applied to `main` function - --- note: this attribute generates a `main` function - --> $DIR/async-entry.rs:87:5 + --- note: this attribute generates a `main` function + --> tests/ui-fail-stable/async-entry.rs:87:5 | 87 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ @@ -94,13 +94,13 @@ error: attribute cannot be applied to `main` function = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error: [note] this function cannot be `main` - --> $DIR/async-entry.rs:88:14 + --> tests/ui-fail-stable/async-entry.rs:88:14 | 88 | async fn main() -> _ { | ^^^^ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/async-entry.rs:73:17 + --> tests/ui-fail-stable/async-entry.rs:73:17 | 72 | fn rocket() -> _ { | ------ this is not `async` @@ -108,7 +108,7 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0308]: mismatched types - --> $DIR/async-entry.rs:35:9 + --> tests/ui-fail-stable/async-entry.rs:35:9 | 35 | rocket::build() | ^^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `Rocket` @@ -117,7 +117,7 @@ error[E0308]: mismatched types found struct `Rocket` error[E0308]: mismatched types - --> $DIR/async-entry.rs:44:9 + --> tests/ui-fail-stable/async-entry.rs:44:9 | 44 | "hi".to_string() | ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `std::string::String` @@ -126,7 +126,7 @@ error[E0308]: mismatched types found struct `std::string::String` error[E0308]: mismatched types - --> $DIR/async-entry.rs:24:21 + --> tests/ui-fail-stable/async-entry.rs:24:21 | 24 | async fn main() { | ^ expected `()` because of default return type @@ -142,7 +142,7 @@ error[E0308]: mismatched types found struct `Rocket` error[E0308]: mismatched types - --> $DIR/async-entry.rs:33:26 + --> tests/ui-fail-stable/async-entry.rs:33:26 | 33 | async fn rocket() -> String { | ^^^^^^ @@ -154,7 +154,7 @@ error[E0308]: mismatched types found struct `std::string::String` error[E0277]: `main` has invalid return type `Rocket` - --> $DIR/async-entry.rs:94:20 + --> tests/ui-fail-stable/async-entry.rs:94:20 | 94 | async fn main() -> rocket::Rocket { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination` 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 423c7105..9a79954b 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 - --- help: use a name such as `_guard` or `_param` - --> $DIR/bad-ignored-segments.rs:6:7 + --- help: use a name such as `_guard` or `_param` + --> tests/ui-fail-stable/bad-ignored-segments.rs:6:7 | 6 | #[get("/c?<_>")] | ^^^^^^^^ error: parameter must be named - --- help: use a name such as `_guard` or `_param` - --> $DIR/bad-ignored-segments.rs:9:21 + --- help: use a name such as `_guard` or `_param` + --> tests/ui-fail-stable/bad-ignored-segments.rs:9:21 | 9 | #[post("/d", data = "<_>")] | ^^^^^ diff --git a/core/codegen/tests/ui-fail-stable/catch.stderr b/core/codegen/tests/ui-fail-stable/catch.stderr index b720f953..9653e494 100644 --- a/core/codegen/tests/ui-fail-stable/catch.stderr +++ b/core/codegen/tests/ui-fail-stable/catch.stderr @@ -1,67 +1,67 @@ error: expected `fn` - --- help: `#[catch]` can only be used on functions - --> $DIR/catch.rs:6:1 + --- help: `#[catch]` can only be used on functions + --> tests/ui-fail-stable/catch.rs:6:1 | 6 | struct Catcher(String); | ^^^^^^ error: expected `fn` - --- help: `#[catch]` can only be used on functions - --> $DIR/catch.rs:9:7 + --- help: `#[catch]` can only be used on functions + --> tests/ui-fail-stable/catch.rs:9:7 | 9 | const CATCH: &str = "Catcher"; | ^^^^^ error: expected integer or `default`, found string literal - --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` - --> $DIR/catch.rs:11:9 + --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` + --> tests/ui-fail-stable/catch.rs:11:9 | 11 | #[catch("404")] | ^^^^^ error: unexpected keyed parameter: expected literal or identifier - --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` - --> $DIR/catch.rs:14:9 + --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` + --> tests/ui-fail-stable/catch.rs:14:9 | 14 | #[catch(code = "404")] | ^^^^ error: unexpected keyed parameter: expected literal or identifier - --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` - --> $DIR/catch.rs:17:9 + --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` + --> tests/ui-fail-stable/catch.rs:17:9 | 17 | #[catch(code = 404)] | ^^^^ error: status must be in range [100, 599] - --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` - --> $DIR/catch.rs:20:9 + --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` + --> tests/ui-fail-stable/catch.rs:20:9 | 20 | #[catch(99)] | ^^ error: status must be in range [100, 599] - --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` - --> $DIR/catch.rs:23:9 + --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` + --> tests/ui-fail-stable/catch.rs:23:9 | 23 | #[catch(600)] | ^^^ error: unexpected attribute parameter: `message` - --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` - --> $DIR/catch.rs:26:14 + --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` + --> tests/ui-fail-stable/catch.rs:26:14 | 26 | #[catch(400, message = "foo")] | ^^^^^^^ error[E0308]: mismatched types - --> $DIR/catch.rs:30:17 + --> tests/ui-fail-stable/catch.rs:30:17 | 30 | fn f3(_request: &Request, other: bool) { } | ^ expected `&rocket::Request<'_>`, found struct `Status` error[E0308]: mismatched types - --> $DIR/catch.rs:30:34 + --> tests/ui-fail-stable/catch.rs:30:34 | 30 | fn f3(_request: &Request, other: bool) { } | ^^^^ expected `bool`, found `&rocket::Request<'_>` diff --git a/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr b/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr index 7d3a56a5..b3ab0ba2 100644 --- a/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr @@ -1,37 +1,37 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/catch_type_errors.rs:6:30 + --> 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` - | - = note: required by `respond_to` error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied - --> $DIR/catch_type_errors.rs:11:30 + --> 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` - | - = note: required by `respond_to` error[E0308]: mismatched types - --> $DIR/catch_type_errors.rs:16:17 + --> tests/ui-fail-stable/catch_type_errors.rs:16:17 | 16 | fn f3(_request: bool) -> usize { | ^^^^ expected `bool`, found `&rocket::Request<'_>` error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/catch_type_errors.rs:16:26 + --> 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` - | - = note: required by `respond_to` error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/catch_type_errors.rs:21:12 + --> 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` - | - = note: required by `respond_to` diff --git a/core/codegen/tests/ui-fail-stable/from_form.stderr b/core/codegen/tests/ui-fail-stable/from_form.stderr index a464db29..08056457 100644 --- a/core/codegen/tests/ui-fail-stable/from_form.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form.stderr @@ -1,11 +1,11 @@ error: enums are not supported - --> $DIR/from_form.rs:4:1 + --> tests/ui-fail-stable/from_form.rs:4:1 | 4 | enum Thing { } | ^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:3:10 + --> tests/ui-fail-stable/from_form.rs:3:10 | 3 | #[derive(FromForm)] | ^^^^^^^^ @@ -13,13 +13,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: at least one field is required - --> $DIR/from_form.rs:7:1 + --> tests/ui-fail-stable/from_form.rs:7:1 | 7 | struct Foo1; | ^^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:6:10 + --> tests/ui-fail-stable/from_form.rs:6:10 | 6 | #[derive(FromForm)] | ^^^^^^^^ @@ -27,13 +27,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: at least one field is required - --> $DIR/from_form.rs:10:13 + --> tests/ui-fail-stable/from_form.rs:10:13 | 10 | struct Foo2 { } | ^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:9:10 + --> tests/ui-fail-stable/from_form.rs:9:10 | 9 | #[derive(FromForm)] | ^^^^^^^^ @@ -41,13 +41,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: tuple struct must have exactly one field - --> $DIR/from_form.rs:16:12 + --> tests/ui-fail-stable/from_form.rs:16:12 | 16 | struct Foo4(usize, usize, usize); | ^^^^^^^^^^^^^^^^^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:15:10 + --> tests/ui-fail-stable/from_form.rs:15:10 | 15 | #[derive(FromForm)] | ^^^^^^^^ @@ -55,13 +55,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: only one lifetime is supported - --> $DIR/from_form.rs:19:25 + --> tests/ui-fail-stable/from_form.rs:19:25 | 19 | struct NextTodoTask<'f, 'a> { | ^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:18:10 + --> tests/ui-fail-stable/from_form.rs:18:10 | 18 | #[derive(FromForm)] | ^^^^^^^^ @@ -69,14 +69,14 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' - --> $DIR/from_form.rs:28:20 + --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + --> tests/ui-fail-stable/from_form.rs:28:20 | 28 | #[field(name = "isindex")] | ^^^^^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:26:10 + --> tests/ui-fail-stable/from_form.rs:26:10 | 26 | #[derive(FromForm)] | ^^^^^^^^ @@ -84,25 +84,25 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form.rs:36:5 + --> tests/ui-fail-stable/from_form.rs:36:5 | 36 | foo: usize, | ^^^ error: [help] declared in this field - --> $DIR/from_form.rs:36:5 + --> tests/ui-fail-stable/from_form.rs:36:5 | 36 | foo: usize, | ^^^ error: [note] previous field with conflicting name - --> $DIR/from_form.rs:34:5 + --> tests/ui-fail-stable/from_form.rs:34:5 | 34 | #[field(name = "foo")] | ^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:32:10 + --> tests/ui-fail-stable/from_form.rs:32:10 | 32 | #[derive(FromForm)] | ^^^^^^^^ @@ -110,25 +110,25 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form.rs:43:20 + --> tests/ui-fail-stable/from_form.rs:43:20 | 43 | #[field(name = "hello")] | ^^^^^^^ error: [help] declared in this field - --> $DIR/from_form.rs:43:5 + --> tests/ui-fail-stable/from_form.rs:43:5 | 43 | #[field(name = "hello")] | ^ error: [note] previous field with conflicting name - --> $DIR/from_form.rs:41:5 + --> tests/ui-fail-stable/from_form.rs:41:5 | 41 | #[field(name = "hello")] | ^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:39:10 + --> tests/ui-fail-stable/from_form.rs:39:10 | 39 | #[derive(FromForm)] | ^^^^^^^^ @@ -136,25 +136,25 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field name conflicts with previous name - --> $DIR/from_form.rs:50:20 + --> tests/ui-fail-stable/from_form.rs:50:20 | 50 | #[field(name = "first")] | ^^^^^^^ error: [help] declared in this field - --> $DIR/from_form.rs:50:5 + --> tests/ui-fail-stable/from_form.rs:50:5 | 50 | #[field(name = "first")] | ^ error: [note] previous field with conflicting name - --> $DIR/from_form.rs:49:5 + --> tests/ui-fail-stable/from_form.rs:49:5 | 49 | first: String, | ^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:47:10 + --> tests/ui-fail-stable/from_form.rs:47:10 | 47 | #[derive(FromForm)] | ^^^^^^^^ @@ -162,13 +162,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected attribute parameter: `field` - --> $DIR/from_form.rs:56:28 + --> tests/ui-fail-stable/from_form.rs:56:28 | 56 | #[field(name = "blah", field = "bloo")] | ^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:54:10 + --> tests/ui-fail-stable/from_form.rs:54:10 | 54 | #[derive(FromForm)] | ^^^^^^^^ @@ -176,13 +176,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected list `#[field(..)]`, found bare path "field" - --> $DIR/from_form.rs:62:7 + --> tests/ui-fail-stable/from_form.rs:62:7 | 62 | #[field] | ^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:60:10 + --> tests/ui-fail-stable/from_form.rs:60:10 | 60 | #[derive(FromForm)] | ^^^^^^^^ @@ -190,13 +190,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected key/value `key = value` - --> $DIR/from_form.rs:68:13 + --> tests/ui-fail-stable/from_form.rs:68:13 | 68 | #[field("blah")] | ^^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:66:10 + --> tests/ui-fail-stable/from_form.rs:66:10 | 66 | #[derive(FromForm)] | ^^^^^^^^ @@ -204,13 +204,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected key/value `key = value` - --> $DIR/from_form.rs:74:13 + --> tests/ui-fail-stable/from_form.rs:74:13 | 74 | #[field(123)] | ^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:72:10 + --> tests/ui-fail-stable/from_form.rs:72:10 | 72 | #[derive(FromForm)] | ^^^^^^^^ @@ -218,13 +218,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected attribute parameter: `beep` - --> $DIR/from_form.rs:80:13 + --> tests/ui-fail-stable/from_form.rs:80:13 | 80 | #[field(beep = "bop")] | ^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:78:10 + --> tests/ui-fail-stable/from_form.rs:78:10 | 78 | #[derive(FromForm)] | ^^^^^^^^ @@ -232,25 +232,25 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: field has conflicting names - --> $DIR/from_form.rs:86:5 + --> tests/ui-fail-stable/from_form.rs:86:5 | 86 | #[field(name = "blah")] | ^ error: [note] this field name... - --> $DIR/from_form.rs:86:20 + --> tests/ui-fail-stable/from_form.rs:86:20 | 86 | #[field(name = "blah")] | ^^^^^^ error: [note] ...conflicts with this field name - --> $DIR/from_form.rs:87:20 + --> tests/ui-fail-stable/from_form.rs:87:20 | 87 | #[field(name = "blah")] | ^^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:84:10 + --> tests/ui-fail-stable/from_form.rs:84:10 | 84 | #[derive(FromForm)] | ^^^^^^^^ @@ -258,13 +258,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected list `#[attr(..)]`, found bare boolean literal - --> $DIR/from_form.rs:93:20 + --> tests/ui-fail-stable/from_form.rs:93:20 | 93 | #[field(name = true)] | ^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:91:10 + --> tests/ui-fail-stable/from_form.rs:91:10 | 91 | #[derive(FromForm)] | ^^^^^^^^ @@ -272,13 +272,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found bare path "name" - --> $DIR/from_form.rs:99:13 + --> tests/ui-fail-stable/from_form.rs:99:13 | 99 | #[field(name)] | ^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:97:10 + --> tests/ui-fail-stable/from_form.rs:97:10 | 97 | #[derive(FromForm)] | ^^^^^^^^ @@ -286,13 +286,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected list `#[attr(..)]`, found bare integer literal - --> $DIR/from_form.rs:105:20 + --> tests/ui-fail-stable/from_form.rs:105:20 | 105 | #[field(name = 123)] | ^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:103:10 + --> tests/ui-fail-stable/from_form.rs:103:10 | 103 | #[derive(FromForm)] | ^^^^^^^^ @@ -300,14 +300,14 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' - --> $DIR/from_form.rs:111:20 + --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + --> tests/ui-fail-stable/from_form.rs:111:20 | 111 | #[field(name = "hello&world")] | ^^^^^^^^^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:109:10 + --> tests/ui-fail-stable/from_form.rs:109:10 | 109 | #[derive(FromForm)] | ^^^^^^^^ @@ -315,14 +315,14 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' - --> $DIR/from_form.rs:117:20 + --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + --> tests/ui-fail-stable/from_form.rs:117:20 | 117 | #[field(name = "!@#$%^&*()_")] | ^^^^^^^^^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:115:10 + --> tests/ui-fail-stable/from_form.rs:115:10 | 115 | #[derive(FromForm)] | ^^^^^^^^ @@ -330,14 +330,14 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' - --> $DIR/from_form.rs:123:20 + --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + --> tests/ui-fail-stable/from_form.rs:123:20 | 123 | #[field(name = "?")] | ^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:121:10 + --> tests/ui-fail-stable/from_form.rs:121:10 | 121 | #[derive(FromForm)] | ^^^^^^^^ @@ -345,14 +345,14 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' - --> $DIR/from_form.rs:129:20 + --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + --> tests/ui-fail-stable/from_form.rs:129:20 | 129 | #[field(name = "")] | ^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:127:10 + --> tests/ui-fail-stable/from_form.rs:127:10 | 127 | #[derive(FromForm)] | ^^^^^^^^ @@ -360,14 +360,14 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' - --> $DIR/from_form.rs:135:20 + --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + --> tests/ui-fail-stable/from_form.rs:135:20 | 135 | #[field(name = "a&b")] | ^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:133:10 + --> tests/ui-fail-stable/from_form.rs:133:10 | 133 | #[derive(FromForm)] | ^^^^^^^^ @@ -375,14 +375,14 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' - --> $DIR/from_form.rs:141:20 + --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + --> tests/ui-fail-stable/from_form.rs:141:20 | 141 | #[field(name = "a=")] | ^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:139:10 + --> tests/ui-fail-stable/from_form.rs:139:10 | 139 | #[derive(FromForm)] | ^^^^^^^^ @@ -390,13 +390,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: duplicate attribute parameter: default - --> $DIR/from_form.rs:177:26 + --> tests/ui-fail-stable/from_form.rs:177:26 | 177 | #[field(default = 1, default = 2)] | ^^^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:175:10 + --> tests/ui-fail-stable/from_form.rs:175:10 | 175 | #[derive(FromForm)] | ^^^^^^^^ @@ -404,14 +404,14 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: duplicate default field expression - --- help: at most one `default` or `default_with` is allowed - --> $DIR/from_form.rs:184:23 + --- help: at most one `default` or `default_with` is allowed + --> tests/ui-fail-stable/from_form.rs:184:23 | 184 | #[field(default = 2)] | ^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:181:10 + --> tests/ui-fail-stable/from_form.rs:181:10 | 181 | #[derive(FromForm)] | ^^^^^^^^ @@ -419,20 +419,20 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: duplicate default expressions - --- help: only one of `default` or `default_with` must be used - --> $DIR/from_form.rs:190:23 + --- help: only one of `default` or `default_with` must be used + --> tests/ui-fail-stable/from_form.rs:190:23 | 190 | #[field(default = 1, default_with = None)] | ^ error: [note] other default expression is here - --> $DIR/from_form.rs:190:41 + --> tests/ui-fail-stable/from_form.rs:190:41 | 190 | #[field(default = 1, default_with = None)] | ^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:188:10 + --> tests/ui-fail-stable/from_form.rs:188:10 | 188 | #[derive(FromForm)] | ^^^^^^^^ @@ -440,20 +440,20 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error: duplicate default expressions - --- help: only one of `default` or `default_with` must be used - --> $DIR/from_form.rs:197:23 + --- help: only one of `default` or `default_with` must be used + --> tests/ui-fail-stable/from_form.rs:197:23 | 197 | #[field(default = 1)] | ^ error: [note] other default expression is here - --> $DIR/from_form.rs:196:28 + --> tests/ui-fail-stable/from_form.rs:196:28 | 196 | #[field(default_with = None)] | ^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form.rs:194:10 + --> tests/ui-fail-stable/from_form.rs:194:10 | 194 | #[derive(FromForm)] | ^^^^^^^^ @@ -461,13 +461,13 @@ error: [note] error occurred while deriving `FromForm` = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `unknown` in this scope - --> $DIR/from_form.rs:153:24 + --> tests/ui-fail-stable/from_form.rs:153:24 | 153 | #[field(validate = unknown())] | ^^^^^^^ not found in this scope error[E0308]: mismatched types - --> $DIR/from_form.rs:147:24 + --> tests/ui-fail-stable/from_form.rs:147:24 | 147 | #[field(validate = 123)] | -------- ^^^ expected enum `Result`, found integer @@ -478,7 +478,7 @@ error[E0308]: mismatched types found type `{integer}` error[E0308]: mismatched types - --> $DIR/from_form.rs:160:12 + --> tests/ui-fail-stable/from_form.rs:160:12 | 160 | first: String, | ^^^^^^ expected enum `TempFile`, found struct `std::string::String` @@ -487,7 +487,7 @@ error[E0308]: mismatched types found reference `&std::string::String` error[E0308]: mismatched types - --> $DIR/from_form.rs:166:12 + --> tests/ui-fail-stable/from_form.rs:166:12 | 166 | first: String, | ^^^^^^ expected enum `TempFile`, found struct `std::string::String` @@ -496,13 +496,13 @@ error[E0308]: mismatched types found reference `&std::string::String` error[E0308]: mismatched types - --> $DIR/from_form.rs:165:28 + --> tests/ui-fail-stable/from_form.rs:165:28 | 165 | #[field(validate = ext("hello"))] | ^^^^^^^ expected struct `ContentType`, found `&str` error[E0277]: the trait bound `i32: From<&str>` is not satisfied - --> $DIR/from_form.rs:171:23 + --> tests/ui-fail-stable/from_form.rs:171:23 | 171 | #[field(default = "no conversion")] | ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `i32` @@ -516,7 +516,7 @@ error[E0277]: the trait bound `i32: From<&str>` is not satisfied = note: required because of the requirements on the impl of `Into` for `&str` error[E0308]: mismatched types - --> $DIR/from_form.rs:203:33 + --> tests/ui-fail-stable/from_form.rs:203:33 | 203 | #[field(default_with = Some("hi"))] | ^^^^ expected struct `std::string::String`, found `&str` @@ -524,6 +524,6 @@ error[E0308]: mismatched types help: try using a conversion method | 203 | #[field(default_with = Some("hi".to_string()))] - | ^^^^^^^^^^^^^^^^ + | ++++++++++++ 203 | #[field(default_with = Some("hi".to_string()))] - | ^^^^^^^^^^^^^^^^ + | ++++++++++++ diff --git a/core/codegen/tests/ui-fail-stable/responder-types.stderr b/core/codegen/tests/ui-fail-stable/responder-types.stderr index 61801f4f..152e5302 100644 --- a/core/codegen/tests/ui-fail-stable/responder-types.stderr +++ b/core/codegen/tests/ui-fail-stable/responder-types.stderr @@ -1,65 +1,80 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:5:5 + --> tests/ui-fail-stable/responder-types.rs:5:5 | 5 | thing: u8, | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` - | - = note: required by `respond_to` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:11:5 - | -11 | other: u8, - | ^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following implementations were found: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - and 8 others - = note: required because of the requirements on the impl of `Into>` for `u8` + --> tests/ui-fail-stable/responder-types.rs:11:5 + | +11 | other: u8, + | ^^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following implementations were found: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + and 8 others + = note: required because of the requirements on the impl of `Into>` for `u8` +note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header` error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:16:5 + --> tests/ui-fail-stable/responder-types.rs:16:5 | 16 | thing: u8, | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` - | - = note: required by `respond_to` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:17:5 - | -17 | other: u8, - | ^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following implementations were found: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - and 8 others - = note: required because of the requirements on the impl of `Into>` for `u8` + --> tests/ui-fail-stable/responder-types.rs:17:5 + | +17 | other: u8, + | ^^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following implementations were found: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + and 8 others + = note: required because of the requirements on the impl of `Into>` for `u8` +note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:24:5 - | -24 | then: String, - | ^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following implementations were found: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - and 8 others - = note: required because of the requirements on the impl of `Into>` for `std::string::String` + --> tests/ui-fail-stable/responder-types.rs:24:5 + | +24 | then: String, + | ^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following implementations were found: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + and 8 others + = note: required because of the requirements on the impl of `Into>` for `std::string::String` +note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header` error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:28:13 - | -28 | fn foo() -> usize { 0 } - | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` - | - = note: required by `route::handler::, Status, rocket::Data<'o>>>::from` + --> tests/ui-fail-stable/responder-types.rs:28:13 + | +28 | fn foo() -> usize { 0 } + | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` + | +note: required by a bound in `route::handler::, Status, rocket::Data<'o>>>::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, rocket::Data<'o>>>::from` 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 9a8d3cd0..8f6d4bd2 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 @@ -1,5 +1,5 @@ error: missing expected parameter: `uri` - --> $DIR/route-attribute-general-syntax.rs:4:1 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:4:1 | 4 | #[get()] | ^^^^^^^^ @@ -7,197 +7,197 @@ error: missing expected parameter: `uri` = note: this error originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected `fn` - --- help: #[get] can only be used on functions - --> $DIR/route-attribute-general-syntax.rs:9:1 + --- help: #[get] can only be used on functions + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:9:1 | 9 | struct S; | ^^^^^^ error: expected `fn` - --- help: #[get] can only be used on functions - --> $DIR/route-attribute-general-syntax.rs:12:1 + --- help: #[get] can only be used on functions + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:12:1 | 12 | enum A { } | ^^^^ error: expected `fn` - --- help: #[get] can only be used on functions - --> $DIR/route-attribute-general-syntax.rs:15:1 + --- help: #[get] can only be used on functions + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:15:1 | 15 | trait Foo { } | ^^^^^ error: expected `fn` - --- help: #[get] can only be used on functions - --> $DIR/route-attribute-general-syntax.rs:18:1 + --- help: #[get] can only be used on functions + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:18:1 | 18 | impl S { } | ^^^^ error: expected key/value `key = value` - --> $DIR/route-attribute-general-syntax.rs:21:12 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:21:12 | 21 | #[get("/", 123)] | ^^^ error: expected key/value `key = value` - --> $DIR/route-attribute-general-syntax.rs:24:12 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:24:12 | 24 | #[get("/", "/")] | ^^^ error: unexpected keyed parameter: expected literal or identifier - --> $DIR/route-attribute-general-syntax.rs:27:7 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:27:7 | 27 | #[get(data = "", "/")] | ^^^^ error: unexpected attribute parameter: `unknown` - --> $DIR/route-attribute-general-syntax.rs:30:12 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:30:12 | 30 | #[get("/", unknown = "foo")] | ^^^^^^^ error: expected key/value `key = value` - --> $DIR/route-attribute-general-syntax.rs:33:12 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:33:12 | 33 | #[get("/", ...)] | ^^^ error: handler arguments must be named - --- help: to name an ignored handler argument, use `_name` - --> $DIR/route-attribute-general-syntax.rs:39:7 + --- help: to name an ignored handler argument, use `_name` + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:39:7 | 39 | fn c1(_: usize) {} | ^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:43:7 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:43:7 | 43 | #[get(100)] | ^^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:46:7 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:46:7 | 46 | #[get('/')] | ^^^ error: invalid value: expected integer literal - --> $DIR/route-attribute-general-syntax.rs:49:19 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:49:19 | 49 | #[get("/", rank = "1")] | ^^^ error: invalid value: expected integer literal - --> $DIR/route-attribute-general-syntax.rs:52:19 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:52:19 | 52 | #[get("/", rank = '1')] | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:57:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:57:21 | 57 | #[get("/", format = "applicationx-custom")] | ^^^^^^^^^^^^^^^^^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:60:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:60:21 | 60 | #[get("/", format = "")] | ^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:63:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:63:21 | 63 | #[get("/", format = "//")] | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:66:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:66:21 | 66 | #[get("/", format = "/")] | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:69:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:69:21 | 69 | #[get("/", format = "a/")] | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:72:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:72:21 | 72 | #[get("/", format = "/a")] | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:75:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:75:21 | 75 | #[get("/", format = "/a/")] | ^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:78:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:78:21 | 78 | #[get("/", format = "a/b/")] | ^^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:81:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:81:21 | 81 | #[get("/", format = "unknown")] | ^^^^^^^^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:84:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:84:21 | 84 | #[get("/", format = 12)] | ^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:87:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:87:21 | 87 | #[get("/", format = 'j')] | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:90:21 + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:90:21 | 90 | #[get("/", format = "text//foo")] | ^^^^^^^^^^^ error: invalid HTTP method for route handlers - --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` - --> $DIR/route-attribute-general-syntax.rs:95:9 + --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:95:9 | 95 | #[route(CONNECT, "/")] | ^^^^^^^ error: invalid HTTP method - --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` - --> $DIR/route-attribute-general-syntax.rs:98:9 + --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:98:9 | 98 | #[route(FIX, "/")] | ^^^ error: expected identifier, found string literal - --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` - --> $DIR/route-attribute-general-syntax.rs:101:9 + --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:101:9 | 101 | #[route("hi", "/")] | ^^^^ error: expected identifier, found string literal - --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` - --> $DIR/route-attribute-general-syntax.rs:104:9 + --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:104:9 | 104 | #[route("GET", "/")] | ^^^^^ error: expected identifier, found integer literal - --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` - --> $DIR/route-attribute-general-syntax.rs:107:9 + --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` + --> tests/ui-fail-stable/route-attribute-general-syntax.rs:107:9 | 107 | #[route(120, "/")] | ^^^ 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 463166ae..c48ccadc 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,182 +1,182 @@ error: invalid route URI: expected token '/' but found 'a' at index 0 - --- help: expected URI in origin form: "/path/" - --> $DIR/route-path-bad-syntax.rs:5:7 + --- help: expected URI in origin form: "/path/" + --> 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 - --- help: expected URI in origin form: "/path/" - --> $DIR/route-path-bad-syntax.rs:8:7 + --- help: expected URI in origin form: "/path/" + --> 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 - --- help: expected URI in origin form: "/path/" - --> $DIR/route-path-bad-syntax.rs:11:7 + --- help: expected URI in origin form: "/path/" + --> tests/ui-fail-stable/route-path-bad-syntax.rs:11:7 | 11 | #[get("a/b/c")] | ^^^^^^^ error: route URIs cannot contain empty segments - --- note: expected "/a/b", found "/a///b" - --> $DIR/route-path-bad-syntax.rs:14:7 + --- note: expected "/a/b", found "/a///b" + --> tests/ui-fail-stable/route-path-bad-syntax.rs:14:7 | 14 | #[get("/a///b")] | ^^^^^^^^ error: route URIs cannot contain empty segments - --- note: expected "/?bat", found "/?bat&&" - --> $DIR/route-path-bad-syntax.rs:17:7 + --- note: expected "/?bat", found "/?bat&&" + --> tests/ui-fail-stable/route-path-bad-syntax.rs:17:7 | 17 | #[get("/?bat&&")] | ^^^^^^^^^ error: route URIs cannot contain empty segments - --- note: expected "/?bat", found "/?bat&&" - --> $DIR/route-path-bad-syntax.rs:20:7 + --- note: expected "/?bat", found "/?bat&&" + --> tests/ui-fail-stable/route-path-bad-syntax.rs:20:7 | 20 | #[get("/?bat&&")] | ^^^^^^^^^ error: route URIs cannot contain empty segments - --- note: expected "/a/b", found "/a/b//" - --> $DIR/route-path-bad-syntax.rs:23:7 + --- note: expected "/a/b", found "/a/b//" + --> tests/ui-fail-stable/route-path-bad-syntax.rs:23:7 | 23 | #[get("/a/b//")] | ^^^^^^^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:42:7 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:42:7 | 42 | #[get("/")] | ^^^^^^^^^ error: [note] expected argument named `name` here - --> $DIR/route-path-bad-syntax.rs:43:6 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:43:6 | 43 | fn h0(_name: usize) {} | ^^^^^^^^^^^^^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:45:7 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:45:7 | 45 | #[get("/a?")] | ^^^^^^^^ error: [note] expected argument named `r` here - --> $DIR/route-path-bad-syntax.rs:46:6 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:46:6 | 46 | fn h1() {} | ^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:48:21 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:48:21 | 48 | #[post("/a", data = "")] | ^^^^^^^^ error: [note] expected argument named `test` here - --> $DIR/route-path-bad-syntax.rs:49:6 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:49:6 | 49 | fn h2() {} | ^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:51:7 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:51:7 | 51 | #[get("/<_r>")] | ^^^^^^^ error: [note] expected argument named `_r` here - --> $DIR/route-path-bad-syntax.rs:52:6 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:52:6 | 52 | fn h3() {} | ^^ error: unused parameter - --> $DIR/route-path-bad-syntax.rs:54:7 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:54:7 | 54 | #[get("/<_r>/")] | ^^^^^^^^^^^ error: [note] expected argument named `b` here - --> $DIR/route-path-bad-syntax.rs:55:6 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:55:6 | 55 | fn h4() {} | ^^ error: invalid identifier: `foo_.` - --- help: dynamic parameters must be valid identifiers - --- help: did you mean ``? - --> $DIR/route-path-bad-syntax.rs:60:7 + --- help: dynamic parameters must be valid identifiers + --- help: did you mean ``? + --> tests/ui-fail-stable/route-path-bad-syntax.rs:60:7 | 60 | #[get("/")] | ^^^^^^^^^^ error: invalid identifier: `foo*` - --- help: dynamic parameters must be valid identifiers - --- help: did you mean ``? - --> $DIR/route-path-bad-syntax.rs:63:7 + --- help: dynamic parameters must be valid identifiers + --- help: did you mean ``? + --> tests/ui-fail-stable/route-path-bad-syntax.rs:63:7 | 63 | #[get("/")] | ^^^^^^^^^ error: invalid identifier: `!` - --- help: dynamic parameters must be valid identifiers - --- help: did you mean ``? - --> $DIR/route-path-bad-syntax.rs:66:7 + --- help: dynamic parameters must be valid identifiers + --- help: did you mean ``? + --> tests/ui-fail-stable/route-path-bad-syntax.rs:66:7 | 66 | #[get("/")] | ^^^^^^ error: invalid identifier: `name>:`? - --> $DIR/route-path-bad-syntax.rs:69:7 + --- help: dynamic parameters must be valid identifiers + --- help: did you mean ``? + --> tests/ui-fail-stable/route-path-bad-syntax.rs:69:7 | 69 | #[get("/:")] | ^^^^^^^^^^^^^^ error: unexpected static parameter - --- help: parameter must be dynamic: `` - --> $DIR/route-path-bad-syntax.rs:74:19 + --- help: parameter must be dynamic: `` + --> tests/ui-fail-stable/route-path-bad-syntax.rs:74:19 | 74 | #[get("/", data = "foo")] | ^^^^^ error: parameter cannot be trailing - --- help: did you mean ``? - --> $DIR/route-path-bad-syntax.rs:77:19 + --- help: did you mean ``? + --> tests/ui-fail-stable/route-path-bad-syntax.rs:77:19 | 77 | #[get("/", data = "")] | ^^^^^^^^^ error: unexpected static parameter - --- help: parameter must be dynamic: `` - --> $DIR/route-path-bad-syntax.rs:80:19 + --- help: parameter must be dynamic: `` + --> tests/ui-fail-stable/route-path-bad-syntax.rs:80:19 | 80 | #[get("/", data = "`? - --> $DIR/route-path-bad-syntax.rs:83:19 + --- help: dynamic parameters must be valid identifiers + --- help: did you mean ``? + --> tests/ui-fail-stable/route-path-bad-syntax.rs:83:19 | 83 | #[get("/", data = "")] | ^^^^^^^^^ error: handler arguments must be named - --- help: to name an ignored handler argument, use `_name` - --> $DIR/route-path-bad-syntax.rs:89:7 + --- help: to name an ignored handler argument, use `_name` + --> tests/ui-fail-stable/route-path-bad-syntax.rs:89:7 | 89 | fn k0(_: usize) {} | ^ error: parameters cannot be empty - --> $DIR/route-path-bad-syntax.rs:93:7 + --> 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.stderr b/core/codegen/tests/ui-fail-stable/route-type-errors.stderr index e9f53ff9..d2abc24c 100644 --- a/core/codegen/tests/ui-fail-stable/route-type-errors.stderr +++ b/core/codegen/tests/ui-fail-stable/route-type-errors.stderr @@ -1,21 +1,17 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:6:12 + --> tests/ui-fail-stable/route-type-errors.rs:6:12 | 6 | fn f0(foo: Q) {} | ^ the trait `FromParam<'_>` is not implemented for `Q` - | - = note: required by `from_param` error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied - --> $DIR/route-type-errors.rs:9:12 + --> tests/ui-fail-stable/route-type-errors.rs:9:12 | 9 | fn f1(foo: Q) {} | ^ the trait `FromSegments<'_>` is not implemented for `Q` - | - = note: required by `from_segments` error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied - --> $DIR/route-type-errors.rs:12:12 + --> tests/ui-fail-stable/route-type-errors.rs:12:12 | 12 | fn f2(foo: Q) {} | ^ the trait `FromFormField<'_>` is not implemented for `Q` @@ -23,7 +19,7 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied = note: required because of the requirements on the impl of `FromForm<'_>` for `Q` error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied - --> $DIR/route-type-errors.rs:15:12 + --> tests/ui-fail-stable/route-type-errors.rs:15:12 | 15 | fn f3(foo: Q) {} | ^ the trait `FromFormField<'_>` is not implemented for `Q` @@ -31,58 +27,37 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied = note: required because of the requirements on the impl of `FromForm<'_>` for `Q` error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied - --> $DIR/route-type-errors.rs:18:12 - | -18 | fn f4(foo: Q) {} - | ^ the trait `FromData<'_>` is not implemented for `Q` - | - ::: $WORKSPACE/core/lib/src/data/from_data.rs - | - | async fn from_data(req: &'r Request<'_>, data: Data<'r>) -> Outcome<'r, Self>; - | -- required by this bound in `rocket::data::FromData::from_data` + --> tests/ui-fail-stable/route-type-errors.rs:18:12 + | +18 | fn f4(foo: Q) {} + | ^ the trait `FromData<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> $DIR/route-type-errors.rs:21:10 - | -21 | fn f5(a: Q, foo: Q) {} - | ^ the trait `FromRequest<'_>` is not implemented for `Q` - | - ::: $WORKSPACE/core/lib/src/request/from_request.rs - | - | async fn from_request(request: &'r Request<'_>) -> Outcome; - | -- required by this bound in `from_request` + --> tests/ui-fail-stable/route-type-errors.rs:21:10 + | +21 | fn f5(a: Q, foo: Q) {} + | ^ the trait `FromRequest<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:21:18 + --> tests/ui-fail-stable/route-type-errors.rs:21:18 | 21 | fn f5(a: Q, foo: Q) {} | ^ the trait `FromParam<'_>` is not implemented for `Q` - | - = note: required by `from_param` error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> $DIR/route-type-errors.rs:24:10 - | -24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} - | ^ the trait `FromRequest<'_>` is not implemented for `Q` - | - ::: $WORKSPACE/core/lib/src/request/from_request.rs - | - | async fn from_request(request: &'r Request<'_>) -> Outcome; - | -- required by this bound in `from_request` + --> tests/ui-fail-stable/route-type-errors.rs:24:10 + | +24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} + | ^ the trait `FromRequest<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:24:18 + --> tests/ui-fail-stable/route-type-errors.rs:24:18 | 24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} | ^ the trait `FromParam<'_>` is not implemented for `Q` - | - = note: required by `from_param` error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:24:39 + --> tests/ui-fail-stable/route-type-errors.rs:24:39 | 24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} | ^ the trait `FromParam<'_>` is not implemented for `Q` - | - = note: required by `from_param` 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 index 6d6348ac..6b7c64cc 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr @@ -1,11 +1,5 @@ -error[E0271]: type mismatch resolving `>::Error == &str` - --> $DIR/typed-uri-bad-type.rs:22:37 - | -22 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected enum `Infallible`, found `&str` - error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:45:22 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:45:22 | 45 | uri!(simple(id = "hi")); | ^^^^ the trait `FromUriParam` is not implemented for `usize` @@ -14,10 +8,9 @@ error[E0277]: the trait bound `usize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:47:17 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:47:17 | 47 | uri!(simple("hello")); | ^^^^^^^ the trait `FromUriParam` is not implemented for `usize` @@ -26,10 +19,9 @@ error[E0277]: the trait bound `usize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:49:22 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:49:22 | 49 | uri!(simple(id = 239239i64)); | ^^^^^^^^^ the trait `FromUriParam` is not implemented for `usize` @@ -38,18 +30,15 @@ error[E0277]: the trait bound `usize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:51:30 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:51:30 | 51 | uri!(not_uri_display(10, S)); | ^ the trait `FromUriParam` is not implemented for `S` - | - = note: required by `from_uri_param` error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:56:25 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:56:25 | 56 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); | ^^^^ the trait `FromUriParam>` is not implemented for `i32` @@ -59,10 +48,9 @@ error[E0277]: the trait bound `i32: FromUriParam> > = note: required because of the requirements on the impl of `FromUriParam>` for `std::option::Option` - = note: required by `from_uri_param` error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:56:42 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:56:42 | 56 | uri!(optionals(id = Some(10), name = Ok("bob".into()))); | ^^ the trait `FromUriParam>` is not implemented for `std::string::String` @@ -74,10 +62,9 @@ error[E0277]: the trait bound `std::string::String: FromUriParam> and 2 others = note: required because of the requirements on the impl of `FromUriParam>` for `Result` - = note: required by `from_uri_param` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:58:19 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:58:19 | 58 | uri!(simple_q("hi")); | ^^^^ the trait `FromUriParam` is not implemented for `isize` @@ -86,10 +73,9 @@ error[E0277]: the trait bound `isize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:60:24 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:60:24 | 60 | uri!(simple_q(id = "hi")); | ^^^^ the trait `FromUriParam` is not implemented for `isize` @@ -98,56 +84,51 @@ error[E0277]: the trait bound `isize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:62:23 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:62:23 | 62 | uri!(other_q(100, S)); | ^ the trait `FromUriParam` is not implemented for `S` - | - = note: required by `from_uri_param` error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:64:25 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:64:25 | 64 | uri!(other_q(rest = S, id = 100)); | ^ the trait `FromUriParam` is not implemented for `S` - | - = note: required by `from_uri_param` error[E0277]: the trait bound `S: Ignorable` is not satisfied - --> $DIR/typed-uri-bad-type.rs:66:25 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:66:25 | 66 | uri!(other_q(rest = _, id = 100)); | ^ the trait `Ignorable` is not implemented for `S` | - ::: $WORKSPACE/core/http/src/uri/fmt/uri_display.rs +note: required by a bound in `assert_ignorable` + --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs | | pub fn assert_ignorable>() { } - | ------------ required by this bound in `assert_ignorable` + | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` error[E0277]: the trait bound `usize: Ignorable` is not satisfied - --> $DIR/typed-uri-bad-type.rs:68:33 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:68:33 | 68 | uri!(other_q(rest = S, id = _)); | ^ the trait `Ignorable` is not implemented for `usize` | - ::: $WORKSPACE/core/http/src/uri/fmt/uri_display.rs +note: required by a bound in `assert_ignorable` + --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs | | pub fn assert_ignorable>() { } - | ------------ required by this bound in `assert_ignorable` + | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` error[E0277]: the trait bound `S: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:68:25 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:68:25 | 68 | uri!(other_q(rest = S, id = _)); | ^ the trait `FromUriParam` is not implemented for `S` - | - = note: required by `from_uri_param` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:77:40 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:77:40 | 77 | uri!(uri!("?foo#bar"), simple(id = "hi")); | ^^^^ the trait `FromUriParam` is not implemented for `usize` @@ -156,16 +137,23 @@ error[E0277]: the trait bound `usize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied - --> $DIR/typed-uri-bad-type.rs:77:15 - | -77 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | ^^^^^^^^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>` + --> tests/ui-fail-stable/typed-uri-bad-type.rs:77:15 + | +77 | uri!(uri!("?foo#bar"), simple(id = "hi")); + | --- ^^^^^^^^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>` + | | + | required by a bound introduced by this call + | +note: required by a bound in `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 - --> $DIR/typed-uri-bad-type.rs:78:33 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:78:33 | 78 | uri!(uri!("*"), simple(id = "hi")); | ^^^^ the trait `FromUriParam` is not implemented for `usize` @@ -174,16 +162,23 @@ error[E0277]: the trait bound `usize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied - --> $DIR/typed-uri-bad-type.rs:78:15 - | -78 | uri!(uri!("*"), simple(id = "hi")); - | ^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk` + --> tests/ui-fail-stable/typed-uri-bad-type.rs:78:15 + | +78 | uri!(uri!("*"), simple(id = "hi")); + | --- ^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk` + | | + | required by a bound introduced by this call + | +note: required by a bound in `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 - --> $DIR/typed-uri-bad-type.rs:81:25 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:81:25 | 81 | uri!(_, simple(id = "hi"), uri!("*")); | ^^^^ the trait `FromUriParam` is not implemented for `usize` @@ -192,16 +187,23 @@ error[E0277]: the trait bound `usize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:81:37 - | -81 | uri!(_, simple(id = "hi"), uri!("*")); - | ^^^ the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Asterisk` + --> tests/ui-fail-stable/typed-uri-bad-type.rs:81:37 + | +81 | uri!(_, simple(id = "hi"), uri!("*")); + | --- ^^^ the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Asterisk` + | | + | required by a bound introduced by this call + | +note: required by a bound in `RouteUriBuilder::with_suffix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | where S: ValidRouteSuffix> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:82:25 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:82:25 | 82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); | ^^^^ the trait `FromUriParam` is not implemented for `usize` @@ -210,10 +212,23 @@ error[E0277]: the trait bound `usize: FromUriParam> > > - = note: required by `from_uri_param` error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:82:37 + --> tests/ui-fail-stable/typed-uri-bad-type.rs:82:37 + | +82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); + | --- ^^^^^^^^^^ the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Origin<'_>` + | | + | required by a bound introduced by this call + | +note: required by a bound in `RouteUriBuilder::with_suffix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | where S: ValidRouteSuffix> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` + +error[E0271]: type mismatch resolving `>::Error == &str` + --> tests/ui-fail-stable/typed-uri-bad-type.rs:22:37 | -82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | ^^^^^^^^^^ the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Origin<'_>` +22 | fn optionals(id: Option, name: Result) { } + | ^^^^^^ expected enum `Infallible`, found `&str` 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 aad543f3..d5757f61 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 @@ -1,279 +1,279 @@ error: expected identifier - --> $DIR/typed-uris-bad-params.rs:63:18 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:63:18 | 63 | uri!(ignored(_ = 10)); | ^ error: route expects 1 parameter but 2 were supplied - --- note: route `ignored` has uri "/<_>" - --> $DIR/typed-uris-bad-params.rs:69:18 + --- note: route `ignored` has uri "/<_>" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:69:18 | 69 | uri!(ignored(10, "10")); | ^^ error: expected unnamed arguments due to ignored parameters - --- note: uri for route `ignored` ignores path parameters: "/<_>" - --> $DIR/typed-uris-bad-params.rs:67:18 + --- note: uri for route `ignored` ignores path parameters: "/<_>" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:67:18 | 67 | uri!(ignored(num = 10)); | ^^^ error: route expects 1 parameter but 2 were supplied - --- note: route `ignored` has uri "/<_>" - --> $DIR/typed-uris-bad-params.rs:65:18 + --- note: route `ignored` has uri "/<_>" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:65:18 | 65 | uri!(ignored(10, 20)); | ^^ error: path parameters cannot be ignored - --> $DIR/typed-uris-bad-params.rs:61:18 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:61:18 | 61 | uri!(ignored(_)); | ^ error: path parameters cannot be ignored - --> $DIR/typed-uris-bad-params.rs:59:36 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:59:36 | 59 | uri!(optionals(id = 10, name = _)); | ^ error: path parameters cannot be ignored - --> $DIR/typed-uris-bad-params.rs:57:25 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:57:25 | 57 | uri!(optionals(id = _, name = "bob".into())); | ^ error: invalid parameters for `has_two` route uri - --- note: uri parameters are: id: i32, name: String - --- help: missing parameter: `name` - --> $DIR/typed-uris-bad-params.rs:55:18 + --- note: uri parameters are: id: i32, name: String + --- help: missing parameter: `name` + --> tests/ui-fail-stable/typed-uris-bad-params.rs:55:18 | 55 | uri!(has_two(id = 100, cookies = "hi")); | ^^ error: [help] unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:55:28 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:55:28 | 55 | uri!(has_two(id = 100, cookies = "hi")); | ^^^^^^^ error: invalid parameters for `has_two` route uri - --- note: uri parameters are: id: i32, name: String - --- help: missing parameter: `name` - --> $DIR/typed-uris-bad-params.rs:53:18 + --- note: uri parameters are: id: i32, name: String + --- help: missing parameter: `name` + --> tests/ui-fail-stable/typed-uris-bad-params.rs:53:18 | 53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10)); | ^^^^^^^ error: [help] unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:53:18 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:53:18 | 53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10)); | ^^^^^^^ error: [help] duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:53:44 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:53:44 | 53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10)); | ^^ error: invalid parameters for `has_two` route uri - --- note: uri parameters are: id: i32, name: String - --- help: missing parameter: `id` - --> $DIR/typed-uris-bad-params.rs:51:18 + --- note: uri parameters are: id: i32, name: String + --- help: missing parameter: `id` + --> tests/ui-fail-stable/typed-uris-bad-params.rs:51:18 | 51 | uri!(has_two(name = "hi")); | ^^^^ error: invalid parameters for `has_two` route uri - --- note: uri parameters are: id: i32, name: String - --- help: missing parameter: `name` - --> $DIR/typed-uris-bad-params.rs:49:18 + --- note: uri parameters are: id: i32, name: String + --- help: missing parameter: `name` + --> tests/ui-fail-stable/typed-uris-bad-params.rs:49:18 | 49 | uri!(has_two(id = 100, id = 100, )); | ^^ error: [help] duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:49:28 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:49:28 | 49 | uri!(has_two(id = 100, id = 100, )); | ^^ error: invalid parameters for `has_one_guarded` route uri - --- note: uri parameters are: id: i32 - --> $DIR/typed-uris-bad-params.rs:47:26 + --- note: uri parameters are: id: i32 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:47:26 | 47 | uri!(has_one_guarded(id = 100, cookies = "hi")); | ^^ error: [help] unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:47:36 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:47:36 | 47 | uri!(has_one_guarded(id = 100, cookies = "hi")); | ^^^^^^^ error: invalid parameters for `has_one_guarded` route uri - --- note: uri parameters are: id: i32 - --> $DIR/typed-uris-bad-params.rs:45:26 + --- note: uri parameters are: id: i32 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:45:26 | 45 | uri!(has_one_guarded(cookies = "hi", id = 100)); | ^^^^^^^ error: [help] unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:45:26 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:45:26 | 45 | uri!(has_one_guarded(cookies = "hi", id = 100)); | ^^^^^^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 - --- help: missing parameter: `id` - --> $DIR/typed-uris-bad-params.rs:43:18 + --- note: uri parameters are: id: i32 + --- help: missing parameter: `id` + --> tests/ui-fail-stable/typed-uris-bad-params.rs:43:18 | 43 | uri!(has_one(name = "hi")); | ^^^^ error: [help] unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:43:18 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:43:18 | 43 | uri!(has_one(name = "hi")); | ^^^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 - --> $DIR/typed-uris-bad-params.rs:41:18 + --- note: uri parameters are: id: i32 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:41:18 | 41 | uri!(has_one(id = 100, id = 100, )); | ^^ error: [help] duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:41:28 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:41:28 | 41 | uri!(has_one(id = 100, id = 100, )); | ^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 - --> $DIR/typed-uris-bad-params.rs:39:18 + --- note: uri parameters are: id: i32 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:39:18 | 39 | uri!(has_one(id = 100, id = 100)); | ^^ error: [help] duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:39:28 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:39:28 | 39 | uri!(has_one(id = 100, id = 100)); | ^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 - --> $DIR/typed-uris-bad-params.rs:37:18 + --- note: uri parameters are: id: i32 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18 | 37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50)); | ^^^^ error: [help] unknown parameters: `name`, `age` - --> $DIR/typed-uris-bad-params.rs:37:18 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18 | 37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50)); | ^^^^ error: [help] duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:37:50 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:37:50 | 37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50)); | ^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 - --> $DIR/typed-uris-bad-params.rs:35:18 + --- note: uri parameters are: id: i32 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18 | 35 | uri!(has_one(name = 100, age = 50, id = 100)); | ^^^^ error: [help] unknown parameters: `name`, `age` - --> $DIR/typed-uris-bad-params.rs:35:18 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18 | 35 | uri!(has_one(name = 100, age = 50, id = 100)); | ^^^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 - --> $DIR/typed-uris-bad-params.rs:33:18 + --- note: uri parameters are: id: i32 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:33:18 | 33 | uri!(has_one(name = 100, id = 100)); | ^^^^ error: [help] unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:33:18 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:33:18 | 33 | uri!(has_one(name = 100, id = 100)); | ^^^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 - --> $DIR/typed-uris-bad-params.rs:31:18 + --- note: uri parameters are: id: i32 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:31:18 | 31 | uri!(has_one(id = 100, name = "hi")); | ^^ error: [help] unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:31:28 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:31:28 | 31 | uri!(has_one(id = 100, name = "hi")); | ^^^^ error: route expects 2 parameters but 1 was supplied - --- note: route `has_two` has uri "/?" - --> $DIR/typed-uris-bad-params.rs:29:18 + --- note: route `has_two` has uri "/?" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:29:18 | 29 | uri!(has_two(10)); | ^^ error: route expects 2 parameters but 3 were supplied - --- note: route `has_two` has uri "/?" - --> $DIR/typed-uris-bad-params.rs:28:18 + --- note: route `has_two` has uri "/?" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:28:18 | 28 | uri!(has_two(10, "hi", "there")); | ^^ error: route expects 1 parameter but 2 were supplied - --- note: route `has_one_guarded` has uri "/" - --> $DIR/typed-uris-bad-params.rs:26:26 + --- note: route `has_one_guarded` has uri "/" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:26:26 | 26 | uri!(has_one_guarded("hi", 100)); | ^^^^ error: route expects 1 parameter but 2 were supplied - --- note: route `has_one` has uri "/" - --> $DIR/typed-uris-bad-params.rs:25:18 + --- note: route `has_one` has uri "/" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:25:18 | 25 | uri!(has_one("Hello", 23, )); | ^^^^^^^ error: route expects 1 parameter but 2 were supplied - --- note: route `has_one` has uri "/" - --> $DIR/typed-uris-bad-params.rs:24:18 + --- note: route `has_one` has uri "/" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:24:18 | 24 | uri!(has_one(1, 23)); | ^ error: route expects 1 parameter but 0 were supplied - --- note: route `has_one` has uri "/" - --> $DIR/typed-uris-bad-params.rs:22:10 + --- note: route `has_one` has uri "/" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:22:10 | 22 | uri!(has_one()); | ^^^^^^^ error: route expects 1 parameter but 0 were supplied - --- note: route `has_one` has uri "/" - --> $DIR/typed-uris-bad-params.rs:21:10 + --- note: route `has_one` has uri "/" + --> tests/ui-fail-stable/typed-uris-bad-params.rs:21:10 | 21 | uri!(has_one); | ^^^^^^^ error[E0271]: type mismatch resolving `>::Error == &str` - --> $DIR/typed-uris-bad-params.rs:15:37 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:15:37 | 15 | fn optionals(id: Option, name: Result) { } | ^^^^^^ expected enum `Infallible`, found `&str` 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 0fa00966..968cef79 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 @@ -1,152 +1,152 @@ error: expected identifier - --> $DIR/typed-uris-invalid-syntax.rs:10:28 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:10:28 | 10 | uri!(simple: id = 100, "Hello"); | ^^^^^^^ error: named and unnamed parameters cannot be mixed - --> $DIR/typed-uris-invalid-syntax.rs:11:17 + --> 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 - --> $DIR/typed-uris-invalid-syntax.rs:12:17 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:12:17 | 12 | uri!(simple("Hello", id = 100)); | ^^^^^^^ error: unexpected token - --> $DIR/typed-uris-invalid-syntax.rs:14:16 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:14:16 | 14 | uri!(simple:); | ^ error: invalid URI: unexpected EOF: expected token ':' at index 5 - --> $DIR/typed-uris-invalid-syntax.rs:16:10 + --> 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 - --> $DIR/typed-uris-invalid-syntax.rs:17:10 + --> 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 - --> $DIR/typed-uris-invalid-syntax.rs:18:28 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:18:28 | 18 | uri!("/mount", simple, "http://"); | ^^^^^^^^^ error: expected 1, 2, or 3 arguments, found 4 - --> $DIR/typed-uris-invalid-syntax.rs:19:36 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:19:36 | 19 | uri!("/mount", simple, "#foo", "?foo"); | ^^^^^^ error: invalid URI: unexpected EOF: expected token ':' at index 5 - --> $DIR/typed-uris-invalid-syntax.rs:20:10 + --> 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 - --> $DIR/typed-uris-invalid-syntax.rs:21:38 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:21:38 | 21 | uri!("/mount", simple(10, "hi"), "http://"); | ^^^^^^^^^ error: URI prefix cannot contain query part - --> $DIR/typed-uris-invalid-syntax.rs:22:10 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:22:10 | 22 | uri!("/mount?foo", simple(10, "hi"), "foo/bar?foo#bar"); | ^^^^^^^^^^^^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:23:38 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:23:38 | 23 | uri!("/mount", simple(10, "hi"), "a/b"); | ^^^^^ error: expected 1, 2, or 3 arguments, found 4 - --> $DIR/typed-uris-invalid-syntax.rs:24:46 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:24:46 | 24 | uri!("/mount", simple(10, "hi"), "#foo", "?foo"); | ^^^^^^ error: invalid URI: unexpected token '<' at index 7 - --> $DIR/typed-uris-invalid-syntax.rs:25:10 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:25:10 | 25 | uri!("/mount/", simple); | ^^^^^^^^^^^^^ error: expected at least 1 argument, found none - --> $DIR/typed-uris-invalid-syntax.rs:26:5 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:26:5 | 26 | uri!(); - | ^^^^^^^ + | ^^^^^^ | = note: this error originates in the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected token - --> $DIR/typed-uris-invalid-syntax.rs:27:16 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:27:16 | 27 | uri!(simple: id = ); | ^ error: unexpected end of input, expected expression - --> $DIR/typed-uris-invalid-syntax.rs:28:16 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:28:22 | 28 | uri!(simple(id = )); - | ^^^^^^^ + | ^ error: invalid URI: unexpected EOF: expected some token at index 0 - --> $DIR/typed-uris-invalid-syntax.rs:29:10 + --> 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 - --> $DIR/typed-uris-invalid-syntax.rs:30:40 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:30:40 | 30 | uri!("some.host:8088", simple(10), "hi"); | ^^^^ error: expected identifier - --> $DIR/typed-uris-invalid-syntax.rs:33:18 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:33:18 | 33 | uri!("/foo", "bar"); | ^^^^^ error: unexpected token - --> $DIR/typed-uris-invalid-syntax.rs:34:17 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:34:17 | 34 | uri!("/foo" ("bar")); | ^^^^^^^ error: URI prefix cannot contain query part - --> $DIR/typed-uris-invalid-syntax.rs:35:10 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:35:10 | 35 | uri!("ftp:?", index); | ^^^^^^^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:36:25 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:36:25 | 36 | uri!("ftp:", index, "foo#bar"); | ^^^^^^^^^ error: URI suffix must contain only query and/or fragment - --> $DIR/typed-uris-invalid-syntax.rs:37:25 + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:37:25 | 37 | uri!("ftp:", index, "foo?bar"); | ^^^^^^^^^ error: route expects 2 parameters but 0 were supplied - --- note: route `simple` has uri "//" - --> $DIR/typed-uris-invalid-syntax.rs:13:10 + --- note: route `simple` has uri "//" + --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:13:10 | 13 | uri!(simple,); | ^^^^^^ 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 index 234b8595..d8d0ff25 100644 --- a/core/codegen/tests/ui-fail-stable/uri_display_type_errors.stderr +++ b/core/codegen/tests/ui-fail-stable/uri_display_type_errors.stderr @@ -1,61 +1,96 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:6:13 - | -6 | struct Bar1(BadType); - | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + --> tests/ui-fail-stable/uri_display_type_errors.rs:6:13 + | +6 | struct Bar1(BadType); + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` +note: required by a bound in `rocket::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 `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:10:5 - | -10 | field: BadType, - | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + --> tests/ui-fail-stable/uri_display_type_errors.rs:10:5 + | +10 | field: BadType, + | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` +note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::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 `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:16:5 - | -16 | bad: BadType, - | ^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + --> tests/ui-fail-stable/uri_display_type_errors.rs:16:5 + | +16 | bad: BadType, + | ^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` +note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::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 `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:21:11 - | -21 | Inner(BadType), - | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` - = note: 1 redundant requirements hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + --> tests/ui-fail-stable/uri_display_type_errors.rs:21:11 + | +21 | Inner(BadType), + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: 1 redundant requirement hidden + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` +note: required by a bound in `rocket::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 `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:27:9 - | -27 | field: BadType, - | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` - = note: 1 redundant requirements hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + --> tests/ui-fail-stable/uri_display_type_errors.rs:27:9 + | +27 | field: BadType, + | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: 1 redundant requirement hidden + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` +note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::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 `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:35:9 - | -35 | other: BadType, - | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` - = note: 1 redundant requirements hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + --> tests/ui-fail-stable/uri_display_type_errors.rs:35:9 + | +35 | other: BadType, + | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: 1 redundant requirement hidden + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` +note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::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 `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:40:12 - | -40 | struct Baz(BadType); - | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` - | - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + --> tests/ui-fail-stable/uri_display_type_errors.rs:40:12 + | +40 | struct Baz(BadType); + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` +note: required by a bound in `rocket::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 `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` diff --git a/core/http/src/ext.rs b/core/http/src/ext.rs index 1a0ab4e9..a514cd74 100644 --- a/core/http/src/ext.rs +++ b/core/http/src/ext.rs @@ -1,5 +1,8 @@ //! Extension traits implemented by several HTTP types. +// Temporarily allow `IntoIter::into_iter()` before Rust 2021 transition. +#![allow(deprecated)] + use smallvec::{Array, SmallVec}; use state::Storage; diff --git a/core/lib/src/request/request.rs b/core/lib/src/request/request.rs index c54169b3..b71fc4d0 100644 --- a/core/lib/src/request/request.rs +++ b/core/lib/src/request/request.rs @@ -37,6 +37,7 @@ pub struct Request<'r> { #[derive(Clone)] pub(crate) struct ConnectionMeta { pub remote: Option, + #[cfg_attr(not(feature = "mtls"), allow(dead_code))] pub client_certificates: Option>>, } diff --git a/core/lib/src/response/stream/sse.rs b/core/lib/src/response/stream/sse.rs index c2c397e5..d13f0937 100644 --- a/core/lib/src/response/stream/sse.rs +++ b/core/lib/src/response/stream/sse.rs @@ -1,3 +1,6 @@ +// Temporarily allow `IntoIter::into_iter()` before Rust 2021 transition. +#![allow(deprecated)] + use std::array; use std::borrow::Cow; diff --git a/core/lib/src/route/uri.rs b/core/lib/src/route/uri.rs index b3d1900e..4404ae9e 100644 --- a/core/lib/src/route/uri.rs +++ b/core/lib/src/route/uri.rs @@ -83,8 +83,6 @@ pub(crate) struct Metadata { pub base_segs: Vec, /// Segments in the path, including base. pub path_segs: Vec, - /// Segments in the query. - pub query_segs: Vec, /// `(name, value)` of the query segments that are static. pub static_query_fields: Vec<(String, String)>, /// The "color" of the route path. @@ -288,8 +286,8 @@ impl Metadata { let trailing_path = path_segs.last().map_or(false, |p| p.trailing); Metadata { - base_segs, path_segs, query_segs, static_query_fields, - path_color, query_color, trailing_path, + base_segs, path_segs, static_query_fields, path_color, query_color, + trailing_path, } } } diff --git a/core/lib/tests/form-validation-names.rs b/core/lib/tests/form-validation-names.rs index 9438c438..ccf0e603 100644 --- a/core/lib/tests/form-validation-names.rs +++ b/core/lib/tests/form-validation-names.rs @@ -4,6 +4,7 @@ use rocket::form::{Form, FromForm}; use rocket::form::error::{Error, Errors, ErrorKind}; #[derive(Debug, FromForm)] +#[allow(dead_code)] struct Cat<'v> { #[field(validate = len(5..))] name: &'v str, @@ -12,12 +13,14 @@ struct Cat<'v> { } #[derive(Debug, FromForm)] +#[allow(dead_code)] struct Dog<'v> { #[field(validate = len(5..))] name: &'v str, } #[derive(Debug, FromForm)] +#[allow(dead_code)] struct Person<'v> { kitty: Cat<'v>, #[field(validate = len(1..))]