Open hanayashiki opened 1 month ago
Whether a Diagnostic is experimental technically isn't known statically, since it's just set like https://github.com/rust-lang/rust-analyzer/blob/0fb804acb375b02a3beeaceeb75b71969ef37b15/crates/ide-diagnostics/src/handlers/expected_function.rs#L12-L18
In practice a heuristic of "check if the text contains .experimental()
" would probably work fine
https://github.com/rust-lang/rust-analyzer/blob/0fb804acb375b02a3beeaceeb75b71969ef37b15/xtask/src/codegen/diagnostics_docs.rs#L40-L41
Or we could just manually add a note to each experimental diagnostic, with the only risk being them becoming out of sync.
Or just breakingly prefix them to be experimental_xxx since they are experimental anyways?
rust-analyzer version: 0.3.2137-standalone (2b750da1a 2024-10-06) [/Users/chenyuwang/.vscode/extensions/rust-lang.rust-analyzer-0.3.2137-darwin-arm64/server/rust-analyzer]
rustc version: -
editor or extension: -
relevant settings: - repository link (if public, optional): - code snippet to reproduce:
I'd like to test out the diagnostics
https://rust-analyzer.github.io/manual.html#expected-function
but it seems it is actually "experimental" and is only enabled when"rust-analyzer.diagnostics.experimental.enable": true
is set to true in.vscode/settings.json
. I think the documentation is supposed to make it clear with the configuration of experimental diagnostics in the auto-generated documentation. If possible I think I can make a PR to help.