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

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

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

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

mfpiccolo opened this issue Dec 16, 2015 · 0 comments

Comments

@mfpiccolo
Copy link
Contributor

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 as completed in a7688c5 Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant