Skip to content

Commit

Permalink
Fix the compile tests
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Nov 21, 2024
1 parent a9de598 commit cbefbb0
Show file tree
Hide file tree
Showing 74 changed files with 1,400 additions and 1,671 deletions.
18 changes: 12 additions & 6 deletions diesel_compile_tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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<QS>`:
<posts::columns::id as SelectableExpression<JoinOn<Join, On>>>
<posts::columns::id as SelectableExpression<Only<posts::table>>>
<posts::columns::id as SelectableExpression<SelectStatement<FromClause<From>>>>
<posts::columns::id as SelectableExpression<Tablesample<posts::table, TSM>>>
<posts::columns::id as SelectableExpression<posts::table>>
<posts::columns::id as SelectableExpression<query_source::joins::Join<Left, Right, Inner>>>
<posts::columns::id as SelectableExpression<query_source::joins::Join<Left, Right, LeftOuter>>>
`posts::columns::id` implements `SelectableExpression<JoinOn<Join, On>>`
`posts::columns::id` implements `SelectableExpression<Only<posts::table>>`
`posts::columns::id` implements `SelectableExpression<SelectStatement<FromClause<From>>>`
`posts::columns::id` implements `SelectableExpression<Tablesample<posts::table, TSM>>`
`posts::columns::id` implements `SelectableExpression<posts::table>`
`posts::columns::id` implements `SelectableExpression<query_source::joins::Join<Left, Right, Inner>>`
`posts::columns::id` implements `SelectableExpression<query_source::joins::Join<Left, Right, LeftOuter>>`
= note: required for `diesel::expression::functions::aggregate_folding::sum_utils::sum<diesel::sql_types::Integer, posts::columns::id>` to implement `SelectableExpression<users::table>`
= note: required for `SelectStatement<FromClause<users::table>>` to implement `SelectDsl<diesel::expression::functions::aggregate_folding::sum_utils::sum<diesel::sql_types::Integer, posts::columns::id>>`

Expand Down Expand Up @@ -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<QS>`:
<posts::columns::id as SelectableExpression<JoinOn<Join, On>>>
<posts::columns::id as SelectableExpression<Only<posts::table>>>
<posts::columns::id as SelectableExpression<SelectStatement<FromClause<From>>>>
<posts::columns::id as SelectableExpression<Tablesample<posts::table, TSM>>>
<posts::columns::id as SelectableExpression<posts::table>>
<posts::columns::id as SelectableExpression<query_source::joins::Join<Left, Right, Inner>>>
<posts::columns::id as SelectableExpression<query_source::joins::Join<Left, Right, LeftOuter>>>
`posts::columns::id` implements `SelectableExpression<JoinOn<Join, On>>`
`posts::columns::id` implements `SelectableExpression<Only<posts::table>>`
`posts::columns::id` implements `SelectableExpression<SelectStatement<FromClause<From>>>`
`posts::columns::id` implements `SelectableExpression<Tablesample<posts::table, TSM>>`
`posts::columns::id` implements `SelectableExpression<posts::table>`
`posts::columns::id` implements `SelectableExpression<query_source::joins::Join<Left, Right, Inner>>`
`posts::columns::id` implements `SelectableExpression<query_source::joins::Join<Left, Right, LeftOuter>>`
= note: required for `diesel::expression::functions::aggregate_folding::avg_utils::avg<diesel::sql_types::Integer, posts::columns::id>` to implement `SelectableExpression<users::table>`
= note: required for `SelectStatement<FromClause<users::table>>` to implement `SelectDsl<diesel::expression::functions::aggregate_folding::avg_utils::avg<diesel::sql_types::Integer, posts::columns::id>>`

Expand Down Expand Up @@ -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<QS>`:
<posts::columns::id as SelectableExpression<JoinOn<Join, On>>>
<posts::columns::id as SelectableExpression<Only<posts::table>>>
<posts::columns::id as SelectableExpression<SelectStatement<FromClause<From>>>>
<posts::columns::id as SelectableExpression<Tablesample<posts::table, TSM>>>
<posts::columns::id as SelectableExpression<posts::table>>
<posts::columns::id as SelectableExpression<query_source::joins::Join<Left, Right, Inner>>>
<posts::columns::id as SelectableExpression<query_source::joins::Join<Left, Right, LeftOuter>>>
`posts::columns::id` implements `SelectableExpression<JoinOn<Join, On>>`
`posts::columns::id` implements `SelectableExpression<Only<posts::table>>`
`posts::columns::id` implements `SelectableExpression<SelectStatement<FromClause<From>>>`
`posts::columns::id` implements `SelectableExpression<Tablesample<posts::table, TSM>>`
`posts::columns::id` implements `SelectableExpression<posts::table>`
`posts::columns::id` implements `SelectableExpression<query_source::joins::Join<Left, Right, Inner>>`
`posts::columns::id` implements `SelectableExpression<query_source::joins::Join<Left, Right, LeftOuter>>`
= note: required for `diesel::expression::functions::aggregate_ordering::max_utils::max<diesel::sql_types::Integer, posts::columns::id>` to implement `SelectableExpression<users::table>`
= note: required for `SelectStatement<FromClause<users::table>>` to implement `SelectDsl<diesel::expression::functions::aggregate_ordering::max_utils::max<diesel::sql_types::Integer, posts::columns::id>>`

Expand Down Expand Up @@ -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<QS>`:
<posts::columns::id as SelectableExpression<JoinOn<Join, On>>>
<posts::columns::id as SelectableExpression<Only<posts::table>>>
<posts::columns::id as SelectableExpression<SelectStatement<FromClause<From>>>>
<posts::columns::id as SelectableExpression<Tablesample<posts::table, TSM>>>
<posts::columns::id as SelectableExpression<posts::table>>
<posts::columns::id as SelectableExpression<query_source::joins::Join<Left, Right, Inner>>>
<posts::columns::id as SelectableExpression<query_source::joins::Join<Left, Right, LeftOuter>>>
`posts::columns::id` implements `SelectableExpression<JoinOn<Join, On>>`
`posts::columns::id` implements `SelectableExpression<Only<posts::table>>`
`posts::columns::id` implements `SelectableExpression<SelectStatement<FromClause<From>>>`
`posts::columns::id` implements `SelectableExpression<Tablesample<posts::table, TSM>>`
`posts::columns::id` implements `SelectableExpression<posts::table>`
`posts::columns::id` implements `SelectableExpression<query_source::joins::Join<Left, Right, Inner>>`
`posts::columns::id` implements `SelectableExpression<query_source::joins::Join<Left, Right, LeftOuter>>`
= note: required for `diesel::expression::functions::aggregate_ordering::min_utils::min<diesel::sql_types::Integer, posts::columns::id>` to implement `SelectableExpression<users::table>`
= note: required for `SelectStatement<FromClause<users::table>>` to implement `SelectDsl<diesel::expression::functions::aggregate_ordering::min_utils::min<diesel::sql_types::Integer, posts::columns::id>>`

Expand Down
3 changes: 1 addition & 2 deletions diesel_compile_tests/tests/fail/alias_and_group_by.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ note: required for `columns::id` to implement `ValidGrouping<columns::name>`
= note: associated types for the current `impl` cannot be restricted in `where` clauses
= note: 1 redundant requirement hidden
= note: required for `AliasedField<user1, columns::id>` to implement `ValidGrouping<AliasedField<user1, columns::name>>`
= note: required for `SelectStatement<FromClause<Alias<user1>>, DefaultSelectClause<FromClause<...>>, ..., ..., ..., ..., ...>` to implement `SelectDsl<AliasedField<user1, columns::id>>`
= note: consider using `--verbose` to print the full type name to the console
= note: required for `SelectStatement<FromClause<Alias<user1>>, diesel::query_builder::select_clause::DefaultSelectClause<FromClause<Alias<user1>>>, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::NoWhereClause, diesel::query_builder::order_clause::NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, diesel::query_builder::group_by_clause::GroupByClause<AliasedField<user1, columns::name>>>` to implement `SelectDsl<AliasedField<user1, columns::id>>`
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ note: required for `more_stuff::columns::names` to implement `AppearsOnTable<stu
| ^^^^^
= note: associated types for the current `impl` cannot be restricted in `where` clauses
= note: 3 redundant requirements hidden
= note: required for `Grouped<Eq<name, Any<names>>>` to implement `AppearsOnTable<stuff::table>`
= note: required for `WhereClause<Grouped<Eq<name, Any<names>>>>` to implement `diesel::query_builder::where_clause::ValidWhereClause<FromClause<stuff::table>>`
= note: required for `SelectStatement<FromClause<table>, DefaultSelectClause<FromClause<table>>, NoDistinctClause, WhereClause<...>>` to implement `Query`
= note: required for `SelectStatement<FromClause<table>, DefaultSelectClause<FromClause<table>>, NoDistinctClause, WhereClause<...>>` to implement `LoadQuery<'_, _, _>`
= note: required for `diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<stuff::columns::name, diesel::pg::expression::array_comparison::Any<more_stuff::columns::names>>>` to implement `AppearsOnTable<stuff::table>`
= note: required for `diesel::query_builder::where_clause::WhereClause<diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<stuff::columns::name, diesel::pg::expression::array_comparison::Any<more_stuff::columns::names>>>>` to implement `diesel::query_builder::where_clause::ValidWhereClause<FromClause<stuff::table>>`
= note: required for `SelectStatement<FromClause<stuff::table>, diesel::query_builder::select_clause::DefaultSelectClause<FromClause<stuff::table>>, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::WhereClause<diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<stuff::columns::name, diesel::pg::expression::array_comparison::Any<more_stuff::columns::names>>>>>` to implement `Query`
= note: required for `SelectStatement<FromClause<stuff::table>, diesel::query_builder::select_clause::DefaultSelectClause<FromClause<stuff::table>>, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::WhereClause<diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<stuff::columns::name, diesel::pg::expression::array_comparison::Any<more_stuff::columns::names>>>>>` to implement `LoadQuery<'_, _, _>`
note: required by a bound in `diesel::RunQueryDsl::load`
--> $DIESEL/src/query_dsl/mod.rs
|
Expand All @@ -33,7 +33,3 @@ note: required by a bound in `diesel::RunQueryDsl::load`
| where
| Self: LoadQuery<'query, Conn, U>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RunQueryDsl::load`
= note: consider using `--verbose` to print the full type name to the console
= note: consider using `--verbose` to print the full type name to the console
= note: consider using `--verbose` to print the full type name to the console
= note: consider using `--verbose` to print the full type name to the console
Loading

0 comments on commit cbefbb0

Please sign in to comment.