rust-analyzer gets confused on variable type when using the use_async
yew hook.
#11510
Labels
A-ty
type system / type inference / traits / method resolution
C-bug
Category: bug
S-actionable
Someone could pick this issue up and work on it right now
rust-analyzer version: 02904e9 2022-02-14 stable
rustc version: rustc 1.58.1 (db9d1b20b 2022-01-20)
Rust-analyzer marks variable as
&{unknown}
type, but it actually kind of knows what type it really is as shown in the images.I also created a minimal reproducible example here:
https://github.com/teooliver/rust-analyzer-bug-report
File in question:
https://github.com/teooliver/rust-analyzer-bug-report/blob/main/src/event_table.rs#L24-L38
The
use_async
hook function:https://github.com/jetli/yew-hooks/blob/da43937a3460375e748d03da91b6d248ecd1900d/crates/yew-hooks/src/hooks/use_async.rs#L154-L168
It works on Intellij Rust (0.4.165.4438-213):
The text was updated successfully, but these errors were encountered: