You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anytime I use a .filter(some_field.<operator>(some_value)) (ex. .filter(username.eq("ayush"))). I loose type information on the returning result. The program still compiles unaffected but the types vanish. Here is an example,
with .filter
without .filter
You'll notice that without filter it's being parsed as Vec<User> while with filter it's being parsed as ! (diverging). I was following the "getting started" guide so I'm not sure what causes this.
What are you trying to accomplish?
The type information to be parsed correctly.
What is the expected output?
The correct type for results i.e. Vec<User>.
What is the actual output?
It's !. For some reason, rust thinks it's diverging.
The code itself is fine as it is accepted by rustc. It's just an IDE issue. There is nothing we can do in diesel to fix this issue. It needs to be fixed in rust-analyzer.
Setup
Versions
Feature Flags
Problem Description
Anytime I use a
.filter(some_field.<operator>(some_value))
(ex..filter(username.eq("ayush"))
). I loose type information on the returning result. The program still compiles unaffected but the types vanish. Here is an example,.filter
.filter
You'll notice that without filter it's being parsed as
Vec<User>
while with filter it's being parsed as!
(diverging). I was following the "getting started" guide so I'm not sure what causes this.What are you trying to accomplish?
The type information to be parsed correctly.
What is the expected output?
The correct type for
results
i.e.Vec<User>
.What is the actual output?
It's
!
. For some reason, rust thinks it's diverging.Are you seeing any additional errors?
Nope! The program compiles perfectly fine.
Steps to reproduce
Unfortunately I don't yet know why this occurs but here is the link to the above code.
Checklist
closed if this is not the case)
The text was updated successfully, but these errors were encountered: