forked from diesel-rs/diesel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
135 additions
and
151 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
12 changes: 6 additions & 6 deletions
12
diesel_compile_tests/tests/fail/cannot_use_expression_methods_on_tuples.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,27 +1,27 @@ | ||
error[E0599]: the method `is_not_null` exists for tuple `(columns::id, columns::name)`, but its trait bounds were not satisfied | ||
--> $DIR/cannot_use_expression_methods_on_tuples.rs:18:29 | ||
--> tests/fail/cannot_use_expression_methods_on_tuples.rs:18:29 | ||
| | ||
18 | users.filter((id, name).is_not_null()); | ||
| ^^^^^^^^^^^ method cannot be called on `(columns::id, columns::name)` due to unsatisfied trait bounds | ||
| | ||
= note: the following trait bounds were not satisfied: | ||
`(diesel::sql_types::Integer, diesel::sql_types::Text): diesel::sql_types::SingleValue` | ||
`(diesel::sql_types::Integer, diesel::sql_types::Text): SingleValue` | ||
which is required by `(columns::id, columns::name): diesel::ExpressionMethods` | ||
`(diesel::sql_types::Integer, diesel::sql_types::Text): diesel::sql_types::SingleValue` | ||
`(diesel::sql_types::Integer, diesel::sql_types::Text): SingleValue` | ||
which is required by `&(columns::id, columns::name): diesel::ExpressionMethods` | ||
`&mut (columns::id, columns::name): diesel::Expression` | ||
which is required by `&mut (columns::id, columns::name): diesel::ExpressionMethods` | ||
|
||
error[E0599]: the method `eq_any` exists for tuple `(columns::id, columns::name)`, but its trait bounds were not satisfied | ||
--> $DIR/cannot_use_expression_methods_on_tuples.rs:19:29 | ||
--> tests/fail/cannot_use_expression_methods_on_tuples.rs:19:29 | ||
| | ||
19 | users.filter((id, name).eq_any(users.find(1))); | ||
| ^^^^^^ method cannot be called on `(columns::id, columns::name)` due to unsatisfied trait bounds | ||
| | ||
= note: the following trait bounds were not satisfied: | ||
`(diesel::sql_types::Integer, diesel::sql_types::Text): diesel::sql_types::SingleValue` | ||
`(diesel::sql_types::Integer, diesel::sql_types::Text): SingleValue` | ||
which is required by `(columns::id, columns::name): diesel::ExpressionMethods` | ||
`(diesel::sql_types::Integer, diesel::sql_types::Text): diesel::sql_types::SingleValue` | ||
`(diesel::sql_types::Integer, diesel::sql_types::Text): SingleValue` | ||
which is required by `&(columns::id, columns::name): diesel::ExpressionMethods` | ||
`&mut (columns::id, columns::name): diesel::Expression` | ||
which is required by `&mut (columns::id, columns::name): diesel::ExpressionMethods` |
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
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
4 changes: 2 additions & 2 deletions
4
diesel_compile_tests/tests/fail/derive/as_expression_without_sql_type.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,7 +1,7 @@ | ||
error: At least one `sql_type` is needed for deriving `AsExpression` on a structure. | ||
--> $DIR/as_expression_without_sql_type.rs:4:10 | ||
--> tests/fail/derive/as_expression_without_sql_type.rs:4:10 | ||
| | ||
4 | #[derive(AsExpression)] | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `AsExpression` (in Nightly builds, run with -Z macro-backtrace for more info) |
4 changes: 2 additions & 2 deletions
4
diesel_compile_tests/tests/fail/derive/associations_without_belongs_to.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,7 +1,7 @@ | ||
error: At least one `belongs_to` is needed for deriving `Associations` on a structure. | ||
--> $DIR/associations_without_belongs_to.rs:4:10 | ||
--> tests/fail/derive/associations_without_belongs_to.rs:4:10 | ||
| | ||
4 | #[derive(Associations)] | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `Associations` (in Nightly builds, run with -Z macro-backtrace for more info) |
8 changes: 4 additions & 4 deletions
8
diesel_compile_tests/tests/fail/derive/bad_derive_input.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,15 @@ | ||
error: This derive can only be used on non-unit structs | ||
--> $DIR/bad_derive_input.rs:12:10 | ||
--> tests/fail/derive/bad_derive_input.rs:12:10 | ||
| | ||
12 | #[derive(AsChangeset)] | ||
| ^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `AsChangeset` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: This derive can only be used on non-unit structs | ||
--> $DIR/bad_derive_input.rs:16:10 | ||
--> tests/fail/derive/bad_derive_input.rs:16:10 | ||
| | ||
16 | #[derive(AsChangeset)] | ||
| ^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `AsChangeset` (in Nightly builds, run with -Z macro-backtrace for more info) |
14 changes: 7 additions & 7 deletions
14
diesel_compile_tests/tests/fail/derive/bad_foreign_derive.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,29 +1,29 @@ | ||
error: expected `,` | ||
--> $DIR/bad_foreign_derive.rs:7:25 | ||
--> tests/fail/derive/bad_foreign_derive.rs:7:25 | ||
| | ||
7 | #[diesel(foreign_derive = true)] | ||
| ^ | ||
|
||
error: foreign_derive requires at least one field | ||
--> $DIR/bad_foreign_derive.rs:10:10 | ||
--> tests/fail/derive/bad_foreign_derive.rs:10:10 | ||
| | ||
10 | #[derive(ValidGrouping)] | ||
| ^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `ValidGrouping` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: foreign_derive requires at least one field | ||
--> $DIR/bad_foreign_derive.rs:14:10 | ||
--> tests/fail/derive/bad_foreign_derive.rs:14:10 | ||
| | ||
14 | #[derive(AsExpression)] | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `AsExpression` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: foreign_derive requires at least one field | ||
--> $DIR/bad_foreign_derive.rs:19:10 | ||
--> tests/fail/derive/bad_foreign_derive.rs:19:10 | ||
| | ||
19 | #[derive(FromSqlRow)] | ||
| ^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `FromSqlRow` (in Nightly builds, run with -Z macro-backtrace for more info) |
4 changes: 2 additions & 2 deletions
4
diesel_compile_tests/tests/fail/derive/belongs_to_incorrect_lifetime_syntax.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,7 +1,7 @@ | ||
error[E0261]: use of undeclared lifetime name `'a` | ||
--> $DIR/belongs_to_incorrect_lifetime_syntax.rs:25:25 | ||
--> tests/fail/derive/belongs_to_incorrect_lifetime_syntax.rs:25:25 | ||
| | ||
24 | #[derive(Associations)] | ||
| - help: consider introducing lifetime `'a` here: `'a,` | ||
| - lifetime `'a` is missing in item created through this procedural macro | ||
25 | #[diesel(belongs_to(Foo<'a>))] | ||
| ^^ undeclared lifetime |
28 changes: 14 additions & 14 deletions
28
diesel_compile_tests/tests/fail/derive/empty_struct.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,55 +1,55 @@ | ||
error: This derive can only be used on non-unit structs | ||
--> $DIR/empty_struct.rs:10:10 | ||
--> tests/fail/derive/empty_struct.rs:10:10 | ||
| | ||
10 | #[derive(AsChangeset)] | ||
| ^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `AsChangeset` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: This derive can only be used on non-unit structs | ||
--> $DIR/empty_struct.rs:14:10 | ||
--> tests/fail/derive/empty_struct.rs:14:10 | ||
| | ||
14 | #[derive(Identifiable)] | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `Identifiable` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: This derive can only be used on non-unit structs | ||
--> $DIR/empty_struct.rs:18:10 | ||
--> tests/fail/derive/empty_struct.rs:18:10 | ||
| | ||
18 | #[derive(Insertable)] | ||
| ^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `Insertable` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: This derive can only be used on non-unit structs | ||
--> $DIR/empty_struct.rs:22:10 | ||
--> tests/fail/derive/empty_struct.rs:22:10 | ||
| | ||
22 | #[derive(Queryable)] | ||
| ^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `Queryable` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: This derive can only be used on non-unit structs | ||
--> $DIR/empty_struct.rs:25:10 | ||
--> tests/fail/derive/empty_struct.rs:25:10 | ||
| | ||
25 | #[derive(QueryableByName)] | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `QueryableByName` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: This derive can only be used on non-unit structs | ||
--> $DIR/empty_struct.rs:28:10 | ||
--> tests/fail/derive/empty_struct.rs:28:10 | ||
| | ||
28 | #[derive(Selectable)] | ||
| ^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `Selectable` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: This derive can only be used on non-unit structs | ||
--> $DIR/empty_struct.rs:31:10 | ||
--> tests/fail/derive/empty_struct.rs:31:10 | ||
| | ||
31 | #[derive(Associations)] | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `Associations` (in Nightly builds, run with -Z macro-backtrace for more info) |
16 changes: 8 additions & 8 deletions
16
diesel_compile_tests/tests/fail/derive/identifiable_missing_pk_field.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,39 +1,39 @@ | ||
error: No field with column name id | ||
--> $DIR/identifiable_missing_pk_field.rs:10:10 | ||
--> tests/fail/derive/identifiable_missing_pk_field.rs:10:10 | ||
| | ||
10 | #[derive(Identifiable)] | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `Identifiable` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: No field with column name id | ||
--> $DIR/identifiable_missing_pk_field.rs:14:10 | ||
--> tests/fail/derive/identifiable_missing_pk_field.rs:14:10 | ||
| | ||
14 | #[derive(Identifiable)] | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `Identifiable` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: No field with column name bar | ||
--> $DIR/identifiable_missing_pk_field.rs:22:22 | ||
--> tests/fail/derive/identifiable_missing_pk_field.rs:22:22 | ||
| | ||
22 | #[diesel(primary_key(bar))] | ||
| ^^^ | ||
|
||
error: No field with column name baz | ||
--> $DIR/identifiable_missing_pk_field.rs:27:22 | ||
--> tests/fail/derive/identifiable_missing_pk_field.rs:27:22 | ||
| | ||
27 | #[diesel(primary_key(baz))] | ||
| ^^^ | ||
|
||
error: No field with column name bar | ||
--> $DIR/identifiable_missing_pk_field.rs:35:27 | ||
--> tests/fail/derive/identifiable_missing_pk_field.rs:35:27 | ||
| | ||
35 | #[diesel(primary_key(foo, bar))] | ||
| ^^^ | ||
|
||
error: No field with column name bar | ||
--> $DIR/identifiable_missing_pk_field.rs:42:27 | ||
--> tests/fail/derive/identifiable_missing_pk_field.rs:42:27 | ||
| | ||
42 | #[diesel(primary_key(foo, bar))] | ||
| ^^^ |
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,7 +1,7 @@ | ||
error: All fields of tuple structs must be annotated with `#[diesel(column_name)]` | ||
--> $DIR/tuple_struct.rs:12:10 | ||
--> tests/fail/derive/tuple_struct.rs:12:10 | ||
| | ||
12 | #[derive(AsChangeset)] | ||
| ^^^^^^^^^^^ | ||
| | ||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
= note: this error originates in the derive macro `AsChangeset` (in Nightly builds, run with -Z macro-backtrace for more info) |
Oops, something went wrong.