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

[Help] Cannot build on nightly? #21

Closed
YetAnotherMinion opened this issue Nov 11, 2018 · 2 comments
Closed

[Help] Cannot build on nightly? #21

YetAnotherMinion opened this issue Nov 11, 2018 · 2 comments

Comments

@YetAnotherMinion
Copy link

I was attempting to integrate this library with diesel while using the nightly compiler.

Do you know off the top of your head problem changes in nightly that would cause build failures? It is fine if you don't know. I can debug it myself but I wanted to check for any possible leads from the people who know the most about this library first. Please tell me if you don't know so I can begin working on the problem.

All of the errors look like the blanket trait implementations not being found by the compiler. If you know the name of the problem or the rust issue the this comes from that would be a huge help.

error[E0277]: the trait bound `usize: types::MultiPolygon<'a>` is not satisfied
   --> src/postgis.rs:138:13
    |
138 | /             fn to_sql(&self, _: &Type, out: &mut Vec<u8>) -> Result<IsNull, Box<Error + Sync + Send>> {                                                             
139 | |                 self.write_ewkb(out)?;
140 | |                 Ok(IsNull::No)
141 | |             }
    | |_____________^ the trait `types::MultiPolygon<'a>` is not implemented for `usize`                                                                                    
...
150 |   impl_sql_for_ewkb_type!(multipoly EwkbMultiPolygon contains Polygon);
    |   --------------------------------------------------------------------- in this macro invocation                                                                      

error[E0277]: the trait bound `usize: types::MultiPolygon<'a>` is not satisfied
   --> src/postgis.rs:150:1
    |
150 | impl_sql_for_ewkb_type!(multipoly EwkbMultiPolygon contains Polygon);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | the trait `types::MultiPolygon<'a>` is not implemented for `usize`
    | in this macro invocation
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)                           

error: aborting due to 128 previous errors

For more information about this error, try `rustc --explain E0277`.
error: Could not compile `postgis`
@kestred
Copy link
Contributor

kestred commented Nov 11, 2018

This is a regression in rustc on both beta and nightly (here is the link to the rust issue).

@frewsxcv
Copy link

frewsxcv commented Dec 3, 2018

This should be fixed now, as per rust-lang/rust#54467 being closed

@pka pka closed this as completed Apr 30, 2019
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

4 participants