rust-lang / rust-lang/rust-analyzer
Non-snake-case None match / {unknown} for non-basic types on latest rustc
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I have the same symptoms as https://github.com/rust-lang/rust-analyzer/issues/19281 (Non-snake case None match, non-standard types show as {unknown}) and have run through the same troubleshooting steps (reinstalling rustup, add/remove rust-src, reinstalling VSCode extension, starting in a brand new project, cargo clean, etc.), however, I don't believe my issue is network/package related, I'm also on MacOs. If there's some type of workaround for this, it would be nice.
If I run
cd $(rustc --print sysroot)/lib/rustlib/src/rust/library && __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS=nightly cargo metadata
It prints a bunch of json, if I run cargo metadata in my project, it prints a bunch of json, I am not really sure what the purpose of cargo metadata is in all of this, but, it seems like it's doing whatever it's supposed to? Maybe if https://github.com/rust-lang/rust-analyzer/issues/19281 were fixed I'd see an error. 🤷
rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
rust-analyzer version: 0.3.2330-standalone (02862f5d52 2025-03-03)
rustc version: (eg. output of rustc -V)
rustc 1.85.0 (4d91de4e4 2025-02-17)
editor or extension: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable)
Version: 1.97.2 (Universal)
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin x64 24.3.0
Extension:
Installation
Identifier
rust-lang.rust-analyzer
Version
0.3.2330
Last Updated
2025-03-05, 00:03:20
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)
I haven't changed anything to my knowledge
code snippet to reproduce:
Leaving this blank since there are a million issues where String doesn't have type hints in a hello world project
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the related rust-analyzer issue 19281 and reproduce the reported None-match warning and {unknown} type hints in a new project using the listed rust-analyzer and rustc versions. Compare the cargo metadata results from the Rust library source and the project, then verify that non-basic types receive correct type hints and the warning is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100