You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In diesel 0.10, this now results in compiler errors:
error[E0277]: the trait bound `ruma_identifiers::UserId: diesel::Expression` is not satisfied
--> src/models/profile.rs:18:1
|
18 | #[derive(AsChangeset, Debug, Clone, Identifiable, Insertable, Queryable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `diesel::Expression` is not implemented for `ruma_identifiers::UserId`
|
= note: required because of the requirements on the impl of `diesel::Expression` for `&'insert ruma_identifiers::UserId`
= note: required because of the requirements on the impl of `diesel::expression::AsExpression<diesel::types::Nullable<diesel::types::Text>>` for `&'insert ruma_identifiers::UserId`
= note: this error originates in a macro outside of the current crate
error[E0277]: the trait bound `ruma_identifiers::UserId: diesel::Expression` is not satisfied
--> src/models/profile.rs:18:1
|
18 | #[derive(AsChangeset, Debug, Clone, Identifiable, Insertable, Queryable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `diesel::Expression` is not implemented for `ruma_identifiers::UserId`
|
= note: required because of the requirements on the impl of `diesel::Expression` for `&'insert ruma_identifiers::UserId`
= note: required because of the requirements on the impl of `diesel::expression::AsExpression<diesel::types::Nullable<diesel::types::Text>>` for `&'insert ruma_identifiers::UserId`
= note: this error originates in a macro outside of the current crate
error[E0277]: the trait bound `ruma_identifiers::UserId: diesel::Expression` is not satisfied
--> src/models/profile.rs:18:1
|
18 | #[derive(AsChangeset, Debug, Clone, Identifiable, Insertable, Queryable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `diesel::Expression` is not implemented for `ruma_identifiers::UserId`
|
= note: required because of the requirements on the impl of `diesel::Expression` for `&'insert ruma_identifiers::UserId`
= note: required because of the requirements on the impl of `diesel::expression::AsExpression<diesel::types::Nullable<diesel::types::Text>>` for `&'insert ruma_identifiers::UserId`
= note: this error originates in a macro outside of the current crate
error[E0277]: the trait bound `&'insert models::profile::Profile: diesel::Insertable<schema::profiles::table, DB>` is not satisfied
--> src/models/profile.rs:18:1
|
18 | #[derive(AsChangeset, Debug, Clone, Identifiable, Insertable, Queryable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `diesel::Insertable<schema::profiles::table, DB>` is not implemented for `&'insert models::profile::Profile`
|
= help: the following implementations were found:
<&'insert models::profile::Profile as diesel::Insertable<schema::profiles::table, DB>>
= note: this error originates in a macro outside of the current crate
error[E0277]: the trait bound `ruma_identifiers::UserId: diesel::Expression` is not satisfied
--> src/models/profile.rs:18:1
|
18 | #[derive(AsChangeset, Debug, Clone, Identifiable, Insertable, Queryable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `diesel::Expression` is not implemented for `ruma_identifiers::UserId`
|
= note: required because of the requirements on the impl of `diesel::Expression` for `&'insert ruma_identifiers::UserId`
= note: required because of the requirements on the impl of `diesel::expression::AsExpression<diesel::types::Nullable<diesel::types::Text>>` for `&'insert ruma_identifiers::UserId`
= note: this error originates in a macro outside of the current crate
error[E0277]: the trait bound `DB: diesel::backend::SupportsDefaultKeyword` is not satisfied
--> src/models/profile.rs:18:1
|
18 | #[derive(AsChangeset, Debug, Clone, Identifiable, Insertable, Queryable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `diesel::backend::SupportsDefaultKeyword` is not implemented for `DB`
|
= help: consider adding a `where DB: diesel::backend::SupportsDefaultKeyword` bound
= note: required because of the requirements on the impl of `diesel::insertable::InsertValues<DB>` for `(diesel::insertable::ColumnInsertValue<schema::profiles::columns::id, &'insert ruma_identifiers::UserId>, diesel::insertable::ColumnInsertValue<schema::profiles::columns::avatar_url, diesel::expression::bound::Bound<diesel::types::Nullable<diesel::types::Text>, &std::option::Option<std::string::String>>>, diesel::insertable::ColumnInsertValue<schema::profiles::columns::displayname, diesel::expression::bound::Bound<diesel::types::Nullable<diesel::types::Text>, &std::option::Option<std::string::String>>>)`
= note: required by `diesel::insertable::InsertValues`
= note: this error originates in a macro outside of the current crate
error[E0277]: the trait bound `ruma_identifiers::UserId: diesel::query_builder::QueryFragment<DB>` is not satisfied
--> src/models/profile.rs:18:1
|
18 | #[derive(AsChangeset, Debug, Clone, Identifiable, Insertable, Queryable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `diesel::query_builder::QueryFragment<DB>` is not implemented for `ruma_identifiers::UserId`
|
= note: required because of the requirements on the impl of `diesel::query_builder::QueryFragment<DB>` for `&'insert ruma_identifiers::UserId`
= note: required because of the requirements on the impl of `diesel::insertable::InsertValues<DB>` for `(diesel::insertable::ColumnInsertValue<schema::profiles::columns::id, &'insert ruma_identifiers::UserId>, diesel::insertable::ColumnInsertValue<schema::profiles::columns::avatar_url, diesel::expression::bound::Bound<diesel::types::Nullable<diesel::types::Text>, &std::option::Option<std::string::String>>>, diesel::insertable::ColumnInsertValue<schema::profiles::columns::displayname, diesel::expression::bound::Bound<diesel::types::Nullable<diesel::types::Text>, &std::option::Option<std::string::String>>>)`
= note: required by `diesel::insertable::InsertValues`
= note: this error originates in a macro outside of the current crate
I played around with it for a while but wasn't able to figure out what changed and how to account for those changes. Any suggestions?
The text was updated successfully, but these errors were encountered:
ruma-identifiers has some code to make a few custom types
Insertable
andQueryable
. This previously worked in diesel 0.9: https://github.com/ruma/ruma-identifiers/blob/29f76ca95d295bca36ec53cd8da72217c5aa0f75/src/lib.rs#L689This is being used in structs like this:
In diesel 0.10, this now results in compiler errors:
I played around with it for a while but wasn't able to figure out what changed and how to account for those changes. Any suggestions?
The text was updated successfully, but these errors were encountered: