From 80ee319640f48865de0f9fb246b52928cc393ac9 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Wed, 13 Nov 2024 18:22:29 +0100 Subject: [PATCH 01/10] Drop gitter from the docs Our gitter channel has a spam problem and we do not have admin rights anymore due to whatever matrix bugs we hit. The channel therefore become unmaintainable. Given that we should drop it from our documentation. --- diesel/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/diesel/src/lib.rs b/diesel/src/lib.rs index b6f9e5f6f171..f0b90bad2fc5 100644 --- a/diesel/src/lib.rs +++ b/diesel/src/lib.rs @@ -137,9 +137,8 @@ //! ## Getting help //! //! If you run into problems, Diesel has an active community. -//! Either open a new [discussion] thread at diesel github repository or -//! use the active Gitter room at -//! [gitter.im/diesel-rs/diesel](https://gitter.im/diesel-rs/diesel) +//! Open a new [discussion] thread at diesel github repository +//! and we will try to help you //! //! [discussion]: https://github.com/diesel-rs/diesel/discussions/categories/q-a //! From 5e6f60f0051681256d8e09d275112a3418c35bdd Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara Date: Sat, 6 Jul 2024 07:23:12 +0000 Subject: [PATCH 02/10] Merge pull request #4101 from weiznich/typedef/for_returning Add a `diesel::dsl::Returning` typedef --- diesel/src/lib.rs | 7 +++++ diesel/src/query_builder/returning_clause.rs | 29 ++++++++++++++++++++ diesel_derives/tests/auto_type.rs | 12 ++++++++ 3 files changed, 48 insertions(+) diff --git a/diesel/src/lib.rs b/diesel/src/lib.rs index f0b90bad2fc5..7d78d266a7d1 100644 --- a/diesel/src/lib.rs +++ b/diesel/src/lib.rs @@ -675,6 +675,13 @@ pub mod helper_types { ::Where, ::Changeset, >; + + /// Represents the return type of + /// [`InsertStatement::returning`](crate::query_builder::InsertStatement::returning), + /// [`UpdateStatement::returning`] and + /// [`DeleteStatement::returning`](crate::query_builder::DeleteStatement::returning) + pub type Returning = + >::WithReturning; } pub mod prelude { diff --git a/diesel/src/query_builder/returning_clause.rs b/diesel/src/query_builder/returning_clause.rs index eef4431cf5d6..fc34e5f50edd 100644 --- a/diesel/src/query_builder/returning_clause.rs +++ b/diesel/src/query_builder/returning_clause.rs @@ -1,7 +1,11 @@ +use super::DeleteStatement; +use super::InsertStatement; +use super::UpdateStatement; use super::{AstPass, QueryFragment}; use crate::backend::{Backend, DieselReserveSpecialization}; use crate::query_builder::QueryId; use crate::result::QueryResult; +use crate::QuerySource; #[derive(Debug, Clone, Copy, QueryId)] pub struct NoReturningClause; @@ -52,3 +56,28 @@ where Ok(()) } } + +pub trait ReturningClauseHelper { + type WithReturning; +} + +impl ReturningClauseHelper for InsertStatement +where + T: QuerySource, +{ + type WithReturning = InsertStatement>; +} + +impl ReturningClauseHelper for UpdateStatement +where + T: QuerySource, +{ + type WithReturning = UpdateStatement>; +} + +impl ReturningClauseHelper for DeleteStatement +where + T: QuerySource, +{ + type WithReturning = DeleteStatement>; +} diff --git a/diesel_derives/tests/auto_type.rs b/diesel_derives/tests/auto_type.rs index 614e6c482b23..dd3005a5cfe7 100644 --- a/diesel_derives/tests/auto_type.rs +++ b/diesel_derives/tests/auto_type.rs @@ -373,6 +373,18 @@ fn with_const_generics() -> _ { users::id.eq(N) } +#[auto_type] +fn insert_returning() -> _ { + insert_into(users::table) + .values(users::id.eq(42_i32)) + .returning(users::id) +} + +#[auto_type] +fn delete_returning() -> _ { + delete(users::table).returning(users::id) +} + // #[auto_type] // fn test_sql_fragment() -> _ { // sql("foo") From 27bd72f71a474e8d36e6bb709caffb9f7d082eab Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Wed, 13 Nov 2024 18:28:07 +0100 Subject: [PATCH 03/10] Prepare a diesel 2.2.5 release --- CHANGELOG.md | 13 ++++++++++++- diesel/Cargo.toml | 2 +- diesel_cli/Cargo.toml | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 910dbae2a10e..c5ed98029acd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,17 @@ Increasing the minimal supported Rust version will always be coupled at least wi ## Unreleased -## [2.2.4] 2024-09-3 +## [2.2.5] 2024-11-18 + +### Fixed + +* Add a typedef for `Returning` so that `#[auto_type]` works with such queries + +### Removed + +* Do not mention the gitter channel in our docs anymore + +## [2.2.4] 2024-09-03 ### Fixed @@ -2144,3 +2154,4 @@ queries or set `PIPES_AS_CONCAT` manually. [2.2.2]: https://github.com/diesel-rs/diesel/compare/v.2.2.1...v2.2.2 [2.2.3]: https://github.com/diesel-rs/diesel/compare/v.2.2.2...v2.2.3 [2.2.4]: https://github.com/diesel-rs/diesel/compare/v.2.2.3...v2.2.4 +[2.2.5]: https://github.com/diesel-rs/diesel/compare/v.2.2.4...v2.2.5 diff --git a/diesel/Cargo.toml b/diesel/Cargo.toml index db9347e10cf7..ff37611437e2 100644 --- a/diesel/Cargo.toml +++ b/diesel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diesel" -version = "2.2.4" +version = "2.2.5" license = "MIT OR Apache-2.0" description = "A safe, extensible ORM and Query Builder for PostgreSQL, SQLite, and MySQL" readme = "README.md" diff --git a/diesel_cli/Cargo.toml b/diesel_cli/Cargo.toml index b9db32aeab85..f22d2b2ab879 100644 --- a/diesel_cli/Cargo.toml +++ b/diesel_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diesel_cli" -version = "2.2.4" +version = "2.2.5" license = "MIT OR Apache-2.0" description = "Provides the CLI for the Diesel crate" readme = "README.md" From 9baa6db2d7b74b3eec0e7abadbe7afe3333f5458 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Tue, 19 Nov 2024 20:18:13 +0000 Subject: [PATCH 04/10] Merge pull request #4351 from weiznich/fix/missing_type_def_for_count Add a missing type def --- diesel/src/lib.rs | 4 ++++ diesel_derives/tests/auto_type.rs | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/diesel/src/lib.rs b/diesel/src/lib.rs index 7d78d266a7d1..fa0e51875549 100644 --- a/diesel/src/lib.rs +++ b/diesel/src/lib.rs @@ -357,6 +357,7 @@ pub mod helper_types { use super::query_dsl::methods::*; use super::query_dsl::*; use super::query_source::{aliasing, joins}; + use crate::dsl::CountStar; use crate::query_builder::select_clause::SelectClause; #[doc(inline)] @@ -682,6 +683,9 @@ pub mod helper_types { /// [`DeleteStatement::returning`](crate::query_builder::DeleteStatement::returning) pub type Returning = >::WithReturning; + + #[doc(hidden)] // used for `QueryDsl::count` + pub type Count = Select; } pub mod prelude { diff --git a/diesel_derives/tests/auto_type.rs b/diesel_derives/tests/auto_type.rs index dd3005a5cfe7..178956c77ac8 100644 --- a/diesel_derives/tests/auto_type.rs +++ b/diesel_derives/tests/auto_type.rs @@ -385,6 +385,11 @@ fn delete_returning() -> _ { delete(users::table).returning(users::id) } +#[auto_type] +fn count_query() -> _ { + users::table.count() +} + // #[auto_type] // fn test_sql_fragment() -> _ { // sql("foo") From b0dedad2f86de3870bee33519c4fbf180cfe2cd7 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Fri, 15 Nov 2024 16:49:11 +0000 Subject: [PATCH 05/10] Merge pull request #4345 from E-anae/master Fix and/or function argument to compile check bool expression --- .../bool_expression_methods.rs | 4 +- ...ns_must_take_boolean_expr_as_attributes.rs | 19 ++++++++++ ...ust_take_boolean_expr_as_attributes.stderr | 37 +++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs create mode 100644 diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.stderr diff --git a/diesel/src/expression_methods/bool_expression_methods.rs b/diesel/src/expression_methods/bool_expression_methods.rs index c67756bfcf0e..dcc5ba03ddd5 100644 --- a/diesel/src/expression_methods/bool_expression_methods.rs +++ b/diesel/src/expression_methods/bool_expression_methods.rs @@ -41,7 +41,7 @@ pub trait BoolExpressionMethods: Expression + Sized { fn and(self, other: T) -> dsl::And where Self::SqlType: SqlType, - ST: SqlType + TypedExpressionType, + ST: SqlType + TypedExpressionType + BoolOrNullableBool, T: AsExpression, And: Expression, { @@ -89,7 +89,7 @@ pub trait BoolExpressionMethods: Expression + Sized { fn or(self, other: T) -> dsl::Or where Self::SqlType: SqlType, - ST: SqlType + TypedExpressionType, + ST: SqlType + TypedExpressionType + BoolOrNullableBool, T: AsExpression, Or: Expression, { diff --git a/diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs b/diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs new file mode 100644 index 000000000000..35e32c01d569 --- /dev/null +++ b/diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs @@ -0,0 +1,19 @@ +extern crate diesel; + +use diesel::prelude::*; + +table! { + users { + id -> Integer, + name -> VarChar, + } +} + +fn main() { + let conn = &mut PgConnection::establish("…").unwrap(); + users::table + .filter(users::id.eq(1).and(users::id).or(users::id)) + .select(users::id) + .execute(conn) + .unwrap(); +} diff --git a/diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.stderr b/diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.stderr new file mode 100644 index 000000000000..1f0c9ad6ea2c --- /dev/null +++ b/diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.stderr @@ -0,0 +1,37 @@ +error[E0277]: `diesel::sql_types::Integer` is neither `diesel::sql_types::Bool` nor `diesel::sql_types::Nullable` + --> tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs:15:33 + | +15 | .filter(users::id.eq(1).and(users::id).or(users::id)) + | ^^^ the trait `BoolOrNullableBool` is not implemented for `diesel::sql_types::Integer` + | + = note: try to provide an expression that produces one of the expected sql types + = help: the following other types implement trait `BoolOrNullableBool`: + Bool + Nullable +note: required by a bound in `diesel::BoolExpressionMethods::and` + --> $DIESEL/src/expression_methods/bool_expression_methods.rs + | + | fn and(self, other: T) -> dsl::And + | --- required by a bound in this associated function +... + | ST: SqlType + TypedExpressionType + BoolOrNullableBool, + | ^^^^^^^^^^^^^^^^^^ required by this bound in `BoolExpressionMethods::and` + +error[E0277]: `diesel::sql_types::Integer` is neither `diesel::sql_types::Bool` nor `diesel::sql_types::Nullable` + --> tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs:15:48 + | +15 | .filter(users::id.eq(1).and(users::id).or(users::id)) + | ^^ the trait `BoolOrNullableBool` is not implemented for `diesel::sql_types::Integer` + | + = note: try to provide an expression that produces one of the expected sql types + = help: the following other types implement trait `BoolOrNullableBool`: + Bool + Nullable +note: required by a bound in `diesel::BoolExpressionMethods::or` + --> $DIESEL/src/expression_methods/bool_expression_methods.rs + | + | fn or(self, other: T) -> dsl::Or + | -- required by a bound in this associated function +... + | ST: SqlType + TypedExpressionType + BoolOrNullableBool, + | ^^^^^^^^^^^^^^^^^^ required by this bound in `BoolExpressionMethods::or` From a9de598deea6eb76f42bc367ddc0de3d2b91425f Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Thu, 21 Nov 2024 07:42:03 +0100 Subject: [PATCH 06/10] More changelog entries --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ed98029acd..92487250944c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,10 @@ Increasing the minimal supported Rust version will always be coupled at least wi ### Fixed -* Add a typedef for `Returning` so that `#[auto_type]` works with such queries +* Add a typedef for `Returning` and `Count` so that `#[auto_type]` works with such queries +* Fixed an issue that allowed to pass non-boolean expressions to `.and()` and `.or()` which would + result in queries failing at runtime +* Officially deprecating the gitter room ### Removed From cbefbb0c4e63a1f36a937b875234e6c5289b4a3e Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Thu, 21 Nov 2024 07:49:07 +0100 Subject: [PATCH 07/10] Fix the compile tests --- diesel_compile_tests/Cargo.lock | 18 +- ...ion_requires_column_from_same_table.stderr | 56 +-- .../tests/fail/alias_and_group_by.stderr | 3 +- ...ectable_if_inner_expr_is_selectable.stderr | 12 +- ...ay_expressions_must_be_correct_type.stderr | 116 +++-- ...array_expressions_must_be_same_type.stderr | 268 +++++------- .../fail/array_only_usable_with_pg.stderr | 6 +- .../tests/fail/auto_type.stderr | 4 +- .../fail/boxed_queries_and_group_by.stderr | 11 +- ...re_selectable_expression_for_filter.stderr | 3 +- .../fail/broken_queryable_by_name.stderr | 40 +- .../cannot_join_to_non_joinable_table.stderr | 44 +- ...t_load_default_select_with_group_by.stderr | 6 +- ...aggregate_and_non_aggregate_selects.stderr | 22 +- .../cannot_pass_aggregate_to_where.stderr | 7 +- ...th_methods_other_than_filter_called.stderr | 22 +- .../columns_cannot_be_rhs_of_insert.stderr | 6 +- ...y_be_used_with_postgres_connections.stderr | 8 +- ...tom_returning_requires_nonaggregate.stderr | 14 +- ...ning_requires_selectable_expression.stderr | 37 +- ...support_returning_methods_on_sqlite.stderr | 24 +- .../tests/fail/derive/aliases.stderr | 93 ++-- ...inct_on_allows_only_fields_of_table.stderr | 28 +- ...nct_on_clause_only_supported_for_pg.stderr | 16 +- ...t_on_requires_matching_order_clause.stderr | 190 ++++---- ...annot_access_memory_of_dropped_bind.stderr | 5 +- ...ison_for_columns_from_another_table.stderr | 28 +- ...quires_bool_nonaggregate_expression.stderr | 7 +- .../fail/find_requires_correct_type.stderr | 32 +- ...aving_cant_be_used_without_group_by.stderr | 9 +- .../fail/ilike_only_compiles_for_pg.stderr | 16 +- ..._reference_columns_from_other_table.stderr | 14 +- ..._cant_be_used_with_tuples_or_arrays.stderr | 22 +- ...m_select_requires_valid_column_list.stderr | 8 +- ...here_clause_not_supported_on_sqlite.stderr | 21 +- ...pdate_where_not_supported_on_sqlite.stderr | 8 +- ...support_returning_methods_on_sqlite.stderr | 24 +- .../tests/fail/invalid_group_by.stderr | 36 +- .../tests/fail/invalid_joins.stderr | 106 ++--- ...n_requires_valid_boolean_expression.stderr | 3 +- ...es_not_support_offset_without_limit.stderr | 62 ++- .../tests/fail/mysql_on_conflict_tests.stderr | 209 ++++----- .../numeric_ops_require_numeric_column.stderr | 3 + .../tests/fail/only_only_on_table.stderr | 49 ++- .../ordering_functions_require_ord.stderr | 20 + ...ary_expressions_only_usable_with_pg.stderr | 12 +- ...ions_cant_be_used_in_a_sqlite_query.stderr | 27 +- ...tablesample_cannot_be_used_on_mysql.stderr | 23 +- ...ablesample_cannot_be_used_on_sqlite.stderr | 23 +- ...ert_do_update_requires_valid_update.stderr | 3 +- .../returning_cannot_be_called_twice.stderr | 12 +- ...ause_requires_selectable_expression.stderr | 48 +- ...side_of_left_join_requires_nullable.stderr | 200 ++++----- ...ct_carries_correct_result_type_info.stderr | 12 +- ...e_cannot_be_mixed_with_some_clauses.stderr | 173 +++----- ...for_update_cannot_be_used_on_sqlite.stderr | 20 +- ...te_no_wait_cannot_be_used_on_sqlite.stderr | 24 +- ...kip_locked_cannot_be_used_on_sqlite.stderr | 24 +- ...ect_requires_column_from_same_table.stderr | 14 +- .../select_requires_valid_grouping.stderr | 51 +-- ...elect_sql_still_ensures_result_type.stderr | 6 +- .../tests/fail/selectable.stderr | 414 ++++++++---------- .../fail/selectable_with_typemisamatch.stderr | 15 +- ...s_all_must_be_from_selectable_table.stderr | 42 +- ...sert_or_ignore_cannot_be_used_on_pg.stderr | 10 +- .../sqlite_upsert_cannot_be_used_on_pg.stderr | 10 +- ...lect_cannot_reference_random_tables.stderr | 51 +-- .../subselect_requires_correct_type.stderr | 2 +- .../tests/fail/update_requires_set.stderr | 16 +- .../update_requires_valid_where_clause.stderr | 13 +- ...support_returning_methods_on_sqlite.stderr | 24 +- ...iple_values_not_supported_on_sqlite.stderr | 28 +- ...nctions_follow_same_selection_rules.stderr | 9 +- ...alid_grouping_and_boxed_expressions.stderr | 29 +- 74 files changed, 1400 insertions(+), 1671 deletions(-) diff --git a/diesel_compile_tests/Cargo.lock b/diesel_compile_tests/Cargo.lock index f0856d0eee0b..ff3d1eb3ecb9 100644 --- a/diesel_compile_tests/Cargo.lock +++ b/diesel_compile_tests/Cargo.lock @@ -130,7 +130,7 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.0" +version = "2.2.5" dependencies = [ "bigdecimal", "bitflags", @@ -164,7 +164,7 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.2.0" +version = "2.2.3" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "dsl_auto_type" -version = "0.1.0" +version = "0.1.2" dependencies = [ "darling", "either", @@ -577,6 +577,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "target-triple" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a4d50cdb458045afc8131fd91b64904da29548bcb63c7236e0844936c13078" + [[package]] name = "termcolor" version = "1.4.1" @@ -668,15 +674,15 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.92" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35b69ff3ed900f74eb1e0d9bdd3df38da829dc4a26531674f6f019ca7c093c8d" +checksum = "8dcd332a5496c026f1e14b7f3d2b7bd98e509660c04239c58b0ba38a12daded4" dependencies = [ "glob", - "once_cell", "serde", "serde_derive", "serde_json", + "target-triple", "termcolor", "toml", ] diff --git a/diesel_compile_tests/tests/fail/aggregate_expression_requires_column_from_same_table.stderr b/diesel_compile_tests/tests/fail/aggregate_expression_requires_column_from_same_table.stderr index 04368b866cd0..c79646bd39e5 100644 --- a/diesel_compile_tests/tests/fail/aggregate_expression_requires_column_from_same_table.stderr +++ b/diesel_compile_tests/tests/fail/aggregate_expression_requires_column_from_same_table.stderr @@ -6,13 +6,13 @@ error[E0277]: Cannot select `posts::columns::id` from `users::table` | = note: `posts::columns::id` is no valid selection for `users::table` = help: the following other types implement trait `SelectableExpression`: - >> - >> - >>> - >> - > - >> - >> + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>>` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>` = note: required for `diesel::expression::functions::aggregate_folding::sum_utils::sum` to implement `SelectableExpression` = note: required for `SelectStatement>` to implement `SelectDsl>` @@ -41,13 +41,13 @@ error[E0277]: Cannot select `posts::columns::id` from `users::table` | = note: `posts::columns::id` is no valid selection for `users::table` = help: the following other types implement trait `SelectableExpression`: - >> - >> - >>> - >> - > - >> - >> + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>>` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>` = note: required for `diesel::expression::functions::aggregate_folding::avg_utils::avg` to implement `SelectableExpression` = note: required for `SelectStatement>` to implement `SelectDsl>` @@ -76,13 +76,13 @@ error[E0277]: Cannot select `posts::columns::id` from `users::table` | = note: `posts::columns::id` is no valid selection for `users::table` = help: the following other types implement trait `SelectableExpression`: - >> - >> - >>> - >> - > - >> - >> + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>>` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>` = note: required for `diesel::expression::functions::aggregate_ordering::max_utils::max` to implement `SelectableExpression` = note: required for `SelectStatement>` to implement `SelectDsl>` @@ -111,13 +111,13 @@ error[E0277]: Cannot select `posts::columns::id` from `users::table` | = note: `posts::columns::id` is no valid selection for `users::table` = help: the following other types implement trait `SelectableExpression`: - >> - >> - >>> - >> - > - >> - >> + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>>` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression` + `posts::columns::id` implements `SelectableExpression>` + `posts::columns::id` implements `SelectableExpression>` = note: required for `diesel::expression::functions::aggregate_ordering::min_utils::min` to implement `SelectableExpression` = note: required for `SelectStatement>` to implement `SelectDsl>` diff --git a/diesel_compile_tests/tests/fail/alias_and_group_by.stderr b/diesel_compile_tests/tests/fail/alias_and_group_by.stderr index 61f9b246cfaf..5d5e0fd8daa5 100644 --- a/diesel_compile_tests/tests/fail/alias_and_group_by.stderr +++ b/diesel_compile_tests/tests/fail/alias_and_group_by.stderr @@ -17,5 +17,4 @@ note: required for `columns::id` to implement `ValidGrouping` = note: associated types for the current `impl` cannot be restricted in `where` clauses = note: 1 redundant requirement hidden = note: required for `AliasedField` to implement `ValidGrouping>` - = note: required for `SelectStatement>, DefaultSelectClause>, ..., ..., ..., ..., ...>` to implement `SelectDsl>` - = note: consider using `--verbose` to print the full type name to the console + = note: required for `SelectStatement>, diesel::query_builder::select_clause::DefaultSelectClause>>, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::NoWhereClause, diesel::query_builder::order_clause::NoOrderClause, LimitOffsetClause, diesel::query_builder::group_by_clause::GroupByClause>>` to implement `SelectDsl>` 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 a4a43505b303..e5c7c3fb7a70 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 @@ -21,10 +21,10 @@ note: required for `more_stuff::columns::names` to implement `AppearsOnTable