From d05bb64bdbb9aae0ee4fe2ff451c1ce4fb08c098 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Thu, 20 Feb 2025 18:52:09 +0100 Subject: [PATCH] Bump to 1.85 This commit updates our locally used rust version to 1.85. This time there were no new clippy lints It also updates the compile test output to match the new compiler output. --- ...ectable_if_inner_expr_is_selectable.stderr | 34 ++++++++++ .../tests/fail/auto_type.stderr | 4 +- .../check_message_for_to_many_columns.stderr | 1 - ...support_returning_methods_on_sqlite.stderr | 34 ++++++++++ .../tests/fail/derive/aliases.stderr | 6 +- ...inct_on_allows_only_fields_of_table.stderr | 62 +++++++++++++++++++ ...nct_on_clause_only_supported_for_pg.stderr | 34 ++++++++++ ...aving_cant_be_used_without_group_by.stderr | 31 ++++++++++ ...m_select_requires_valid_column_list.stderr | 9 +-- .../tests/fail/only_only_on_table.stderr | 36 ++++++++++- ...for_update_cannot_be_used_on_sqlite.stderr | 34 ++++++++++ ...te_no_wait_cannot_be_used_on_sqlite.stderr | 34 ++++++++++ ...kip_locked_cannot_be_used_on_sqlite.stderr | 34 ++++++++++ ...support_returning_methods_on_sqlite.stderr | 34 ++++++++++ rust-toolchain | 2 +- 15 files changed, 372 insertions(+), 17 deletions(-) diff --git a/diesel_compile_tests/tests/fail/any_is_only_selectable_if_inner_expr_is_selectable.stderr b/diesel_compile_tests/tests/fail/any_is_only_selectable_if_inner_expr_is_selectable.stderr index e5c7c3fb7a70..65e6c19562da 100644 --- a/diesel_compile_tests/tests/fail/any_is_only_selectable_if_inner_expr_is_selectable.stderr +++ b/diesel_compile_tests/tests/fail/any_is_only_selectable_if_inner_expr_is_selectable.stderr @@ -33,3 +33,37 @@ note: required by a bound in `diesel::RunQueryDsl::load` | where | Self: LoadQuery<'query, Conn, U>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::load` + +error[E0277]: the trait bound `{type error}: FromSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Pg>` is not satisfied + --> tests/fail/any_is_only_selectable_if_inner_expr_is_selectable.rs:34:15 + | +34 | .load(&mut conn); + | ---- ^^^^^^^^^ the trait `SingleValue` is not implemented for `(diesel::sql_types::Integer, diesel::sql_types::Text)` + | | + | required by a bound introduced by this call + | + = note: double check your type mappings via the documentation of `(diesel::sql_types::Integer, diesel::sql_types::Text)` + = note: `diesel::sql_query` requires the loading target to column names for loading values. + You need to provide a type that explicitly derives `diesel::deserialize::QueryableByName` + = help: the following other types implement trait `SingleValue`: + BigInt + Bool + CChar + Cidr + Citext + Datetime + Inet + Interval + and $N others + = note: required for `{type error}` to implement `FromStaticSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Pg>` + = note: required for `{type error}` to implement `FromSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Pg>` + = note: required for `(diesel::sql_types::Integer, diesel::sql_types::Text)` to implement `load_dsl::private::CompatibleType<{type error}, Pg>` + = note: required for `SelectStatement, diesel::query_builder::select_clause::DefaultSelectClause>, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::WhereClause>>>>` to implement `LoadQuery<'_, diesel::PgConnection, {type error}>` +note: required by a bound in `diesel::RunQueryDsl::load` + --> $DIESEL/src/query_dsl/mod.rs + | + | fn load<'query, U>(self, conn: &mut Conn) -> QueryResult> + | ---- required by a bound in this associated function + | where + | Self: LoadQuery<'query, Conn, U>, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::load` diff --git a/diesel_compile_tests/tests/fail/auto_type.stderr b/diesel_compile_tests/tests/fail/auto_type.stderr index 02679b3aedd1..64720a1f3b68 100644 --- a/diesel_compile_tests/tests/fail/auto_type.stderr +++ b/diesel_compile_tests/tests/fail/auto_type.stderr @@ -22,9 +22,7 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su 30 | #[dsl::auto_type] | __________________- 31 | | fn users_with_posts_with_id_greater_than(id_greater_than: i32) -> _ { -32 | | // This fails because the macro infers the type of -33 | | // `user_has_post_with_id_greater_than(id_greater_than)` to be -34 | | // `user_has_post_with_id_greater_than` +... | 35 | | users::table 36 | | .filter(user_has_post_with_id_greater_than(id_greater_than)) | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- diff --git a/diesel_compile_tests/tests/fail/check_message_for_to_many_columns.stderr b/diesel_compile_tests/tests/fail/check_message_for_to_many_columns.stderr index 8c824f33ae40..07220a61555a 100644 --- a/diesel_compile_tests/tests/fail/check_message_for_to_many_columns.stderr +++ b/diesel_compile_tests/tests/fail/check_message_for_to_many_columns.stderr @@ -6,7 +6,6 @@ error: Table contains more than 16 columns. Consider enabling the `32-column-tab 5 | | column_1 -> Integer, 6 | | column_2 -> Integer, ... | -22 | | } 23 | | } | |_^ | diff --git a/diesel_compile_tests/tests/fail/delete_statement_does_not_support_returning_methods_on_sqlite.stderr b/diesel_compile_tests/tests/fail/delete_statement_does_not_support_returning_methods_on_sqlite.stderr index 49bdad95fd37..713bc467f016 100644 --- a/diesel_compile_tests/tests/fail/delete_statement_does_not_support_returning_methods_on_sqlite.stderr +++ b/diesel_compile_tests/tests/fail/delete_statement_does_not_support_returning_methods_on_sqlite.stderr @@ -51,3 +51,37 @@ note: required by a bound in `get_result` | where | Self: LoadQuery<'query, Conn, U>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::get_result` + +error[E0277]: the trait bound `{type error}: FromSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Sqlite>` is not satisfied + --> tests/fail/delete_statement_does_not_support_returning_methods_on_sqlite.rs:17:21 + | +17 | .get_result(&mut connection); + | ---------- ^^^^^^^^^^^^^^^ the trait `SingleValue` is not implemented for `(diesel::sql_types::Integer, diesel::sql_types::Text)` + | | + | required by a bound introduced by this call + | + = note: double check your type mappings via the documentation of `(diesel::sql_types::Integer, diesel::sql_types::Text)` + = note: `diesel::sql_query` requires the loading target to column names for loading values. + You need to provide a type that explicitly derives `diesel::deserialize::QueryableByName` + = help: the following other types implement trait `SingleValue`: + Array + BigInt + Bool + CChar + Cidr + Citext + Datetime + Inet + and $N others + = note: required for `{type error}` to implement `FromStaticSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Sqlite>` + = note: required for `{type error}` to implement `FromSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Sqlite>` + = note: required for `(diesel::sql_types::Integer, diesel::sql_types::Text)` to implement `load_dsl::private::CompatibleType<{type error}, Sqlite>` + = note: required for `DeleteStatement>>>>` to implement `LoadQuery<'_, diesel::SqliteConnection, {type error}>` +note: required by a bound in `get_result` + --> $DIESEL/src/query_dsl/mod.rs + | + | fn get_result<'query, U>(self, conn: &mut Conn) -> QueryResult + | ---------- required by a bound in this associated function + | where + | Self: LoadQuery<'query, Conn, U>, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::get_result` diff --git a/diesel_compile_tests/tests/fail/derive/aliases.stderr b/diesel_compile_tests/tests/fail/derive/aliases.stderr index b2b6d28030b9..f7615ae7cd7a 100644 --- a/diesel_compile_tests/tests/fail/derive/aliases.stderr +++ b/diesel_compile_tests/tests/fail/derive/aliases.stderr @@ -19,8 +19,7 @@ note: `posts::table` is defined in module `crate::posts` of the current crate 14 | | posts { 15 | | id -> Integer, 16 | | author -> Integer, -17 | | title -> Text, -18 | | } +... | 19 | | } | |_^ note: `users::table` is defined in module `crate::users` of the current crate @@ -251,8 +250,7 @@ error[E0599]: the method `select` exists for struct `SelectStatement` = note: required for `(posts::columns::name, users::columns::name)` to implement `SelectableExpression` = note: required for `posts::table` to implement `DistinctOnDsl<(posts::columns::name, users::columns::name)>` + +error[E0277]: the trait bound `(diesel::sql_types::Integer, diesel::sql_types::Text): SingleValue` is not satisfied + --> tests/fail/distinct_on_allows_only_fields_of_table.rs:27:22 + | +27 | .get_results(&mut connection); + | ----------- ^^^^^^^^^^^^^^^ the trait `SingleValue` is not implemented for `(diesel::sql_types::Integer, diesel::sql_types::Text)` + | | + | required by a bound introduced by this call + | + = help: the following other types implement trait `SingleValue`: + Array + BigInt + Bool + CChar + Cidr + Citext + Datetime + Inet + and $N others + = note: required for `{type error}` to implement `FromStaticSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Pg>` + = note: required for `{type error}` to implement `FromSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Pg>` + = note: required for `(diesel::sql_types::Integer, diesel::sql_types::Text)` to implement `load_dsl::private::CompatibleType<{type error}, Pg>` + = note: required for `SelectStatement, diesel::query_builder::select_clause::DefaultSelectClause>, DistinctOnClause>` to implement `LoadQuery<'_, diesel::PgConnection, {type error}>` +note: required by a bound in `get_results` + --> $DIESEL/src/query_dsl/mod.rs + | + | fn get_results<'query, U>(self, conn: &mut Conn) -> QueryResult> + | ----------- required by a bound in this associated function + | where + | Self: LoadQuery<'query, Conn, U>, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::get_results` + +error[E0277]: the trait bound `(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text): SingleValue` is not satisfied + --> tests/fail/distinct_on_allows_only_fields_of_table.rs:31:21 + | +31 | .get_result(&mut connection); + | ---------- ^^^^^^^^^^^^^^^ the trait `SingleValue` is not implemented for `(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text)` + | | + | required by a bound introduced by this call + | + = help: the following other types implement trait `SingleValue`: + Array + BigInt + Bool + CChar + Cidr + Citext + Datetime + Inet + and $N others + = note: required for `{type error}` to implement `FromStaticSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text), Pg>` + = note: required for `{type error}` to implement `FromSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text), Pg>` + = note: required for `(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text)` to implement `load_dsl::private::CompatibleType<{type error}, Pg>` + = note: required for `SelectStatement, diesel::query_builder::select_clause::DefaultSelectClause>, DistinctOnClause<(posts::columns::name, users::columns::name)>>` to implement `LoadQuery<'_, diesel::PgConnection, {type error}>` +note: required by a bound in `get_result` + --> $DIESEL/src/query_dsl/mod.rs + | + | fn get_result<'query, U>(self, conn: &mut Conn) -> QueryResult + | ---------- required by a bound in this associated function + | where + | Self: LoadQuery<'query, Conn, U>, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::get_result` diff --git a/diesel_compile_tests/tests/fail/distinct_on_clause_only_supported_for_pg.stderr b/diesel_compile_tests/tests/fail/distinct_on_clause_only_supported_for_pg.stderr index c610935e84f4..e4fa27f7cc1a 100644 --- a/diesel_compile_tests/tests/fail/distinct_on_clause_only_supported_for_pg.stderr +++ b/diesel_compile_tests/tests/fail/distinct_on_clause_only_supported_for_pg.stderr @@ -49,3 +49,37 @@ note: required by a bound in `get_results` | where | Self: LoadQuery<'query, Conn, U>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::get_results` + +error[E0277]: the trait bound `{type error}: FromSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Sqlite>` is not satisfied + --> tests/fail/distinct_on_clause_only_supported_for_pg.rs:16:41 + | +16 | users.distinct_on(name).get_results(&mut sqlite_connection); + | ----------- ^^^^^^^^^^^^^^^^^^^^^^ the trait `SingleValue` is not implemented for `(diesel::sql_types::Integer, diesel::sql_types::Text)` + | | + | required by a bound introduced by this call + | + = note: double check your type mappings via the documentation of `(diesel::sql_types::Integer, diesel::sql_types::Text)` + = note: `diesel::sql_query` requires the loading target to column names for loading values. + You need to provide a type that explicitly derives `diesel::deserialize::QueryableByName` + = help: the following other types implement trait `SingleValue`: + Array + BigInt + Bool + CChar + Cidr + Citext + Datetime + Inet + and $N others + = note: required for `{type error}` to implement `FromStaticSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Sqlite>` + = note: required for `{type error}` to implement `FromSqlRow<(diesel::sql_types::Integer, diesel::sql_types::Text), Sqlite>` + = note: required for `(diesel::sql_types::Integer, diesel::sql_types::Text)` to implement `load_dsl::private::CompatibleType<{type error}, Sqlite>` + = note: required for `SelectStatement, diesel::query_builder::select_clause::DefaultSelectClause>, DistinctOnClause>` to implement `LoadQuery<'_, diesel::SqliteConnection, {type error}>` +note: required by a bound in `get_results` + --> $DIESEL/src/query_dsl/mod.rs + | + | fn get_results<'query, U>(self, conn: &mut Conn) -> QueryResult> + | ----------- required by a bound in this associated function + | where + | Self: LoadQuery<'query, Conn, U>, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::get_results` diff --git a/diesel_compile_tests/tests/fail/having_cant_be_used_without_group_by.stderr b/diesel_compile_tests/tests/fail/having_cant_be_used_without_group_by.stderr index 6ea848bb65d2..ffb9da45b8da 100644 --- a/diesel_compile_tests/tests/fail/having_cant_be_used_without_group_by.stderr +++ b/diesel_compile_tests/tests/fail/having_cant_be_used_without_group_by.stderr @@ -57,3 +57,34 @@ note: required for `posts::columns::id` to implement `AppearsOnTable