Skip to content

How to use #[auto_type] with as_select() #4408

Answered by weiznich
marcaddeo asked this question in Q&A
Discussion options

You must be logged in to vote

Selectable::as_select is one of the functions that is not supported by #[auto_type] so it is kind of expected to not work there. With the current limitations of what a proc-macro can do and with the current design of that function it's not possible to support it there as it has an unbounded generic type somehow needs to be specified.

The [documentation already] (https://docs.diesel.rs/2.2.x/diesel/dsl/attr.auto_type.html#limitations ) states that #[auto_type] doesn't support all of diesels DSL, although this function is missing from the list in the documentation. We would welcome a PR to add it there.

The workaround (provide an explicit type for this subexpression) listed in the documenta…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@marcaddeo
Comment options

@weiznich
Comment options

Answer selected by marcaddeo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants