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

Error about "different enum" could be more helpful #26236

Closed
viraptor opened this issue Jun 12, 2015 · 2 comments
Closed

Error about "different enum" could be more helpful #26236

viraptor opened this issue Jun 12, 2015 · 2 comments

Comments

@viraptor
Copy link

I ran into an error saying:

src/database.rs:141:28: 141:52 note: expansion site
src/db_pool.rs:20:55: 20:68 error: mismatched types:
 expected `postgres::SslMode`,
    found `postgres::SslMode`
(expected enum `postgres::SslMode`,
    found a different enum `postgres::SslMode`) [E0308]
src/db_pool.rs:20     let manager = PostgresConnectionManager::new(url, SslMode::None).unwrap();

Which is not very useful for debugging. I get where the problem could come from - different library versions used in different dependencies... but this doesn't really help me see where the different versions come from.

@sfackler
Copy link
Member

This looks like somewhat of a dup of #22750, but we definitely do need better handling of this kind of situation. The current message is pretty awful.

@steveklabnik
Copy link
Member

Yes, this is a dup of #22750, and agreed that it's particularly terrible :(

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