From ca34951b6a4f9ada94d43ada6f1567cd9d34c3b9 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Thu, 28 Jan 2021 11:20:07 +0100 Subject: [PATCH] Fix building the repo with the default compiler (requires trybuild fork for now) --- Cargo.toml | 1 - diesel_compile_tests/Cargo.toml | 4 +++- ...ay_expressions_must_be_correct_type.stderr | 6 ++--- ...array_expressions_must_be_same_type.stderr | 24 +++++++++---------- ...th_methods_other_than_filter_called.stderr | 8 +++---- .../ordering_functions_require_ord.stderr | 8 +++---- ...ions_cant_be_used_in_a_sqlite_query.stderr | 4 ++-- ...ert_do_update_requires_valid_update.stderr | 4 ++-- .../update_requires_valid_where_clause.stderr | 4 ++-- 9 files changed, 32 insertions(+), 31 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b23692d30cd1..3dce5ddff7b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,6 @@ members = [ "diesel", "diesel_cli", "diesel_derives", - "diesel_compile_tests", "diesel_tests", "diesel_migrations", "diesel_migrations/migrations_internals", diff --git a/diesel_compile_tests/Cargo.toml b/diesel_compile_tests/Cargo.toml index bf1647bf39c1..be01da68a28b 100644 --- a/diesel_compile_tests/Cargo.toml +++ b/diesel_compile_tests/Cargo.toml @@ -5,4 +5,6 @@ authors = ["Sean Griffin "] [dependencies] diesel = { version = "2.0.0", default-features = false, features = ["extras", "sqlite", "postgres", "mysql", "unstable"], path = "../diesel" } -trybuild = "1.0.35" +trybuild = {git = "https://github.com/weiznich/trybuild", rev = "44d736bc7872e92b513d581b009e52bddf940de1"} + +[workspace] diff --git a/diesel_compile_tests/tests/fail/array_expressions_must_be_correct_type.stderr b/diesel_compile_tests/tests/fail/array_expressions_must_be_correct_type.stderr index ac8aee8aba5a..8d3b4d9302e4 100644 --- a/diesel_compile_tests/tests/fail/array_expressions_must_be_correct_type.stderr +++ b/diesel_compile_tests/tests/fail/array_expressions_must_be_correct_type.stderr @@ -4,7 +4,7 @@ error[E0277]: the trait bound `f64: diesel::SelectableExpression<()>` is not sat 9 | select(array((1f64, 3f64))).get_result::>(&connection); | ^^^^^^ the trait `diesel::SelectableExpression<()>` is not implemented for `f64` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs:465:26 + ::: $DIESEL/src/query_builder/functions.rs:465:26 | 465 | SelectStatement<()>: SelectDsl, | ------------ required by this bound in `diesel::select` @@ -19,7 +19,7 @@ error[E0277]: the trait bound `f64: diesel::expression::ValidGrouping<()>` is no 9 | select(array((1f64, 3f64))).get_result::>(&connection); | ^^^^^^ the trait `diesel::expression::ValidGrouping<()>` is not implemented for `f64` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs:465:26 + ::: $DIESEL/src/query_builder/functions.rs:465:26 | 465 | SelectStatement<()>: SelectDsl, | ------------ required by this bound in `diesel::select` @@ -82,7 +82,7 @@ error[E0277]: the trait bound `f64: diesel::Expression` is not satisfied 9 | select(array((1f64, 3f64))).get_result::>(&connection); | ^^^^^ the trait `diesel::Expression` is not implemented for `f64` | - ::: $WORKSPACE/diesel/src/pg/expression/array.rs:51:8 + ::: $DIESEL/src/pg/expression/array.rs:51:8 | 51 | T: AsExpressionList, | -------------------- required by this bound in `diesel::dsl::array` diff --git a/diesel_compile_tests/tests/fail/array_expressions_must_be_same_type.stderr b/diesel_compile_tests/tests/fail/array_expressions_must_be_same_type.stderr index dacef94de1c8..0e6197b8c12d 100644 --- a/diesel_compile_tests/tests/fail/array_expressions_must_be_same_type.stderr +++ b/diesel_compile_tests/tests/fail/array_expressions_must_be_same_type.stderr @@ -4,9 +4,9 @@ error[E0277]: the trait bound `f64: diesel::SelectableExpression<()>` is not sat 11 | select(array((1, 3f64))).get_result::>(&connection).unwrap(); | ^^^^^^ the trait `diesel::SelectableExpression<()>` is not implemented for `f64` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs + ::: $DIESEL/src/query_builder/functions.rs:465:26 | - | SelectStatement<()>: SelectDsl, +465 | SelectStatement<()>: SelectDsl, | ------------ required by this bound in `diesel::select` | = note: required because of the requirements on the impl of `diesel::SelectableExpression<()>` for `(diesel::expression::bound::Bound, f64)` @@ -19,9 +19,9 @@ error[E0277]: the trait bound `f64: diesel::expression::ValidGrouping<()>` is no 11 | select(array((1, 3f64))).get_result::>(&connection).unwrap(); | ^^^^^^ the trait `diesel::expression::ValidGrouping<()>` is not implemented for `f64` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs + ::: $DIESEL/src/query_builder/functions.rs:465:26 | - | SelectStatement<()>: SelectDsl, +465 | SelectStatement<()>: SelectDsl, | ------------ required by this bound in `diesel::select` | = note: required because of the requirements on the impl of `diesel::expression::ValidGrouping<()>` for `(diesel::expression::bound::Bound, f64)` @@ -82,9 +82,9 @@ error[E0277]: the trait bound `f64: diesel::Expression` is not satisfied 11 | select(array((1, 3f64))).get_result::>(&connection).unwrap(); | ^^^^^ the trait `diesel::Expression` is not implemented for `f64` | - ::: $WORKSPACE/diesel/src/pg/expression/array.rs + ::: $DIESEL/src/pg/expression/array.rs:51:8 | - | T: AsExpressionList, +51 | T: AsExpressionList, | -------------------- required by this bound in `diesel::dsl::array` | = note: required because of the requirements on the impl of `diesel::expression::AsExpression` for `f64` @@ -96,9 +96,9 @@ error[E0277]: the trait bound `{integer}: diesel::SelectableExpression<()>` is n 12 | select(array((1, 3f64))).get_result::>(&connection).unwrap(); | ^^^^^^ the trait `diesel::SelectableExpression<()>` is not implemented for `{integer}` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs + ::: $DIESEL/src/query_builder/functions.rs:465:26 | - | SelectStatement<()>: SelectDsl, +465 | SelectStatement<()>: SelectDsl, | ------------ required by this bound in `diesel::select` | = help: the following implementations were found: @@ -117,9 +117,9 @@ error[E0277]: the trait bound `{integer}: diesel::expression::ValidGrouping<()>` 12 | select(array((1, 3f64))).get_result::>(&connection).unwrap(); | ^^^^^^ the trait `diesel::expression::ValidGrouping<()>` is not implemented for `{integer}` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs + ::: $DIESEL/src/query_builder/functions.rs:465:26 | - | SelectStatement<()>: SelectDsl, +465 | SelectStatement<()>: SelectDsl, | ------------ required by this bound in `diesel::select` | = help: the following implementations were found: @@ -210,9 +210,9 @@ error[E0277]: the trait bound `{integer}: diesel::Expression` is not satisfied 12 | select(array((1, 3f64))).get_result::>(&connection).unwrap(); | ^^^^^ the trait `diesel::Expression` is not implemented for `{integer}` | - ::: $WORKSPACE/diesel/src/pg/expression/array.rs + ::: $DIESEL/src/pg/expression/array.rs:51:8 | - | T: AsExpressionList, +51 | T: AsExpressionList, | -------------------- required by this bound in `diesel::dsl::array` | = help: the following implementations were found: diff --git a/diesel_compile_tests/tests/fail/cannot_update_target_with_methods_other_than_filter_called.stderr b/diesel_compile_tests/tests/fail/cannot_update_target_with_methods_other_than_filter_called.stderr index 73e4cbb3360e..5dfa187fe267 100644 --- a/diesel_compile_tests/tests/fail/cannot_update_target_with_methods_other_than_filter_called.stderr +++ b/diesel_compile_tests/tests/fail/cannot_update_target_with_methods_other_than_filter_called.stderr @@ -4,9 +4,9 @@ error[E0277]: the trait bound `diesel::query_builder::SelectStatement>` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs + ::: $DIESEL/src/query_builder/functions.rs:78:18 | - | pub fn update(source: T) -> UpdateStatement { +78 | pub fn update(source: T) -> UpdateStatement { | ---------------- required by this bound in `diesel::update` | = note: required because of the requirements on the impl of `diesel::query_builder::IntoUpdateTarget` for `diesel::query_builder::SelectStatement>` @@ -17,9 +17,9 @@ error[E0277]: the trait bound `diesel::query_builder::SelectStatement>` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs + ::: $DIESEL/src/query_builder/functions.rs:78:18 | - | pub fn update(source: T) -> UpdateStatement { +78 | pub fn update(source: T) -> UpdateStatement { | ---------------- required by this bound in `diesel::update` | = note: required because of the requirements on the impl of `diesel::query_builder::IntoUpdateTarget` for `diesel::query_builder::SelectStatement>` diff --git a/diesel_compile_tests/tests/fail/ordering_functions_require_ord.stderr b/diesel_compile_tests/tests/fail/ordering_functions_require_ord.stderr index 4eed0f326e47..6e86a2f95a61 100644 --- a/diesel_compile_tests/tests/fail/ordering_functions_require_ord.stderr +++ b/diesel_compile_tests/tests/fail/ordering_functions_require_ord.stderr @@ -4,9 +4,9 @@ error[E0277]: the trait bound `diesel::sql_types::Bool: diesel::sql_types::SqlOr 13 | let source = stuff::table.select(max(stuff::b)); | ^^^ the trait `diesel::sql_types::SqlOrd` is not implemented for `diesel::sql_types::Bool` | - ::: $WORKSPACE/diesel/src/expression/functions/aggregate_ordering.rs + ::: $DIESEL/src/expression/functions/aggregate_ordering.rs:32:16 | - | fn max(expr: ST) -> ST::Ret; +32 | fn max(expr: ST) -> ST::Ret; | --------------- required by this bound in `diesel::dsl::max` | = note: required because of the requirements on the impl of `diesel::dsl::SqlOrdAggregate` for `diesel::sql_types::Bool` @@ -27,9 +27,9 @@ error[E0277]: the trait bound `diesel::sql_types::Bool: diesel::sql_types::SqlOr 14 | let source = stuff::table.select(min(stuff::b)); | ^^^ the trait `diesel::sql_types::SqlOrd` is not implemented for `diesel::sql_types::Bool` | - ::: $WORKSPACE/diesel/src/expression/functions/aggregate_ordering.rs + ::: $DIESEL/src/expression/functions/aggregate_ordering.rs:51:16 | - | fn min(expr: ST) -> ST::Ret; +51 | fn min(expr: ST) -> ST::Ret; | --------------- required by this bound in `diesel::dsl::min` | = note: required because of the requirements on the impl of `diesel::dsl::SqlOrdAggregate` for `diesel::sql_types::Bool` diff --git a/diesel_compile_tests/tests/fail/pg_specific_expressions_cant_be_used_in_a_sqlite_query.stderr b/diesel_compile_tests/tests/fail/pg_specific_expressions_cant_be_used_in_a_sqlite_query.stderr index 1e4f2febed09..06c796f410d5 100644 --- a/diesel_compile_tests/tests/fail/pg_specific_expressions_cant_be_used_in_a_sqlite_query.stderr +++ b/diesel_compile_tests/tests/fail/pg_specific_expressions_cant_be_used_in_a_sqlite_query.stderr @@ -28,9 +28,9 @@ error[E0599]: no method named `execute` found for struct `diesel::upsert::Incomp 34 | .execute(&connection); | ^^^^^^^ method not found in `diesel::upsert::IncompleteOnConflict>,), users::table>>, diesel::query_builder::upsert::on_conflict_target::ConflictTarget>>` | - ::: $WORKSPACE/diesel/src/upsert/on_conflict_extension.rs + ::: $DIESEL/src/upsert/on_conflict_extension.rs:222:1 | - | pub struct IncompleteOnConflict { +222 | pub struct IncompleteOnConflict { | --------------------------------------------- | | | doesn't satisfy `_: diesel::RunQueryDsl<_>` diff --git a/diesel_compile_tests/tests/fail/pg_upsert_do_update_requires_valid_update.stderr b/diesel_compile_tests/tests/fail/pg_upsert_do_update_requires_valid_update.stderr index c166493c3fb3..4429ea0f511f 100644 --- a/diesel_compile_tests/tests/fail/pg_upsert_do_update_requires_valid_update.stderr +++ b/diesel_compile_tests/tests/fail/pg_upsert_do_update_requires_valid_update.stderr @@ -4,9 +4,9 @@ error[E0599]: no method named `execute` found for struct `diesel::upsert::Incomp 37 | .execute(&connection); | ^^^^^^^ method not found in `diesel::upsert::IncompleteDoUpdate>,), users::table>>, diesel::query_builder::upsert::on_conflict_target::ConflictTarget>` | - ::: $WORKSPACE/diesel/src/upsert/on_conflict_extension.rs + ::: $DIESEL/src/upsert/on_conflict_extension.rs:369:1 | - | pub struct IncompleteDoUpdate { +369 | pub struct IncompleteDoUpdate { | ------------------------------------------- | | | doesn't satisfy `_: diesel::RunQueryDsl<_>` diff --git a/diesel_compile_tests/tests/fail/update_requires_valid_where_clause.stderr b/diesel_compile_tests/tests/fail/update_requires_valid_where_clause.stderr index c102b8494f88..07c1d99e1bfe 100644 --- a/diesel_compile_tests/tests/fail/update_requires_valid_where_clause.stderr +++ b/diesel_compile_tests/tests/fail/update_requires_valid_where_clause.stderr @@ -4,9 +4,9 @@ error[E0277]: the trait bound `diesel::query_builder::SelectStatement>>>>` | - ::: $WORKSPACE/diesel/src/query_builder/functions.rs + ::: $DIESEL/src/query_builder/functions.rs:78:18 | - | pub fn update(source: T) -> UpdateStatement { +78 | pub fn update(source: T) -> UpdateStatement { | ---------------- required by this bound in `diesel::update` | = help: the following implementations were found: