Skip to content
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

'No such associated item' when using some structs which derived the 'Default' trait in the crate 'wgpu' #16295

Closed
zerodegress opened this issue Jan 7, 2024 · 5 comments · Fixed by #16308
Labels
A-hygiene A-nameres name, path and module resolution C-bug Category: bug

Comments

@zerodegress
Copy link

rust-analyzer version: rust-analyzer version: 0.4.1797-standalone (f595e60 2024-01-06)

rustc version: rustc 1.74.0 (79e9716c9 2023-11-13)

relevant settings: no

图片
图片

Just like these pictures showed.It is confusing that the cargo check is ok but RA not.
The only used dependency is wgpu@0.17.

图片

@zerodegress zerodegress added the C-bug Category: bug label Jan 7, 2024
@Veykril
Copy link
Member

Veykril commented Jan 7, 2024

wgpu has core module/import alias which trips us up in the derives here since we are still lacking hygienic name resolution.

@Veykril Veykril added A-nameres name, path and module resolution A-hygiene labels Jan 7, 2024
@lnicola
Copy link
Member

lnicola commented Jan 7, 2024

#13600 and probably others.

@alshdavid
Copy link

Does this share the same cause? RustCrypto/hashes#529

@lnicola
Copy link
Member

lnicola commented Jan 8, 2024

@alshdavid I don't think so, but we have a bunch of type inference issues with the RustCrypto crates. That one is probably #15242.

(the problem was there before and could be noticed by wrong or missing completions, but now it's made more clear by the diagnostic; don't blame the messenger).

@Veykril
Copy link
Member

Veykril commented Jan 8, 2024

Hmm, actually, I just realized we should be able to use $crate correctly now, since that hygiene is (or should be) correctly implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-hygiene A-nameres name, path and module resolution C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants