-
-
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 #4343 from weiznich/prepare/2.2.5
Prepare a diesel 2.2.5 release
- Loading branch information
Showing
83 changed files
with
1,532 additions
and
1,679 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
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
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,3 +1,4 @@ | ||
#![allow(missing_docs)] | ||
extern crate dotenvy; | ||
|
||
use crate::prelude::*; | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
extern crate diesel; | ||
|
||
use diesel::prelude::*; | ||
|
||
table! { | ||
users { | ||
id -> Integer, | ||
name -> VarChar, | ||
} | ||
} | ||
|
||
fn main() { | ||
let conn = &mut PgConnection::establish("…").unwrap(); | ||
users::table | ||
.filter(users::id.eq(1).and(users::id).or(users::id)) | ||
.select(users::id) | ||
.execute(conn) | ||
.unwrap(); | ||
} |
37 changes: 37 additions & 0 deletions
37
diesel_compile_tests/tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
error[E0277]: `diesel::sql_types::Integer` is neither `diesel::sql_types::Bool` nor `diesel::sql_types::Nullable<Bool>` | ||
--> tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs:15:33 | ||
| | ||
15 | .filter(users::id.eq(1).and(users::id).or(users::id)) | ||
| ^^^ the trait `BoolOrNullableBool` is not implemented for `diesel::sql_types::Integer` | ||
| | ||
= note: try to provide an expression that produces one of the expected sql types | ||
= help: the following other types implement trait `BoolOrNullableBool`: | ||
Bool | ||
Nullable<Bool> | ||
note: required by a bound in `diesel::BoolExpressionMethods::and` | ||
--> $DIESEL/src/expression_methods/bool_expression_methods.rs | ||
| | ||
| fn and<T, ST>(self, other: T) -> dsl::And<Self, T, ST> | ||
| --- required by a bound in this associated function | ||
... | ||
| ST: SqlType + TypedExpressionType + BoolOrNullableBool, | ||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `BoolExpressionMethods::and` | ||
|
||
error[E0277]: `diesel::sql_types::Integer` is neither `diesel::sql_types::Bool` nor `diesel::sql_types::Nullable<Bool>` | ||
--> tests/fail/and_or_functions_must_take_boolean_expr_as_attributes.rs:15:48 | ||
| | ||
15 | .filter(users::id.eq(1).and(users::id).or(users::id)) | ||
| ^^ the trait `BoolOrNullableBool` is not implemented for `diesel::sql_types::Integer` | ||
| | ||
= note: try to provide an expression that produces one of the expected sql types | ||
= help: the following other types implement trait `BoolOrNullableBool`: | ||
Bool | ||
Nullable<Bool> | ||
note: required by a bound in `diesel::BoolExpressionMethods::or` | ||
--> $DIESEL/src/expression_methods/bool_expression_methods.rs | ||
| | ||
| fn or<T, ST>(self, other: T) -> dsl::Or<Self, T, ST> | ||
| -- required by a bound in this associated function | ||
... | ||
| ST: SqlType + TypedExpressionType + BoolOrNullableBool, | ||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `BoolExpressionMethods::or` |
Oops, something went wrong.