Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump repository toolchain to 1.79 #4072

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions diesel/src/mysql/types/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ where
}

fn f32_to_i64(f: f32) -> deserialize::Result<i64> {
use std::i64;

if f <= i64::MAX as f32 && f >= i64::MIN as f32 {
Ok(f.trunc() as i64)
} else {
Expand All @@ -35,8 +33,6 @@ fn f32_to_i64(f: f32) -> deserialize::Result<i64> {
}

fn f64_to_i64(f: f64) -> deserialize::Result<i64> {
use std::i64;

if f <= i64::MAX as f64 && f >= i64::MIN as f64 {
Ok(f.trunc() as i64)
} else {
Expand Down
8 changes: 4 additions & 4 deletions diesel/src/pg/types/money.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ fn add_assign_money() {
#[test]
#[should_panic(expected = "overflow adding money amounts")]
fn add_money_overflow() {
let c1 = PgMoney(::std::i64::MAX);
let c1 = PgMoney(i64::MAX);
let c2 = PgMoney(1);
let _overflow = c1 + c2;
}

#[test]
#[should_panic(expected = "overflow adding money amounts")]
fn add_assign_money_overflow() {
let mut c1 = PgMoney(::std::i64::MAX);
let mut c1 = PgMoney(i64::MAX);
c1 += PgMoney(1);
}

Expand All @@ -146,14 +146,14 @@ fn sub_assign_money() {
#[test]
#[should_panic(expected = "underflow subtracting money amounts")]
fn sub_money_underflow() {
let c1 = PgMoney(::std::i64::MIN);
let c1 = PgMoney(i64::MIN);
let c2 = PgMoney(1);
let _underflow = c1 - c2;
}

#[test]
#[should_panic(expected = "underflow subtracting money amounts")]
fn sub_assign_money_underflow() {
let mut c1 = PgMoney(::std::i64::MIN);
let mut c1 = PgMoney(i64::MIN);
c1 -= PgMoney(1);
}
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<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 as SelectableExpression<SelectStatement<FromClause<From>>>>
<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>>>
= 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<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 as SelectableExpression<SelectStatement<FromClause<From>>>>
<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>>>
= 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<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 as SelectableExpression<SelectStatement<FromClause<From>>>>
<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>>>
= 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<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 as SelectableExpression<SelectStatement<FromClause<From>>>>
<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>>>
= 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
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ error[E0277]: Cannot select `f64` from `NoFromClause`
|
= note: `f64` is no valid selection for `NoFromClause`
= help: the following other types implement trait `SelectableExpression<QS>`:
<Box<T> as SelectableExpression<QS>>
<diesel::expression::ops::numeric::Add<Lhs, Rhs> as SelectableExpression<QS>>
<diesel::expression::ops::numeric::Sub<Lhs, Rhs> as SelectableExpression<QS>>
<diesel::expression::ops::numeric::Mul<Lhs, Rhs> as SelectableExpression<QS>>
<diesel::expression::ops::numeric::Div<Lhs, Rhs> as SelectableExpression<QS>>
<now as SelectableExpression<QS>>
<today as SelectableExpression<QS>>
<In<T, U> as SelectableExpression<QS>>
<&'a T as SelectableExpression<QS>>
<(T0, T1) as SelectableExpression<QS>>
<(T0, T1, T2) as SelectableExpression<QS>>
<(T0, T1, T2, T3) as SelectableExpression<QS>>
<(T0, T1, T2, T3, T4) as SelectableExpression<QS>>
<(T0, T1, T2, T3, T4, T5) as SelectableExpression<QS>>
<(T0, T1, T2, T3, T4, T5, T6) as SelectableExpression<QS>>
<(T0, T1, T2, T3, T4, T5, T6, T7) as SelectableExpression<QS>>
and $N others
= note: required for `(f64, f64)` to implement `SelectableExpression<NoFromClause>`
= note: 1 redundant requirement hidden
Expand Down Expand Up @@ -43,14 +43,14 @@ error[E0277]: the trait bound `f64: ValidGrouping<()>` is not satisfied
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidGrouping<GroupByClause>`:
<Box<T> as ValidGrouping<GB>>
<diesel::expression::ops::numeric::Add<Lhs, Rhs> as ValidGrouping<__GroupByClause>>
<diesel::expression::ops::numeric::Sub<Lhs, Rhs> as ValidGrouping<__GroupByClause>>
<diesel::expression::ops::numeric::Mul<Lhs, Rhs> as ValidGrouping<__GroupByClause>>
<diesel::expression::ops::numeric::Div<Lhs, Rhs> as ValidGrouping<__GroupByClause>>
<now as ValidGrouping<__GroupByClause>>
<today as ValidGrouping<__GroupByClause>>
<In<T, U> as ValidGrouping<__GroupByClause>>
<&'a T as ValidGrouping<GB>>
<(T0, T1) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3, T4) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3, T4, T5) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3, T4, T5, T6) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3, T4, T5, T6, T7) as ValidGrouping<__GroupByClause>>
and $N others
= note: required for `(f64, f64)` to implement `ValidGrouping<()>`
= note: 1 redundant requirement hidden
Expand Down Expand Up @@ -78,14 +78,14 @@ error[E0277]: Cannot select `f64` from `NoFromClause`
|
= note: `f64` is no valid selection for `NoFromClause`
= help: the following other types implement trait `SelectableExpression<QS>`:
<Box<T> as SelectableExpression<QS>>
<diesel::expression::ops::numeric::Add<Lhs, Rhs> as SelectableExpression<QS>>
<diesel::expression::ops::numeric::Sub<Lhs, Rhs> as SelectableExpression<QS>>
<diesel::expression::ops::numeric::Mul<Lhs, Rhs> as SelectableExpression<QS>>
<diesel::expression::ops::numeric::Div<Lhs, Rhs> as SelectableExpression<QS>>
<now as SelectableExpression<QS>>
<today as SelectableExpression<QS>>
<In<T, U> as SelectableExpression<QS>>
<&'a T as SelectableExpression<QS>>
<(T0, T1) as SelectableExpression<QS>>
<(T0, T1, T2) as SelectableExpression<QS>>
<(T0, T1, T2, T3) as SelectableExpression<QS>>
<(T0, T1, T2, T3, T4) as SelectableExpression<QS>>
<(T0, T1, T2, T3, T4, T5) as SelectableExpression<QS>>
<(T0, T1, T2, T3, T4, T5, T6) as SelectableExpression<QS>>
<(T0, T1, T2, T3, T4, T5, T6, T7) as SelectableExpression<QS>>
and $N others
= note: required for `(f64, f64)` to implement `SelectableExpression<NoFromClause>`
= note: 1 redundant requirement hidden
Expand Down Expand Up @@ -113,14 +113,14 @@ error[E0277]: the trait bound `f64: ValidGrouping<()>` is not satisfied
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidGrouping<GroupByClause>`:
<Box<T> as ValidGrouping<GB>>
<diesel::expression::ops::numeric::Add<Lhs, Rhs> as ValidGrouping<__GroupByClause>>
<diesel::expression::ops::numeric::Sub<Lhs, Rhs> as ValidGrouping<__GroupByClause>>
<diesel::expression::ops::numeric::Mul<Lhs, Rhs> as ValidGrouping<__GroupByClause>>
<diesel::expression::ops::numeric::Div<Lhs, Rhs> as ValidGrouping<__GroupByClause>>
<now as ValidGrouping<__GroupByClause>>
<today as ValidGrouping<__GroupByClause>>
<In<T, U> as ValidGrouping<__GroupByClause>>
<&'a T as ValidGrouping<GB>>
<(T0, T1) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3, T4) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3, T4, T5) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3, T4, T5, T6) as ValidGrouping<__GroupByClause>>
<(T0, T1, T2, T3, T4, T5, T6, T7) as ValidGrouping<__GroupByClause>>
and $N others
= note: required for `(f64, f64)` to implement `ValidGrouping<()>`
= note: 1 redundant requirement hidden
Expand All @@ -147,14 +147,14 @@ error[E0277]: the trait bound `f64: QueryId` is not satisfied
| required by a bound introduced by this call
|
= help: the following other types implement trait `QueryId`:
Box<T>
DeleteStatement<T, U, Ret>
FromClause<F>
diesel::query_builder::insert_statement::insert_with_default_for_sqlite::SqliteBatchInsertWrapper<V, T, QId, STATIC_QUERY_ID>
diesel::query_builder::select_clause::DefaultSelectClause<QS>
BoxedSqlQuery<'_, DB, Query>
diesel::query_builder::where_clause::BoxedWhereClause<'a, DB>
query_source::joins::Join<Left, Right, Kind>
&'a T
()
(T0, T1)
(T0, T1, T2)
(T0, T1, T2, T3)
(T0, T1, T2, T3, T4)
(T0, T1, T2, T3, T4, T5)
(T0, T1, T2, T3, T4, T5, T6)
and $N others
= note: required for `(f64, f64)` to implement `QueryId`
= note: 3 redundant requirements hidden
Expand Down Expand Up @@ -182,14 +182,14 @@ error[E0277]: `f64` is no valid SQL fragment for the `Pg` backend
= note: this usually means that the `Pg` database system does not support
this SQL syntax
= help: the following other types implement trait `QueryFragment<DB, SP>`:
<Box<T> as QueryFragment<DB>>
<DeleteStatement<T, U, Ret> as QueryFragment<DB>>
<FromClause<F> as QueryFragment<DB>>
<diesel::query_builder::insert_statement::insert_with_default_for_sqlite::SqliteBatchInsertWrapper<Vec<diesel::query_builder::insert_statement::ValuesClause<V, Tab>>, Tab, QId, STATIC_QUERY_ID> as QueryFragment<Sqlite>>
<BoxedLimitOffsetClause<'a, Mysql> as QueryFragment<Mysql>>
<BoxedLimitOffsetClause<'a, Pg> as QueryFragment<Pg>>
<BoxedLimitOffsetClause<'a, Sqlite> as QueryFragment<Sqlite>>
<diesel::query_builder::select_clause::DefaultSelectClause<QS> as QueryFragment<DB>>
<&'a T as QueryFragment<DB>>
<() as QueryFragment<DB>>
<(T0, T1) as QueryFragment<__DB>>
<(T0, T1, T2) as QueryFragment<__DB>>
<(T0, T1, T2, T3) as QueryFragment<__DB>>
<(T0, T1, T2, T3, T4) as QueryFragment<__DB>>
<(T0, T1, T2, T3, T4, T5) as QueryFragment<__DB>>
<(T0, T1, T2, T3, T4, T5, T6) as QueryFragment<__DB>>
and $N others
= note: required for `(f64, f64)` to implement `QueryFragment<Pg>`
= note: 4 redundant requirements hidden
Expand All @@ -215,14 +215,14 @@ error[E0277]: the trait bound `f64: diesel::Expression` is not satisfied
| required by a bound introduced by this call
|
= help: the following other types implement trait `diesel::Expression`:
Box<T>
diesel::expression::ops::numeric::Add<Lhs, Rhs>
diesel::expression::ops::numeric::Sub<Lhs, Rhs>
diesel::expression::ops::numeric::Mul<Lhs, Rhs>
diesel::expression::ops::numeric::Div<Lhs, Rhs>
now
today
In<T, U>
&'a T
(T0, T1)
(T0, T1, T2)
(T0, T1, T2, T3)
(T0, T1, T2, T3, T4)
(T0, T1, T2, T3, T4, T5)
(T0, T1, T2, T3, T4, T5, T6)
(T0, T1, T2, T3, T4, T5, T6, T7)
and $N others
= note: required for `f64` to implement `AsExpression<diesel::sql_types::Integer>`
= note: required for `(f64, f64)` to implement `AsExpressionList<diesel::sql_types::Integer>`
Expand Down
Loading
Loading