diff --git a/diesel/src/pg/query_builder/distinct_on.rs b/diesel/src/pg/query_builder/distinct_on.rs index 50e7875f7212..4e310c3a7f66 100644 --- a/diesel/src/pg/query_builder/distinct_on.rs +++ b/diesel/src/pg/query_builder/distinct_on.rs @@ -240,7 +240,7 @@ macro_rules! valid_ordering { // If we would generate these impls up to max_table_column_count tuple elements that // would be a really large number for 128 tuple elements (~64k trait impls) // It's fine to increase this number at some point in the future gradually -diesel_derives::__diesel_for_each_tuple!(valid_ordering, 3); +diesel_derives::__diesel_for_each_tuple!(valid_ordering, 5); /// A decorator trait for `OrderClause` /// It helps to have bounds on either Col, Asc and Desc. diff --git a/diesel_compile_tests/tests/fail/distinct_on_requires_matching_order_clause.stderr b/diesel_compile_tests/tests/fail/distinct_on_requires_matching_order_clause.stderr index 70ec21134f4e..5c51a2829f8e 100644 --- a/diesel_compile_tests/tests/fail/distinct_on_requires_matching_order_clause.stderr +++ b/diesel_compile_tests/tests/fail/distinct_on_requires_matching_order_clause.stderr @@ -9,12 +9,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ...>` to implement `DistinctOnDsl` note: required by a bound in `diesel::QueryDsl::distinct_on` @@ -34,12 +34,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ...>` to implement `DistinctOnDsl` note: required by a bound in `diesel::QueryDsl::distinct_on` @@ -59,12 +59,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ...>` to implement `DistinctOnDsl` note: required by a bound in `diesel::QueryDsl::distinct_on` @@ -84,12 +84,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, DistinctOnClause>` to implement `OrderDsl` note: required by a bound in `order_by` @@ -109,12 +109,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ...>` to implement `DistinctOnDsl` note: required by a bound in `diesel::QueryDsl::distinct_on` @@ -134,12 +134,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ...>` to implement `DistinctOnDsl` note: required by a bound in `diesel::QueryDsl::distinct_on` @@ -159,12 +159,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ...>` to implement `DistinctOnDsl<(columns::name, columns::id)>` note: required by a bound in `diesel::QueryDsl::distinct_on` @@ -184,12 +184,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ...>` to implement `DistinctOnDsl<(columns::name, columns::id)>` note: required by a bound in `diesel::QueryDsl::distinct_on` @@ -209,12 +209,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ...>` to implement `DistinctOnDsl` note: required by a bound in `diesel::QueryDsl::distinct_on` @@ -234,12 +234,12 @@ error[E0277]: the trait bound `diesel::query_builder::order_clause::OrderClause< = help: the following other types implement trait `query_dsl::order_dsl::ValidOrderingForDistinct`: as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - )> as query_dsl::order_dsl::ValidOrderingForDistinct>> - as query_dsl::order_dsl::ValidOrderingForDistinct>> + as query_dsl::order_dsl::ValidOrderingForDistinct>> and $N others = note: required for `SelectStatement, DefaultSelectClause>, DistinctOnClause>` to implement `OrderDsl` note: required by a bound in `order_by`