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 upTrying to pass an owned value to `insert` gives an extremely unhelpful error message #249
Comments
added a commit
that referenced
this issue
Mar 31, 2016
sgrif
referenced this issue
Mar 31, 2016
Merged
Improve the error message when `insert` is called with an owned value #250
added a commit
that referenced
this issue
Mar 31, 2016
sgrif
closed this
in
#250
Mar 31, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sgrif commentedMar 31, 2016
Example case is in #227. When a struct is annotated with
#[insertable_into], we deriveInsertablefor&T. When you attempt to pass an ownedTtoinsert, you'll get a compilation error when attempting to callget_resultor similar methods on it. The error message will be along the lines of:This is a common enough mistake that we should go out of our way to ensure we have a better error message here. We either need the message to explicitly mention that it expected
&Tand gotT, or just make this case compile.