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

Diesel does not build #1711

Closed
1 task done
pie-flavor opened this issue May 21, 2018 · 3 comments
Closed
1 task done

Diesel does not build #1711

pie-flavor opened this issue May 21, 2018 · 3 comments

Comments

@pie-flavor
Copy link

pie-flavor commented May 21, 2018

Setup

cargo build

Versions

  • Rust: rustc 1.28.0-nightly (a1d4a9503 2018-05-20)
  • Diesel: 1.2.2
  • Database: MySQL
  • Operating System Windows 10 1803

Feature Flags

  • diesel: ["mysql", "r2d2", "chrono"]

Problem Description

Diesel does not compile.

What are you trying to accomplish?

Compile a program that depends on Diesel.

What is the expected output?

   Compiling diesel v1.2.2

What is the actual output?

   Compiling diesel v1.2.2
error[E0053]: method `metadata` has an incompatible type for trait
   --> C:\Users\Adam\.cargo\registry\src\github.com-1ecc6299db9ec823\diesel-1.2.2\src\mysql\types\mod.rs:88:25
    |
88  |     fn metadata(lookup: &()) -> MysqlType {
    |                         ^^^ expected associated type, found ()
    |
   ::: C:\Users\Adam\.cargo\registry\src\github.com-1ecc6299db9ec823\diesel-1.2.2\src\sql_types\mod.rs:402:25
    |
402 |     fn metadata(lookup: &Self::MetadataLookup) -> Self::TypeMetadata;
    |                         --------------------- type in trait
    |
    = note: expected type `fn(&<mysql::backend::Mysql as sql_types::TypeMetadata>::MetadataLookup) -> <mysql::backend::Mysql as sql_types::TypeMetadata>::TypeMetadata`
               found type `fn(&()) -> mysql::backend::MysqlType`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0053`.
error: Could not compile `diesel`.

Are you seeing any additional errors?

Nope.

Steps to reproduce

[dependencies.diesel]
version = "1.2.2"
default-features = false
features = ["mysql", "r2d2", "chrono"]

Checklist

  • I have already looked over the issue tracker for similar issues.
@weiznich
Copy link
Member

Duplicate of #1700

@charleschege
Copy link

I can't build any project that depends on diesel due to this bug. Any help?

@weiznich
Copy link
Member

weiznich commented May 21, 2018

@iamcharleschege Look at the original issue for a workaround.(just use a older nightly from before 15/5/18) Otherwise there is nothing we could do beside waiting for rustc to fix that issue.
Please remember: Nightly is there for especially this case. To move forward without fear to break someone's code, because there is time before the change reaches the stable release.
This means you should test once a while against nightly but you shouldn't depend on nightly for code that needs to compile at any time. For this usecase there is the stable release.

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

3 participants