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

`AsChangeset` requires prelude #536

Closed
jethrogb opened this Issue Dec 8, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@jethrogb
Contributor

jethrogb commented Dec 8, 2016

When deriving AsChangeset on a simple table, e.g.

use schema::posts;

#[derive(AsChangeset)]
pub struct Posts {
    pub id: i64,
}

I'm getting

error: no method named `eq` found for type `schema::posts::columns::id` in the current scope
 --> .../diesel_demo/src/lib.rs:4:1
  |
4 | include!(concat!(env!("OUT_DIR"), "/lib.rs"));
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: the method `eq` exists but the following trait bounds were not satisfied: `schema::posts::columns::id : std::iter::Iterator`
  = help: items from traits can only be used if the trait is in scope; the following trait is implemented but not in scope, perhaps add a `use` for it:
  = help: candidate #1: `use diesel::ExpressionMethods`
  = note: this error originates in a macro outside of the current crate

@sgrif sgrif closed this in 7b9355e Dec 10, 2016

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