Skip to content

Commit

Permalink
[fix] fixes some compilertests due to renaming of an associated type.
Browse files Browse the repository at this point in the history
  • Loading branch information
coderPaddyS committed Jun 20, 2024
1 parent f1ffc68 commit 92d81f2
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ error[E0599]: the method `load` exists for struct `CopyToQuery<table, CopyToOpti
::: $DIESEL/src/pg/query_builder/copy/copy_to.rs
|
| pub struct CopyToQuery<T, O> {
| ---------------------------- doesn't satisfy `_: RunQueryDsl<_>` or `_: Table`
| ---------------------------- doesn't satisfy `_: RunQueryDsl<_>` or `_: View`
|
= note: the following trait bounds were not satisfied:
`CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: Table`
`CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: View`
which is required by `CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: diesel::RunQueryDsl<_>`
`&CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: Table`
`&CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: View`
which is required by `&CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: diesel::RunQueryDsl<_>`
`&mut CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: Table`
`&mut CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: View`
which is required by `&mut CopyToQuery<users::table, pg::query_builder::copy::copy_to::CopyToOptions>: diesel::RunQueryDsl<_>`
16 changes: 8 additions & 8 deletions diesel_compile_tests/tests/fail/derive/aliases.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0271]: type mismatch resolving `<id as Column>::Table == table`
error[E0271]: type mismatch resolving `<id as Column>::Source == table`
--> tests/fail/derive/aliases.rs:36:22
|
36 | user_alias.field(posts::id);
| ----- ^^^^^^^^^ type mismatch resolving `<id as Column>::Table == table`
| ----- ^^^^^^^^^ type mismatch resolving `<id as Column>::Source == table`
| |
| required by a bound introduced by this call
|
Expand Down Expand Up @@ -39,8 +39,8 @@ note: required by a bound in `Alias::<S>::field`
| pub fn field<F>(&self, field: F) -> AliasedField<S, F>
| ----- required by a bound in this associated function
| where
| F: Column<Table = S::Target>,
| ^^^^^^^^^^^^^^^^^ required by this bound in `Alias::<S>::field`
| F: Column<Source = S::Target>,
| ^^^^^^^^^^^^^^^^^^ required by this bound in `Alias::<S>::field`
= note: this error originates in the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0271]: type mismatch resolving `<Once as Plus<Once>>::Output == Once`
Expand Down Expand Up @@ -102,9 +102,9 @@ error[E0599]: the method `select` exists for struct `SelectStatement<FromClause<
|
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`&SelectStatement<FromClause<JoinOn<query_source::joins::Join<JoinOn<query_source::joins::Join<users::table, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>>>: Table`
`&SelectStatement<FromClause<JoinOn<query_source::joins::Join<JoinOn<query_source::joins::Join<users::table, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>>>: View`
which is required by `&SelectStatement<FromClause<JoinOn<query_source::joins::Join<JoinOn<query_source::joins::Join<users::table, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>>>: diesel::QueryDsl`
`&mut SelectStatement<FromClause<JoinOn<query_source::joins::Join<JoinOn<query_source::joins::Join<users::table, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>>>: Table`
`&mut SelectStatement<FromClause<JoinOn<query_source::joins::Join<JoinOn<query_source::joins::Join<users::table, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>>>: View`
which is required by `&mut SelectStatement<FromClause<JoinOn<query_source::joins::Join<JoinOn<query_source::joins::Join<users::table, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>, Alias<posts2>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<NullableExpression<AliasedField<posts2, posts::columns::author>>, NullableExpression<users::columns::id>>>>>>: diesel::QueryDsl`

error[E0277]: Cannot select `users::columns::id` from `Alias<users2>`
Expand Down Expand Up @@ -274,7 +274,7 @@ error[E0599]: the method `select` exists for struct `SelectStatement<FromClause<
|
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`&SelectStatement<FromClause<JoinOn<query_source::joins::Join<Alias<posts2>, Alias<posts3>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<AliasedField<posts2, posts::columns::author>, AliasedField<posts3, posts::columns::author>>>>>>: Table`
`&SelectStatement<FromClause<JoinOn<query_source::joins::Join<Alias<posts2>, Alias<posts3>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<AliasedField<posts2, posts::columns::author>, AliasedField<posts3, posts::columns::author>>>>>>: View`
which is required by `&SelectStatement<FromClause<JoinOn<query_source::joins::Join<Alias<posts2>, Alias<posts3>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<AliasedField<posts2, posts::columns::author>, AliasedField<posts3, posts::columns::author>>>>>>: diesel::QueryDsl`
`&mut SelectStatement<FromClause<JoinOn<query_source::joins::Join<Alias<posts2>, Alias<posts3>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<AliasedField<posts2, posts::columns::author>, AliasedField<posts3, posts::columns::author>>>>>>: Table`
`&mut SelectStatement<FromClause<JoinOn<query_source::joins::Join<Alias<posts2>, Alias<posts3>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<AliasedField<posts2, posts::columns::author>, AliasedField<posts3, posts::columns::author>>>>>>: View`
which is required by `&mut SelectStatement<FromClause<JoinOn<query_source::joins::Join<Alias<posts2>, Alias<posts3>, Inner>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<AliasedField<posts2, posts::columns::author>, AliasedField<posts3, posts::columns::author>>>>>>: diesel::QueryDsl`
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0271]: type mismatch resolving `<id as Column>::Table == table`
error[E0271]: type mismatch resolving `<id as Column>::Source == table`
--> tests/fail/insert_cannot_reference_columns_from_other_table.rs:22:18
|
22 | .values(&posts::id.eq(1));
| ------ ^^^^^^^^^^^^^^^ type mismatch resolving `<id as Column>::Table == table`
| ------ ^^^^^^^^^^^^^^^ type mismatch resolving `<id as Column>::Source == table`
| |
| required by a bound introduced by this call
|
Expand Down Expand Up @@ -114,11 +114,11 @@ note: required by a bound in `IncompleteInsertStatement::<T, Op>::values`
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0271]: type mismatch resolving `<id as Column>::Table == table`
error[E0271]: type mismatch resolving `<id as Column>::Source == table`
--> tests/fail/insert_cannot_reference_columns_from_other_table.rs:25:18
|
25 | .values(&(posts::id.eq(1), users::id.eq(2)));
| ------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<id as Column>::Table == table`
| ------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<id as Column>::Source == table`
| |
| required by a bound introduced by this call
|
Expand Down
Loading

0 comments on commit 92d81f2

Please sign in to comment.