11791: fix: some fixes and improvements to signature help r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
11789: fix: Fix lifetime elision hint configuration key r=Veykril a=Veykril
This is inconsistent with the other configuration keys unfortunately, but this is an issue of how we structured them here in general.
I feel like we'll have to do a proper pass over all the configs, check them for consistency and then write down some documentation of how our configs should be laid out, then apply fixes to the inconsistencies all at once which will entail breaking some user configurations unfortunately since we won't be able to do proper fallback handling for some of these.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11778
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
11786: fix: fill_match_arms doesn't add wildcard pat for local enums r=Veykril a=OleStrohm
Fix#11783
This adds similar logic to non_exhaustive as is currently on doc(hidden)
Co-authored-by: Ole Strohm <strohm99@gmail.com>
11780: feat: Add type mismatch diagnostic r=flodiebold a=flodiebold
This adds a proper diagnostic for type mismatches, turning "Add reference here", "Missing Ok or Some" and "Remove this semicolon" into quickfixes for this single diagnostic.
The diagnostic is marked as experimental when it does not have one of these quickfixes, so it can be turned off with `rust-analyzer.diagnostics.enableExperimental` (or specifically with `rust-analyzer.diagnostics.disabled` of course, the ID is `type-mismatch`).
There will still be some false positives, but I think there shouldn't be too many especially when the Chalk fix lands, and it's still experimental anyway 🙂
This also fixes type checking for `rustc_legacy_const_generics` just to avoid some errors in tests.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
11785: fix: Fix tuple- and record struct completions not working with existing braces r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
11776: Replace write! with direct `Formatter` calls r=Veykril a=lnicola
The final executable is somehow larger (36 239 296 vs 36 238 336 bytes), but this saves us a bit of `text` and `data`:
```
text data bss dec hex filename
23719199 1126625 4377 24850201 17b2f19 rust-analyzer-baseline
23716027 1126377 4377 24846781 17b21bd rust-analyzer-pr
```
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
11774: feat: Tag macro calls as unsafe if they expand to unsafe expressions r=Veykril a=Veykril
as long as they aren't inside an unsafe block inside the macro that is.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>