-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3413 from weiznich/fix/3412
Fix #3412
- Loading branch information
Showing
5 changed files
with
118 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 27 additions & 5 deletions
32
diesel_compile_tests/tests/fail/boxed_queries_require_selectable_expression_for_order.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
error[E0277]: the trait bound `FromClause<users::table>: AppearsInFromClause<posts::table>` is not satisfied | ||
error[E0271]: type mismatch resolving `<users::table as AppearsInFromClause<posts::table>>::Count == diesel::query_source::Once` | ||
--> tests/fail/boxed_queries_require_selectable_expression_for_order.rs:21:37 | ||
| | ||
21 | users::table.into_boxed::<Pg>().order(posts::title.desc()); | ||
| ^^^^^ the trait `AppearsInFromClause<posts::table>` is not implemented for `FromClause<users::table>` | ||
| ^^^^^ expected struct `diesel::query_source::Never`, found struct `diesel::query_source::Once` | ||
| | ||
= help: the trait `AppearsInFromClause<QS1>` is implemented for `FromClause<QS2>` | ||
note: required because of the requirements on the impl of `AppearsOnTable<FromClause<users::table>>` for `posts::columns::title` | ||
note: required because of the requirements on the impl of `AppearsOnTable<users::table>` for `posts::columns::title` | ||
--> tests/fail/boxed_queries_require_selectable_expression_for_order.rs:16:9 | ||
| | ||
16 | title -> VarChar, | ||
| ^^^^^ | ||
= note: 1 redundant requirement hidden | ||
= note: required because of the requirements on the impl of `AppearsOnTable<FromClause<users::table>>` for `diesel::expression::operators::Desc<posts::columns::title>` | ||
= note: required because of the requirements on the impl of `AppearsOnTable<users::table>` for `diesel::expression::operators::Desc<posts::columns::title>` | ||
= note: required because of the requirements on the impl of `OrderDsl<diesel::expression::operators::Desc<posts::columns::title>>` for `BoxedSelectStatement<'_, (diesel::sql_types::Integer, diesel::sql_types::Text), FromClause<users::table>, Pg>` | ||
|
||
error[E0277]: the trait bound `users::table: TableNotEqual<posts::table>` is not satisfied | ||
--> tests/fail/boxed_queries_require_selectable_expression_for_order.rs:21:37 | ||
| | ||
21 | users::table.into_boxed::<Pg>().order(posts::title.desc()); | ||
| ^^^^^ the trait `TableNotEqual<posts::table>` is not implemented for `users::table` | ||
| | ||
= help: the following other types implement trait `TableNotEqual<T>`: | ||
<Only<pg::metadata_lookup::pg_namespace::table> as TableNotEqual<pg::metadata_lookup::pg_type::table>> | ||
<Only<pg::metadata_lookup::pg_type::table> as TableNotEqual<pg::metadata_lookup::pg_namespace::table>> | ||
<pg::metadata_lookup::pg_namespace::table as TableNotEqual<Only<pg::metadata_lookup::pg_type::table>>> | ||
<pg::metadata_lookup::pg_namespace::table as TableNotEqual<pg::metadata_lookup::pg_type::table>> | ||
<pg::metadata_lookup::pg_type::table as TableNotEqual<Only<pg::metadata_lookup::pg_namespace::table>>> | ||
<pg::metadata_lookup::pg_type::table as TableNotEqual<pg::metadata_lookup::pg_namespace::table>> | ||
= note: required because of the requirements on the impl of `AppearsInFromClause<posts::table>` for `users::table` | ||
note: required because of the requirements on the impl of `AppearsOnTable<users::table>` for `posts::columns::title` | ||
--> tests/fail/boxed_queries_require_selectable_expression_for_order.rs:16:9 | ||
| | ||
16 | title -> VarChar, | ||
| ^^^^^ | ||
= note: 1 redundant requirement hidden | ||
= note: required because of the requirements on the impl of `AppearsOnTable<users::table>` for `diesel::expression::operators::Desc<posts::columns::title>` | ||
= note: required because of the requirements on the impl of `OrderDsl<diesel::expression::operators::Desc<posts::columns::title>>` for `BoxedSelectStatement<'_, (diesel::sql_types::Integer, diesel::sql_types::Text), FromClause<users::table>, Pg>` |
28 changes: 24 additions & 4 deletions
28
diesel_compile_tests/tests/fail/order_requires_column_from_same_table.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters