Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upError message is unclear when compiling #323
Comments
This comment has been minimized.
|
Unsure how much control we have here, but I'd like the error message to either be:
or
Those are only marginally more clear, but at least they mention the fact that the column is of type date. Ideally we could give an even better message, explicitly calling out the mistake, but I don't believe we have the ability to do that at the moment. |
This comment has been minimized.
|
This is another instance of rust-lang/rust#28894 biting us. It's picking up on the |
sgrif
referenced this issue
May 11, 2016
Open
Rust tries to be too helpful with impl suggestions, sometimes being unhelpful #28894
This comment has been minimized.
arielb1
commented
May 11, 2016
|
This should be better in rustc 1.10. |
am0d commentedMay 11, 2016
I had a schema in Postgres, with a column of type DATE.
I created a struct to match this in Rust, and tried to map that DATE column to a chrono::NaiveDateTime type, like this:
However, this failed to compile (only when the insertable_into or changeset_for attributes were there), but the error message was very unhelpful, and didn't point to the root cause at all:
(and the error span was pointing at the
#[insertable_into(...)]attribute.