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

#[has_many(posts)] multiple applicable items in scope #62

Closed
mfpiccolo opened this Issue Dec 16, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@mfpiccolo
Collaborator

mfpiccolo commented Dec 16, 2015

Using #[has_many(posts)] on a User struct throws this error:

src/models/user.rs:12:19: 12:19 error: multiple applicable items in scope [E0034]
src/models/user.rs:12 #[has_many(posts)]
                                        ^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
src/models/user.rs:12:19: 12:19 help: run `rustc --explain E0034` to see a detailed explanation
src/models/user.rs:12:19: 12:19 note: candidate #1 is defined in an impl of the trait `diesel::expression::Expression` for the type `diesel::expression::predicates::Eq<_, _>`
src/models/user.rs:12 #[has_many(posts)]
                                        ^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
src/models/user.rs:12:19: 12:19 note: candidate #2 is defined in an impl of the trait `diesel::query_builder::update_statement::changeset::Changeset` for the type `diesel::expression::predicates::Eq<_, _>`
src/models/user.rs:12 #[has_many(posts)]
                                        ^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
src/models/user.rs:12:19: 12:19 note: candidate #3 is defined in an impl of the trait `diesel::expression::Expression` for the type `&_`
src/models/user.rs:12 #[has_many(posts)]
                                        ^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
src/models/user.rs:12:19: 12:19 note: candidate #4 is defined in an impl of the trait `diesel::query_builder::QueryFragment` for the type `_`
src/models/user.rs:12 #[has_many(posts)]
                                        ^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
error: aborting due to previous error

@sgrif sgrif closed this in a7688c5 Dec 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment