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 cannot infer schema when table has `builder` column #934

Closed
alanhdu opened this Issue Jun 5, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@alanhdu

alanhdu commented Jun 5, 2017

When I have a table with a column named builder:

CREATE TABLE diesel_test (
    id INTEGER PRIMARY KEY,
    builder INTEGER
);

then compiling anything with infer_schema! fails with:

$ cargo check
   Compiling scratch v0.1.0 (file:///vagrant/scratch)
error[E0530]: let bindings cannot shadow unit structs
  |
  = note: this error originates in a macro outside of the current crate

error[E0530]: let bindings cannot shadow unit structs
  |
  = note: this error originates in a macro outside of the current crate

error[E0530]: let bindings cannot shadow unit structs
  |
  = note: this error originates in a macro outside of the current crate

error[E0530]: let bindings cannot shadow unit structs
  |
  = note: this error originates in a macro outside of the current crate

error: aborting due to previous error(s)

error: Could not compile `scratch`.

This is with diesel 0.13 and rust 1.17.

@sgrif

This comment has been minimized.

Member

sgrif commented Jun 5, 2017

Looking at the generated code from cargo rustc -- -Zunstable-options --pretty=expanded, I can safely say this is not a bug in Diesel. You should open a bug on the Rust language with this reproduction script: https://is.gd/hhcC15

@Eijebong

This comment has been minimized.

Member

Eijebong commented Mar 13, 2018

rust-lang/rust#48934 This is now fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment