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

`Insertable!` fails to compile with slices + array columns #308

Closed
sgrif opened this Issue Apr 26, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@sgrif
Member

sgrif commented Apr 26, 2016

Unsure if it's true for all slices, or just this type specifically. To reproduce:

struct NewPost<'a> { tags: &'a [&'a str], }
Insertable! { (posts) struct NewPost<'a> { tags: &'a [&'a str], } }
@CryZe

This comment has been minimized.

CryZe commented Apr 30, 2016

I'm not sure if this is the same issue, but diesel_codegen fails to compile on the latest nightly builds (for roughly a week now):

/tmp/cargo_393z/.cargo/registry/src/github.com-88ac128001ac3a9a/diesel_codegen-0.6.1/src/insertable.rs:86:46: 86:54 error: no associated item named `empty` found for type `syntax::ptr::P<_>` in the current scope
/tmp/cargo_393z/.cargo/registry/src/github.com-88ac128001ac3a9a/diesel_codegen-0.6.1/src/insertable.rs:86         cx.typaram(span, str_to_ident("DB"), P::empty(), None),

Looks like this commit killed it: rust-lang/rust@9108fb7#diff-97bf1faa36ad558417a71680410472c8L141

Nvm, looks like you fixed this already.

@sgrif

This comment has been minimized.

Member

sgrif commented Apr 30, 2016

@CryZe That was fixed by #312

@sgrif sgrif closed this in 7bfa775 May 12, 2016

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