-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fully qualified call required to determine trait method type #12247
Comments
flodiebold
added
A-ty
type system / type inference / traits / method resolution
C-bug
Category: bug
labels
May 13, 2022
Here's another fix that works:
|
In case GitHub doesn't keep that other commit around, here's a commit that made it to |
jimblandy
added a commit
to jimblandy/wgpu
that referenced
this issue
Jun 14, 2022
This is a workaround for a limitation in rust-analyzer: rust-lang/rust-analyzer#12247
jimblandy
added a commit
to jimblandy/wgpu
that referenced
this issue
Jun 14, 2022
This is a workaround for a limitation in rust-analyzer: rust-lang/rust-analyzer#12247
cwfitzgerald
pushed a commit
to gfx-rs/wgpu
that referenced
this issue
Jun 15, 2022
This is a workaround for a limitation in rust-analyzer: rust-lang/rust-analyzer#12247
bitgaoshu
added a commit
to bitgaoshu/rust-analyzer
that referenced
this issue
Dec 10, 2022
bitgaoshu
added a commit
to bitgaoshu/rust-analyzer
that referenced
this issue
Dec 10, 2022
bitgaoshu
added a commit
to bitgaoshu/rust-analyzer
that referenced
this issue
Jan 28, 2023
bitgaoshu
added a commit
to bitgaoshu/rust-analyzer
that referenced
this issue
Feb 4, 2023
Merged
I believe this will be fixed once #14279 becomes fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes
rust-analyzer
cannot determine the type returned by calling a trait method, unless fully qualified call syntax is used. It may be that it cannot even determine which method is being called.The branch
https://github.com/jimblandy/wgpu/tree/placate-rust-analyzer
shows an example: without the change in jimblandy/wgpu@7746829,rust-analyzer
cannot determine the type ofcmd_buf
. Switching to fully-qualified syntax and providing some trait type parameters allowsrust-analyzer
to see thatcmd_buf
should have type&mut CommandBuffer<A>
.Here's the change:
The text was updated successfully, but these errors were encountered: