From 3ab73d70c29b08811134d1f274251708c9390515 Mon Sep 17 00:00:00 2001 From: arlecchino Date: Mon, 17 Jan 2022 19:55:29 +0100 Subject: [PATCH 01/12] build!: update MSRV 1.51.0 Dependency multer -> spin doesn't build below rust 1.51.0 which seems to be related to * atomic::spin_loop_hint has been deprecated. It's recommended to use hint::spin_loop instead. --- core/lib/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/build.rs b/core/lib/build.rs index dd11943ba9..413c5fbc7c 100644 --- a/core/lib/build.rs +++ b/core/lib/build.rs @@ -3,7 +3,7 @@ use yansi::{Paint, Color::{Red, Yellow}}; fn main() { - const MIN_VERSION: &str = "1.46.0"; + const MIN_VERSION: &str = "1.51.0"; if let Some(version) = version_check::Version::read() { if !version.at_least(MIN_VERSION) { From 2da8c53e0dc4d68d282ad0f467a1354ba8c332d4 Mon Sep 17 00:00:00 2001 From: arlecchino Date: Mon, 17 Jan 2022 19:58:37 +0100 Subject: [PATCH 02/12] build: Cargo.toml package.metatdata.msrv = 1.51.0 --- core/lib/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index 758fb4ea6e..c2ccfe5807 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -15,6 +15,10 @@ build = "build.rs" categories = ["web-programming::http-server"] edition = "2018" +[package.metadata] +# minimum supported rust version 1.51.0 because of dependencies multer -> spin +msrv = "1.51.0" + [package.metadata.docs.rs] all-features = true From 664773d4fa844caf8e83172145e33980bbef56d5 Mon Sep 17 00:00:00 2001 From: arlecchino Date: Mon, 17 Jan 2022 20:01:00 +0100 Subject: [PATCH 03/12] build: Cargo.toml package.metadata.msrv = 1.51.0 resolving fails below because of crate time --- core/http/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/http/Cargo.toml b/core/http/Cargo.toml index f8bdc16523..0fcb7f2213 100644 --- a/core/http/Cargo.toml +++ b/core/http/Cargo.toml @@ -14,6 +14,10 @@ license = "MIT OR Apache-2.0" categories = ["web-programming"] edition = "2018" +[package.metadata] +# minimum supported rust version 1.51.0 because of cargo resolver in dependency crate time +msrv = "1.51.0" + [features] default = [] tls = ["rustls", "tokio-rustls"] From 5a27bef0667453bf70c7ae768f481dd9c0641291 Mon Sep 17 00:00:00 2001 From: arlecchino Date: Mon, 17 Jan 2022 20:02:18 +0100 Subject: [PATCH 04/12] build: Cargo.toml package.metadata.msrv = 1.51.0 cargo resolving fails below because of crate time --- core/codegen/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/codegen/Cargo.toml b/core/codegen/Cargo.toml index 1832784487..5d7739abe5 100644 --- a/core/codegen/Cargo.toml +++ b/core/codegen/Cargo.toml @@ -11,6 +11,10 @@ keywords = ["rocket", "web", "framework", "code", "generation"] license = "MIT OR Apache-2.0" edition = "2018" +[package.metadata] +# minimum supported rust version 1.51.0 because of cargo resolver in dependency crate time +msrv = "1.51.0" + [lib] proc-macro = true From b175e2ae8b0b28adf03441a52c309df1acd01db4 Mon Sep 17 00:00:00 2001 From: Markus Kolb Date: Tue, 18 Jan 2022 13:37:49 +0100 Subject: [PATCH 05/12] build!: contrib/db_pools MSRV 1.53.0 --- contrib/db_pools/lib/Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/db_pools/lib/Cargo.toml b/contrib/db_pools/lib/Cargo.toml index 80c5e40ee1..6f812c107f 100644 --- a/contrib/db_pools/lib/Cargo.toml +++ b/contrib/db_pools/lib/Cargo.toml @@ -9,6 +9,11 @@ keywords = ["rocket", "framework", "database", "pools"] license = "MIT OR Apache-2.0" edition = "2018" +[package.metadata] +# minimum supported rust version 1.53.0 because of +# error[E0391]: cycle detected when computing the supertraits of `database::Database` +msrv = 1.53.0 + [package.metadata.docs.rs] all-features = true From 6c3780a91fcf946471f57701efa06dfdcb7bcda9 Mon Sep 17 00:00:00 2001 From: Markus Kolb Date: Tue, 18 Jan 2022 13:39:07 +0100 Subject: [PATCH 06/12] build!: TlsConfig::with_ciphers() MSRV 1.53.0 --- core/lib/Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index c2ccfe5807..bb13fd4149 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -16,8 +16,10 @@ categories = ["web-programming::http-server"] edition = "2018" [package.metadata] -# minimum supported rust version 1.51.0 because of dependencies multer -> spin -msrv = "1.51.0" +# minimum supported rust version 1.53.0 because of +# TlsConfig::with_ciphers() based on crate indexmap needs IntoIterator impls +# on arrays of any length from 1.53.0 +msrv = "1.53.0" [package.metadata.docs.rs] all-features = true From cdc68f74165456bb4e5ae475624dd7f23f18d497 Mon Sep 17 00:00:00 2001 From: Markus Kolb Date: Tue, 18 Jan 2022 13:39:54 +0100 Subject: [PATCH 07/12] build!: build.rs require rustc 1.53.0 --- core/lib/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/build.rs b/core/lib/build.rs index 413c5fbc7c..d934514a25 100644 --- a/core/lib/build.rs +++ b/core/lib/build.rs @@ -3,7 +3,7 @@ use yansi::{Paint, Color::{Red, Yellow}}; fn main() { - const MIN_VERSION: &str = "1.51.0"; + const MIN_VERSION: &str = "1.53.0"; if let Some(version) = version_check::Version::read() { if !version.at_least(MIN_VERSION) { From 929d9d2a3b2ab39c2ebd2f226aed9c4959c31c1e Mon Sep 17 00:00:00 2001 From: Markus Kolb Date: Tue, 18 Jan 2022 13:53:26 +0100 Subject: [PATCH 08/12] fix(build): typos in Cargo.toml --- contrib/db_pools/lib/Cargo.toml | 2 +- core/lib/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/db_pools/lib/Cargo.toml b/contrib/db_pools/lib/Cargo.toml index 6f812c107f..c704471c6c 100644 --- a/contrib/db_pools/lib/Cargo.toml +++ b/contrib/db_pools/lib/Cargo.toml @@ -12,7 +12,7 @@ edition = "2018" [package.metadata] # minimum supported rust version 1.53.0 because of # error[E0391]: cycle detected when computing the supertraits of `database::Database` -msrv = 1.53.0 +msrv = "1.53.0" [package.metadata.docs.rs] all-features = true diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index bb13fd4149..817dffad2c 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -16,7 +16,7 @@ categories = ["web-programming::http-server"] edition = "2018" [package.metadata] -# minimum supported rust version 1.53.0 because of +# minimum supported rust version 1.53.0 because of # TlsConfig::with_ciphers() based on crate indexmap needs IntoIterator impls # on arrays of any length from 1.53.0 msrv = "1.53.0" From 0273b4323003fc119e888f632e76681391af34d8 Mon Sep 17 00:00:00 2001 From: Markus Kolb Date: Tue, 18 Jan 2022 14:21:27 +0100 Subject: [PATCH 09/12] build: output cargo/rustc versions --- scripts/config.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/config.sh b/scripts/config.sh index 8eb6e78d9b..b57fa4a4c5 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -54,6 +54,8 @@ EXAMPLES_DIR=$(relative "examples") || exit $? DOC_DIR=$(relative "target/doc") || exit $? # Versioning information. These are changed as versions change. +CARGO_VERSION="$(cargo --version)" +RUSTC_VERSION="$(rustc --version)" VERSION=$(git grep -h "^version" "${CORE_LIB_ROOT}" | head -n 1 | cut -d '"' -f2) MAJOR_VERSION=$(echo "${VERSION}" | cut -d'.' -f1-2) VIRTUAL_CODENAME="$(git branch --show-current)" @@ -99,7 +101,9 @@ ALL_CRATE_ROOTS=( ) function print_environment() { - echo " VERSION: ${VERSION}" + echo " CARGO VERSION: ${CARGO_VERSION}" + echo " RUSTC VERSION: ${RUSTC_VERSION}" + echo " ROCKET VERSION: ${VERSION}" echo " MAJOR_VERSION: ${MAJOR_VERSION}" echo " CODENAME: ${CODENAME}" echo " DOC_VERSION: ${DOC_VERSION}" From df03086105c1408fce74aae4b35ebaa2d61bbd62 Mon Sep 17 00:00:00 2001 From: Markus Kolb Date: Tue, 18 Jan 2022 15:25:58 +0100 Subject: [PATCH 10/12] tests: trybuild ui-fail-stable stderrs updated --- .../ui-fail-stable/database-syntax.stderr | 48 ++--- .../ui-fail-stable/database-types.stderr | 4 +- .../ui-fail-stable/database-syntax.stderr | 20 +- .../ui-fail-stable/database-types.stderr | 4 +- .../tests/ui-fail-stable/async-entry.stderr | 54 ++--- .../bad-ignored-segments.stderr | 4 +- .../codegen/tests/ui-fail-stable/catch.stderr | 20 +- .../ui-fail-stable/catch_type_errors.stderr | 10 +- .../tests/ui-fail-stable/catchers.stderr | 8 +- .../tests/ui-fail-stable/from_form.stderr | 202 +++++++++--------- .../ui-fail-stable/from_form_field.stderr | 128 +++++------ .../from_form_type_errors.stderr | 4 +- .../ui-fail-stable/responder-types.stderr | 12 +- .../tests/ui-fail-stable/responder.stderr | 66 +++--- .../route-attribute-general-syntax.stderr | 66 +++--- .../route-path-bad-syntax.stderr | 54 ++--- .../ui-fail-stable/route-type-errors.stderr | 20 +- .../ui-fail-stable/route-warnings.stderr | 2 +- .../tests/ui-fail-stable/routes.stderr | 8 +- .../ui-fail-stable/typed-uri-bad-type.stderr | 44 ++-- .../typed-uris-bad-params.stderr | 84 ++++---- .../typed-uris-invalid-syntax.stderr | 52 ++--- .../tests/ui-fail-stable/uri_display.stderr | 54 ++--- .../uri_display_type_errors.stderr | 14 +- 24 files changed, 491 insertions(+), 491 deletions(-) diff --git a/contrib/db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr b/contrib/db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr index 8f3a58160e..1d0fb7ad65 100644 --- a/contrib/db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr +++ b/contrib/db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr @@ -1,111 +1,111 @@ error: invalid value: expected string literal - --> $DIR/database-syntax.rs:4:12 + --> tests/ui-fail-stable/database-syntax.rs:4:12 | 4 | #[database(123)] | ^^^ error: [note] error occurred while deriving `Database` - --> $DIR/database-syntax.rs:3:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/database-syntax.rs:8:25 | 8 | #[database("some-name", "another")] | ^^^^^^^^^ error: [note] error occurred while deriving `Database` - --> $DIR/database-syntax.rs:7:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/database-syntax.rs:12:25 | 12 | #[database("some-name", name = "another")] | ^^^^ error: [note] error occurred while deriving `Database` - --> $DIR/database-syntax.rs:11:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/database-syntax.rs:16:1 | 16 | #[database("foo")] | ^ error: [note] error occurred while deriving `Database` - --> $DIR/database-syntax.rs:15:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/database-syntax.rs:20:1 | 20 | struct E(deadpool_postgres::Pool); | ^^^^^^ error: [note] error occurred while deriving `Database` - --> $DIR/database-syntax.rs:19:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/database-syntax.rs:23:1 | 23 | #[database("foo")] | ^ error: [note] error occurred while deriving `Database` - --> $DIR/database-syntax.rs:22:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/database-syntax.rs:27:1 | 27 | #[database("foo")] | ^ error: [note] error occurred while deriving `Database` - --> $DIR/database-syntax.rs:26:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: named structs are not supported - --> $DIR/database-syntax.rs:31:1 + --> tests/ui-fail-stable/database-syntax.rs:31:1 | 31 | #[database("foo")] | ^ error: [note] error occurred while deriving `Database` - --> $DIR/database-syntax.rs:30:10 + --> tests/ui-fail-stable/database-syntax.rs:30:10 | 30 | #[derive(Database)] | ^^^^^^^^ | - = note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) 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 30b52af17d..eab198c16f 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,5 +1,5 @@ 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` @@ -10,7 +10,7 @@ error[E0277]: the trait bound `Unknown: Pool` is not satisfied | ---- 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` 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 35c0ad99a7..013c5b7aee 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,56 +1,56 @@ 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] | ^^^^^^^^^^^ | - = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected string literal - --> $DIR/database-syntax.rs:9:12 + --> 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 + --> 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 65e3ed8f2a..57f28c7e94 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,5 +1,5 @@ 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` @@ -10,7 +10,7 @@ error[E0277]: the trait bound `Unknown: Poolable` is not satisfied | -------- 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` diff --git a/core/codegen/tests/ui-fail-stable/async-entry.stderr b/core/codegen/tests/ui-fail-stable/async-entry.stderr index d5eb48effd..5257338a6a 100644 --- a/core/codegen/tests/ui-fail-stable/async-entry.stderr +++ b/core/codegen/tests/ui-fail-stable/async-entry.stderr @@ -1,106 +1,106 @@ 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] | ^^^^^^^^^^^^^^^ | - = note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (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] | ^^^^^^^^^^^^^^^ | - = note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (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 + --> tests/ui-fail-stable/async-entry.rs:49:5 | 49 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (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] | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (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] | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (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 + --> tests/ui-fail-stable/async-entry.rs:79:5 | 79 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (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 + --> tests/ui-fail-stable/async-entry.rs:87:5 | 87 | #[rocket::launch] | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (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 423c7105c5..af2e87c48e 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 + --> 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 + --> 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 b720f953bc..e82aabff9f 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 7d3a56a51f..945717f0c0 100644 --- a/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr @@ -1,5 +1,5 @@ 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 | 6 | fn f1(_request: &Request) -> usize { | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` @@ -7,7 +7,7 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied = 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 | 11 | fn f2(_request: &Request) -> bool { | ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool` @@ -15,13 +15,13 @@ error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied = 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 | 16 | fn f3(_request: bool) -> usize { | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` @@ -29,7 +29,7 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied = 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 | 21 | fn f4() -> usize { | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` diff --git a/core/codegen/tests/ui-fail-stable/catchers.stderr b/core/codegen/tests/ui-fail-stable/catchers.stderr index 59f164bb24..cab38da5d3 100644 --- a/core/codegen/tests/ui-fail-stable/catchers.stderr +++ b/core/codegen/tests/ui-fail-stable/catchers.stderr @@ -1,19 +1,19 @@ error: expected `,` - --> $DIR/catchers.rs:4:25 + --> tests/ui-fail-stable/catchers.rs:4:25 | 4 | let _ = catchers![a b]; | ^ error: expected identifier - --> $DIR/catchers.rs:6:26 + --> tests/ui-fail-stable/catchers.rs:6:26 | 6 | let _ = catchers![a::, ]; | ^ error: unexpected end of input, expected identifier - --> $DIR/catchers.rs:7:13 + --> tests/ui-fail-stable/catchers.rs:7:13 | 7 | let _ = catchers![a::]; | ^^^^^^^^^^^^^^ | - = note: this error originates in the macro `catchers` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-stable/from_form.stderr b/core/codegen/tests/ui-fail-stable/from_form.stderr index a464db2926..0ee56624d0 100644 --- a/core/codegen/tests/ui-fail-stable/from_form.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form.stderr @@ -1,473 +1,473 @@ 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: at least one field is required - --> $DIR/from_form.rs: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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: at least one field is required - --> $DIR/from_form.rs: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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: only one lifetime is supported - --> $DIR/from_form.rs: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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected attribute parameter: `beep` - --> $DIR/from_form.rs: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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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 + --> 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)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (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` diff --git a/core/codegen/tests/ui-fail-stable/from_form_field.stderr b/core/codegen/tests/ui-fail-stable/from_form_field.stderr index 4e4dcfdb51..f0ccd8b2b7 100644 --- a/core/codegen/tests/ui-fail-stable/from_form_field.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form_field.stderr @@ -1,319 +1,319 @@ error: tuple structs are not supported - --> $DIR/from_form_field.rs:4:1 + --> tests/ui-fail-stable/from_form_field.rs:4:1 | 4 | struct Foo1; | ^^^^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:3:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: tuple structs are not supported - --> $DIR/from_form_field.rs:7:1 + --> tests/ui-fail-stable/from_form_field.rs:7:1 | 7 | struct Foo2(usize); | ^^^^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:6:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: named structs are not supported - --> $DIR/from_form_field.rs:10:1 + --> tests/ui-fail-stable/from_form_field.rs:10:1 | 10 | struct Foo3 { | ^^^^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:9:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: variants cannot have fields - --> $DIR/from_form_field.rs:16:6 + --> tests/ui-fail-stable/from_form_field.rs:16:6 | 16 | A(usize), | ^^^^^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:14:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:20:1 | 20 | enum Foo5 { } | ^^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:19:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:23:11 | 23 | enum Foo6 { | ^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:22:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid value: expected string literal - --> $DIR/from_form_field.rs:29:21 + --> tests/ui-fail-stable/from_form_field.rs:29:21 | 29 | #[field(value = 123)] | ^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:27:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:35:13 | 35 | #[field(value)] | ^^^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:33:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:41:5 | 41 | #[field(value = "bar")] | ^ error: [note] this value... - --> $DIR/from_form_field.rs:41:21 + --> tests/ui-fail-stable/from_form_field.rs:41:21 | 41 | #[field(value = "bar")] | ^^^^^ error: [note] ...conflicts with this value - --> $DIR/from_form_field.rs:42:21 + --> tests/ui-fail-stable/from_form_field.rs:42:21 | 42 | #[field(value = "bar")] | ^^^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:39:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:50:21 | 50 | #[field(value = "BAr")] | ^^^^^ error: [help] ...declared in this variant - --> $DIR/from_form_field.rs:50:5 + --> tests/ui-fail-stable/from_form_field.rs:50:5 | 50 | #[field(value = "BAr")] | ^ error: [note] previous field with conflicting name - --> $DIR/from_form_field.rs:48:5 + --> tests/ui-fail-stable/from_form_field.rs:48:5 | 48 | #[field(value = "bar")] | ^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:46:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:57:21 | 57 | #[field(value = "a")] | ^^^ error: [help] ...declared in this variant - --> $DIR/from_form_field.rs:57:5 + --> tests/ui-fail-stable/from_form_field.rs:57:5 | 57 | #[field(value = "a")] | ^ error: [note] previous field with conflicting name - --> $DIR/from_form_field.rs:56:5 + --> tests/ui-fail-stable/from_form_field.rs:56:5 | 56 | A, | ^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:54:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:80:5 | 80 | #[field(value = "FoO")] | ^ error: [note] this value... - --> $DIR/from_form_field.rs:80:21 + --> tests/ui-fail-stable/from_form_field.rs:80:21 | 80 | #[field(value = "FoO")] | ^^^^^ error: [note] ...conflicts with this value - --> $DIR/from_form_field.rs:81:21 + --> tests/ui-fail-stable/from_form_field.rs:81:21 | 81 | #[field(value = "foo")] | ^^^^^ error: [note] error occurred while deriving `FromFormField` - --> $DIR/from_form_field.rs:78:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:87:5 | 87 | #[field(name = "foo")] | ^ error: [note] this field name... - --> $DIR/from_form_field.rs:87:20 + --> tests/ui-fail-stable/from_form_field.rs:87:20 | 87 | #[field(name = "foo")] | ^^^^^ error: [note] ...conflicts with this field name - --> $DIR/from_form_field.rs:88:28 + --> tests/ui-fail-stable/from_form_field.rs:88:28 | 88 | #[field(name = uncased("FOO"))] | ^^^^^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form_field.rs:85:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:96:20 | 96 | #[field(name = "foo")] | ^^^^^ error: [help] declared in this field - --> $DIR/from_form_field.rs:96:5 + --> tests/ui-fail-stable/from_form_field.rs:96:5 | 96 | #[field(name = "foo")] | ^ error: [note] previous field with conflicting name - --> $DIR/from_form_field.rs:94:5 + --> tests/ui-fail-stable/from_form_field.rs:94:5 | 94 | #[field(name = "foo")] | ^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form_field.rs:92:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:104:5 | 104 | hello_there: usize, | ^^^^^^^^^^^ error: [help] declared in this field - --> $DIR/from_form_field.rs:104:5 + --> tests/ui-fail-stable/from_form_field.rs:104:5 | 104 | hello_there: usize, | ^^^^^^^^^^^ error: [note] previous field with conflicting name - --> $DIR/from_form_field.rs:102:5 + --> tests/ui-fail-stable/from_form_field.rs:102:5 | 102 | #[field(name = uncased("HELLO_THERE"))] | ^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form_field.rs:100:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/from_form_field.rs:111:5 | 111 | hello_there: usize, | ^^^^^^^^^^^ error: [help] declared in this field - --> $DIR/from_form_field.rs:111:5 + --> tests/ui-fail-stable/from_form_field.rs:111:5 | 111 | hello_there: usize, | ^^^^^^^^^^^ error: [note] previous field with conflicting name - --> $DIR/from_form_field.rs:109:5 + --> tests/ui-fail-stable/from_form_field.rs:109:5 | 109 | #[field(name = "hello_there")] | ^ error: [note] error occurred while deriving `FromForm` - --> $DIR/from_form_field.rs:107:10 + --> tests/ui-fail-stable/from_form_field.rs:107:10 | 107 | #[derive(FromForm)] | ^^^^^^^^ | - = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-stable/from_form_type_errors.stderr b/core/codegen/tests/ui-fail-stable/from_form_type_errors.stderr index 27a490b91d..15c20b812c 100644 --- a/core/codegen/tests/ui-fail-stable/from_form_type_errors.stderr +++ b/core/codegen/tests/ui-fail-stable/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-stable/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-stable/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-stable/responder-types.stderr b/core/codegen/tests/ui-fail-stable/responder-types.stderr index 61801f4f7d..30b37e1f65 100644 --- a/core/codegen/tests/ui-fail-stable/responder-types.stderr +++ b/core/codegen/tests/ui-fail-stable/responder-types.stderr @@ -1,5 +1,5 @@ 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` @@ -7,7 +7,7 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied = note: required by `respond_to` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:11:5 + --> tests/ui-fail-stable/responder-types.rs:11:5 | 11 | other: u8, | ^^^^^ the trait `From` is not implemented for `Header<'_>` @@ -21,7 +21,7 @@ error[E0277]: the trait bound `Header<'_>: From` is not satisfied = note: required because of the requirements on the impl of `Into>` for `u8` 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` @@ -29,7 +29,7 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied = note: required by `respond_to` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:17:5 + --> tests/ui-fail-stable/responder-types.rs:17:5 | 17 | other: u8, | ^^^^^ the trait `From` is not implemented for `Header<'_>` @@ -43,7 +43,7 @@ error[E0277]: the trait bound `Header<'_>: From` is not satisfied = note: required because of the requirements on the impl of `Into>` for `u8` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> $DIR/responder-types.rs:24:5 + --> tests/ui-fail-stable/responder-types.rs:24:5 | 24 | then: String, | ^^^^ the trait `From` is not implemented for `Header<'_>` @@ -57,7 +57,7 @@ error[E0277]: the trait bound `Header<'_>: From` is not sat = note: required because of the requirements on the impl of `Into>` for `std::string::String` error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:28:13 + --> tests/ui-fail-stable/responder-types.rs:28:13 | 28 | fn foo() -> usize { 0 } | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` diff --git a/core/codegen/tests/ui-fail-stable/responder.stderr b/core/codegen/tests/ui-fail-stable/responder.stderr index 2f03d1701e..a62c259441 100644 --- a/core/codegen/tests/ui-fail-stable/responder.stderr +++ b/core/codegen/tests/ui-fail-stable/responder.stderr @@ -1,153 +1,153 @@ error: need at least one field - --> $DIR/responder.rs:4:1 + --> tests/ui-fail-stable/responder.rs:4:1 | 4 | struct Thing1; | ^^^^^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:3:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/responder.rs:7:14 | 7 | struct Thing2(); | ^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:6:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/responder.rs:13:12 | 13 | enum Foo { Bark, } | ^^^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:12:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: only one lifetime is supported - --> $DIR/responder.rs:16:14 + --> tests/ui-fail-stable/responder.rs:16:14 | 16 | struct Thing4<'a, 'b>(&'a str, &'b str); | ^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:15:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/responder.rs:25:27 | 25 | #[response(content_type = "")] | ^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:24:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/responder.rs:29:27 | 29 | #[response(content_type = "idk")] | ^^^^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:28:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid value: expected string literal - --> $DIR/responder.rs:33:27 + --> tests/ui-fail-stable/responder.rs:33:27 | 33 | #[response(content_type = 100)] | ^^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:32:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/responder.rs:37:21 | 37 | #[response(status = 8)] | ^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:36:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/responder.rs:41:21 | 41 | #[response(status = "404")] | ^^^^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:40:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/responder.rs:45:21 | 45 | #[response(status = "404", content_type = "html")] | ^^^^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:44:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid value: expected string literal - --> $DIR/responder.rs:49:41 + --> tests/ui-fail-stable/responder.rs:49:41 | 49 | #[response(status = 404, content_type = 120)] | ^^^ error: [note] error occurred while deriving `Responder` - --> $DIR/responder.rs:48:10 + --> tests/ui-fail-stable/responder.rs:48:10 | 48 | #[derive(Responder)] | ^^^^^^^^^ | - = note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) 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 9a8d3cd056..930506827b 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,203 +1,203 @@ 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()] | ^^^^^^^^ | - = note: this error originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in an attribute macro (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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 463166aeca..1a3d2d369a 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,108 +1,108 @@ 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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() {} | ^^ @@ -110,7 +110,7 @@ error: [note] expected argument named `b` here error: invalid identifier: `foo_.` --- help: dynamic parameters must be valid identifiers --- help: did you mean ``? - --> $DIR/route-path-bad-syntax.rs:60:7 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:60:7 | 60 | #[get("/")] | ^^^^^^^^^^ @@ -118,7 +118,7 @@ error: invalid identifier: `foo_.` error: invalid identifier: `foo*` --- help: dynamic parameters must be valid identifiers --- help: did you mean ``? - --> $DIR/route-path-bad-syntax.rs:63:7 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:63:7 | 63 | #[get("/")] | ^^^^^^^^^ @@ -126,7 +126,7 @@ error: invalid identifier: `foo*` error: invalid identifier: `!` --- help: dynamic parameters must be valid identifiers --- help: did you mean ``? - --> $DIR/route-path-bad-syntax.rs:66:7 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:66:7 | 66 | #[get("/")] | ^^^^^^ @@ -134,28 +134,28 @@ error: invalid identifier: `!` error: invalid identifier: `name>:`? - --> $DIR/route-path-bad-syntax.rs:69:7 + --> 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 + --> 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 + --> 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 + --> tests/ui-fail-stable/route-path-bad-syntax.rs:80:19 | 80 | #[get("/", data = "`? - --> $DIR/route-path-bad-syntax.rs:83:19 + --> 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 + --> 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 e9f53ff919..38192e84a3 100644 --- a/core/codegen/tests/ui-fail-stable/route-type-errors.stderr +++ b/core/codegen/tests/ui-fail-stable/route-type-errors.stderr @@ -1,5 +1,5 @@ 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` @@ -7,7 +7,7 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied = 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` @@ -15,7 +15,7 @@ error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied = 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 +23,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,7 +31,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: FromData<'_>` is not satisfied - --> $DIR/route-type-errors.rs:18:12 + --> tests/ui-fail-stable/route-type-errors.rs:18:12 | 18 | fn f4(foo: Q) {} | ^ the trait `FromData<'_>` is not implemented for `Q` @@ -42,7 +42,7 @@ error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied | -- required by this bound in `rocket::data::FromData::from_data` error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> $DIR/route-type-errors.rs:21:10 + --> 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` @@ -53,7 +53,7 @@ error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied | -- required by this bound in `from_request` 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` @@ -61,7 +61,7 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied = note: required by `from_param` error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied - --> $DIR/route-type-errors.rs:24:10 + --> 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` @@ -72,7 +72,7 @@ error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied | -- required by this bound in `from_request` 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` @@ -80,7 +80,7 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied = 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` diff --git a/core/codegen/tests/ui-fail-stable/route-warnings.stderr b/core/codegen/tests/ui-fail-stable/route-warnings.stderr index 4b3e10fd2e..df27ca5770 100644 --- a/core/codegen/tests/ui-fail-stable/route-warnings.stderr +++ b/core/codegen/tests/ui-fail-stable/route-warnings.stderr @@ -1,5 +1,5 @@ error: checking for warnings! - --> $DIR/route-warnings.rs:25:5 + --> tests/ui-fail-stable/route-warnings.rs:25:5 | 25 | compile_error!("checking for warnings!") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/core/codegen/tests/ui-fail-stable/routes.stderr b/core/codegen/tests/ui-fail-stable/routes.stderr index 1ec99110b2..1eaacddb7f 100644 --- a/core/codegen/tests/ui-fail-stable/routes.stderr +++ b/core/codegen/tests/ui-fail-stable/routes.stderr @@ -1,19 +1,19 @@ error: expected `,` - --> $DIR/routes.rs:4:23 + --> tests/ui-fail-stable/routes.rs:4:23 | 4 | let _ = routes![a b]; | ^ error: expected identifier - --> $DIR/routes.rs:6:24 + --> tests/ui-fail-stable/routes.rs:6:24 | 6 | let _ = routes![a::, ]; | ^ error: unexpected end of input, expected identifier - --> $DIR/routes.rs:7:13 + --> tests/ui-fail-stable/routes.rs:7:13 | 7 | let _ = routes![a::]; | ^^^^^^^^^^^^ | - = note: this error originates in the macro `routes` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) 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 6d6348ac8f..1f638d93a0 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,11 @@ error[E0271]: type mismatch resolving `>::Error == &str` - --> $DIR/typed-uri-bad-type.rs:22:37 + --> tests/ui-fail-stable/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` @@ -17,7 +17,7 @@ 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` @@ -29,7 +29,7 @@ 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` @@ -41,7 +41,7 @@ error[E0277]: the trait bound `usize: 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` @@ -49,7 +49,7 @@ error[E0277]: the trait bound `S: FromUriParam` = 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` @@ -62,7 +62,7 @@ error[E0277]: the trait bound `i32: 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` @@ -77,7 +77,7 @@ error[E0277]: the trait bound `std::string::String: 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` @@ -89,7 +89,7 @@ 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` @@ -101,7 +101,7 @@ error[E0277]: the trait bound `isize: 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` @@ -109,7 +109,7 @@ error[E0277]: the trait bound `S: FromUriParam = 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` @@ -117,7 +117,7 @@ error[E0277]: the trait bound `S: FromUriParam = 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` @@ -128,7 +128,7 @@ error[E0277]: the trait bound `S: Ignorable` is n | ------------ 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` @@ -139,7 +139,7 @@ error[E0277]: the trait bound `usize: 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` @@ -147,7 +147,7 @@ error[E0277]: the trait bound `S: FromUriParam = 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` @@ -159,13 +159,13 @@ error[E0277]: the trait bound `usize: FromUriParam: ValidRoutePrefix` is not satisfied - --> $DIR/typed-uri-bad-type.rs:77:15 + --> 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<'_>` 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` @@ -177,13 +177,13 @@ error[E0277]: the trait bound `usize: FromUriParam $DIR/typed-uri-bad-type.rs:78:15 + --> 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` 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` @@ -195,13 +195,13 @@ error[E0277]: the trait bound `usize: FromUriParam>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:81:37 + --> 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` 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` @@ -213,7 +213,7 @@ error[E0277]: the trait bound `usize: FromUriParam: 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<'_>` 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 aad543f3b5..eaa723128f 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,44 +1,44 @@ 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 + --> 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 + --> 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 + --> 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())); | ^ @@ -46,13 +46,13 @@ error: path parameters cannot be ignored 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 + --> 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")); | ^^^^^^^ @@ -60,19 +60,19 @@ error: [help] unknown parameter: `cookies` 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 + --> 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)); | ^^ @@ -80,7 +80,7 @@ error: [help] duplicate parameter: `id` 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 + --> tests/ui-fail-stable/typed-uris-bad-params.rs:51:18 | 51 | uri!(has_two(name = "hi")); | ^^^^ @@ -88,39 +88,39 @@ error: invalid parameters for `has_two` route uri 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 + --> 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 + --> 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 + --> 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)); | ^^^^^^^ @@ -128,152 +128,152 @@ error: [help] unknown parameter: `cookies` 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 + --> 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 0fa009664b..5f48d9359f 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) + = note: this error originates in a macro (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:16 | 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 + --> 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.stderr b/core/codegen/tests/ui-fail-stable/uri_display.stderr index deacb670f4..83c5d10894 100644 --- a/core/codegen/tests/ui-fail-stable/uri_display.stderr +++ b/core/codegen/tests/ui-fail-stable/uri_display.stderr @@ -1,125 +1,125 @@ error: fieldless structs are not supported - --> $DIR/uri_display.rs:4:1 + --> tests/ui-fail-stable/uri_display.rs:4:1 | 4 | struct Foo1; | ^^^^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:3:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/uri_display.rs:7:1 | 7 | struct Foo2(); | ^^^^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:6:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/uri_display.rs:10:11 | 10 | enum Foo3 { } | ^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:9:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/uri_display.rs:18:12 | 18 | struct Foo5(String, String); | ^^^^^^^^^^^^^^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:17:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/uri_display.rs:22:20 | 22 | #[field(name = 123)] | ^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:20:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/uri_display.rs:27:12 | 27 | struct Foo7(String, usize); | ^^^^^^^^^^^^^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:26:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/uri_display.rs:30:1 | 30 | struct Foo8; | ^^^^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:29:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (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-stable/uri_display.rs:33:1 | 33 | enum Foo9 { } | ^^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:32:10 + --> tests/ui-fail-stable/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) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: named structs are not supported - --> $DIR/uri_display.rs:36:1 + --> tests/ui-fail-stable/uri_display.rs:36:1 | 36 | struct Foo10 { | ^^^^^^ error: [note] error occurred while deriving `UriDisplay` - --> $DIR/uri_display.rs:35:10 + --> tests/ui-fail-stable/uri_display.rs:35:10 | 35 | #[derive(UriDisplayPath)] | ^^^^^^^^^^^^^^ | - = note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) 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 234b85956c..cd572e2028 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,5 +1,5 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:6:13 + --> tests/ui-fail-stable/uri_display_type_errors.rs:6:13 | 6 | struct Bar1(BadType); | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` @@ -7,7 +7,7 @@ error[E0277]: the trait bound `BadType: UriDisplay` for `&BadType` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:10:5 + --> tests/ui-fail-stable/uri_display_type_errors.rs:10:5 | 10 | field: BadType, | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` @@ -15,7 +15,7 @@ error[E0277]: the trait bound `BadType: UriDisplay` for `&BadType` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:16:5 + --> tests/ui-fail-stable/uri_display_type_errors.rs:16:5 | 16 | bad: BadType, | ^^^ the trait `UriDisplay` is not implemented for `BadType` @@ -23,7 +23,7 @@ error[E0277]: the trait bound `BadType: UriDisplay` for `&BadType` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:21:11 + --> tests/ui-fail-stable/uri_display_type_errors.rs:21:11 | 21 | Inner(BadType), | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` @@ -33,7 +33,7 @@ error[E0277]: the trait bound `BadType: UriDisplay` for `&&BadType` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:27:9 + --> tests/ui-fail-stable/uri_display_type_errors.rs:27:9 | 27 | field: BadType, | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` @@ -43,7 +43,7 @@ error[E0277]: the trait bound `BadType: UriDisplay` for `&&BadType` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:35:9 + --> tests/ui-fail-stable/uri_display_type_errors.rs:35:9 | 35 | other: BadType, | ^^^^^ the trait `UriDisplay` is not implemented for `BadType` @@ -53,7 +53,7 @@ error[E0277]: the trait bound `BadType: UriDisplay` for `&&BadType` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> $DIR/uri_display_type_errors.rs:40:12 + --> tests/ui-fail-stable/uri_display_type_errors.rs:40:12 | 40 | struct Baz(BadType); | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` From 3cf7853d3384549dae6174eaf1c49427e9aed8c9 Mon Sep 17 00:00:00 2001 From: Markus Kolb Date: Tue, 18 Jan 2022 21:38:28 +0100 Subject: [PATCH 11/12] tests: trybuild ui-fail-nightly stderrs updated --- .../ui-fail-nightly/database-syntax.stderr | 32 +- .../ui-fail-nightly/database-types.stderr | 12 +- contrib/sync_db_pools/codegen/src/database.rs | 1 + .../ui-fail-nightly/database-syntax.stderr | 18 +- .../ui-fail-nightly/database-types.stderr | 12 +- .../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 | 146 +++---- .../ui-fail-nightly/from_form_field.stderr | 96 ++--- .../from_form_type_errors.stderr | 4 +- .../ui-fail-nightly/responder-types.stderr | 119 +++--- .../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 | 383 ++++++++---------- .../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 +++--- 25 files changed, 756 insertions(+), 824 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 96b79e34c1..052998eab0 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 3574666bd6..2911ff2582 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/sync_db_pools/codegen/src/database.rs b/contrib/sync_db_pools/codegen/src/database.rs index 989cc0a634..e97c6015d5 100644 --- a/contrib/sync_db_pools/codegen/src/database.rs +++ b/contrib/sync_db_pools/codegen/src/database.rs @@ -12,6 +12,7 @@ struct DatabaseInvocation { /// The database name as passed in via #[database('database name')]. db_name: String, /// The entire structure that the `database` attribute was called on. + #[allow(dead_code)] structure: DataStruct, /// The type inside the structure: struct MyDb(ThisType). connection_type: Type, diff --git a/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-syntax.stderr b/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-syntax.stderr index 0f331e3131..e89220bded 100644 --- a/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-syntax.stderr +++ b/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-syntax.stderr @@ -1,5 +1,5 @@ error: unexpected end of input, expected string literal - --> $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 7143b4a882..2987650fad 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/core/codegen/tests/ui-fail-nightly/async-entry.stderr b/core/codegen/tests/ui-fail-nightly/async-entry.stderr index 6044748341..3949b02f62 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 ce8b42f685..6a1d4acf3c 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 14a830f5bf..2989a7bb70 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 d761eeae56..90f585a2d4 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 59f164bb24..518a3f645f 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 508ace0fed..a48feda3c9 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` @@ -484,7 +484,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-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 270f8e14aa..806e37b8c6 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 4b5d39fb3f..37cdf3fa16 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 7fbba7e778..c37a38be73 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 + --> 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 + --> tests/ui-fail-nightly/responder-types.rs:11:5 | -5 | thing: u8, - | ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` +11 | other: u8, + | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` | -note: required by `respond_to` - --> $DIR/responder.rs:298:5 + = 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 | -298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | 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:11:5 - | -11 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` +error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied + --> tests/ui-fail-nightly/responder-types.rs:16:5 | - = 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` +16 | thing: u8, + | ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` -error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:16:5 +error[E0277]: the trait bound `Header<'_>: From` is not satisfied + --> tests/ui-fail-nightly/responder-types.rs:17:5 | -16 | thing: u8, - | ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8` +17 | other: u8, + | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` | -note: required by `respond_to` - --> $DIR/responder.rs:298:5 + = 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 | -298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -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` + | 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 1a0ec92063..b211d1f2ac 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 b545a0cd61..1b0c39b1de 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 d5618e3e84..c59c4ebc5b 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 3bf72a2871..3d370408cc 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 cb36048fb2..ba8e465724 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 1ec99110b2..d034681d27 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 d0f3135a09..7b7031fca8 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,238 @@ -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 - | -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; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + --> tests/ui-fail-nightly/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: + > + > + > 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: + > + > + > 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: + > + > + > 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: + > + > + > + = 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 2 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: + > + > + > 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: + > + > + > 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 + --> tests/ui-fail-nightly/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: + > + > + > + +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 `FromUriParam` is not implemented for `usize` + | -----^^^^^^^^^^- + | | | + | | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>` + | required by a bound introduced by this call | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 +note: required by a bound in `RouteUriBuilder::with_prefix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { + | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` -error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied - --> $DIR/typed-uri-bad-type.rs:77:15 +error[E0277]: the trait bound `usize: FromUriParam` is not satisfied + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:33 | -77 | uri!(uri!("?foo#bar"), simple(id = "hi")); - | ^^^^^^^^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>` +78 | uri!(uri!("*"), simple(id = "hi")); + | ^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:78:33 +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 `FromUriParam` is not implemented for `usize` + | -----^^^- + | | | + | | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk` + | required by a bound introduced by this call | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 +note: required by a bound in `RouteUriBuilder::with_prefix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { + | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` -error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied - --> $DIR/typed-uri-bad-type.rs:78:15 +error[E0277]: the trait bound `usize: FromUriParam` is not satisfied + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:25 | -78 | uri!(uri!("*"), simple(id = "hi")); - | ^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk` +81 | uri!(_, simple(id = "hi"), uri!("*")); + | ^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:81:25 +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 `FromUriParam` is not implemented for `usize` + | -----^^^- + | | | + | | the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Asterisk` + | required by a bound introduced by this call | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 +note: required by a bound in `RouteUriBuilder::with_suffix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | where S: ValidRouteSuffix> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` -error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:81:37 +error[E0277]: the trait bound `usize: FromUriParam` is not satisfied + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:25 | -81 | uri!(_, simple(id = "hi"), uri!("*")); - | ^^^ the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Asterisk` +82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); + | ^^^^ the trait `FromUriParam` is not implemented for `usize` + | + = help: the following implementations were found: + > + > + > -error[E0277]: the trait bound `usize: FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:82:25 +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 `FromUriParam` is not implemented for `usize` + | -----^^^^^^^^^^- + | | | + | | the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Origin<'_>` + | required by a bound introduced by this call | - = help: the following implementations were found: - > - > - > -note: required by `from_uri_param` - --> $DIR/from_uri_param.rs:192:5 +note: required by a bound in `RouteUriBuilder::with_suffix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs | -192 | fn from_uri_param(param: T) -> Self::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | where S: ValidRouteSuffix> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` -error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:82:37 +error[E0271]: type mismatch resolving `>::Error == &str` + --> tests/ui-fail-nightly/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-nightly/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr index bb655f68b9..9adb9936f0 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 c0cd9eccf6..c0b5247713 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 6caf4379be..96ada3fa95 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 13d31426ff..99cf3b7329 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` From 23b6007bd1e9b8f20577aa215f1f70a849ecf084 Mon Sep 17 00:00:00 2001 From: Markus Kolb Date: Tue, 18 Jan 2022 21:40:40 +0100 Subject: [PATCH 12/12] chore: use not nightly-deprecated IntoIterator::into_iter --- core/http/src/ext.rs | 4 ++-- core/lib/src/response/stream/sse.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/http/src/ext.rs b/core/http/src/ext.rs index 1a0ab4e9c0..8e273f0e36 100644 --- a/core/http/src/ext.rs +++ b/core/http/src/ext.rs @@ -63,14 +63,14 @@ impl IntoCollection for &[T] { impl IntoCollection for [T; N] { #[inline(always)] fn into_collection>(self) -> SmallVec { - std::array::IntoIter::new(self).collect() + IntoIterator::into_iter(self).collect() } #[inline] fn mapped>(self, f: F) -> SmallVec where F: FnMut(T) -> U { - std::array::IntoIter::new(self).map(f).collect() + IntoIterator::into_iter(self).map(f).collect() } } diff --git a/core/lib/src/response/stream/sse.rs b/core/lib/src/response/stream/sse.rs index c2c397e563..5dc54bdba9 100644 --- a/core/lib/src/response/stream/sse.rs +++ b/core/lib/src/response/stream/sse.rs @@ -1,4 +1,3 @@ -use std::array; use std::borrow::Cow; use tokio::io::AsyncRead; @@ -337,7 +336,7 @@ impl Event { Some(RawLinedEvent::raw("")), ]; - stream::iter(array::IntoIter::new(events)).filter_map(ready) + stream::iter(IntoIterator::into_iter(events)).filter_map(ready) } }