Merge pull request #20520 from ChayimFriedman2/reborrow

feat: Add an option to remove reborrows from adjustment inlay hints
This commit is contained in:
Shoyu Vanilla (Flint) 2025-08-26 05:48:34 +00:00 committed by GitHub
commit 25adf3464c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 88 additions and 5 deletions

View file

@ -959,6 +959,17 @@ Default: `"never"`
Show enum variant discriminant hints.
## rust-analyzer.inlayHints.expressionAdjustmentHints.disableReborrows {#inlayHints.expressionAdjustmentHints.disableReborrows}
Default: `true`
Disable reborrows in expression adjustments inlay hints.
Reborrows are a pair of a builtin deref then borrow, i.e. `&*`. They are inserted by the compiler but are mostly useless to the programmer.
Note: if the deref is not builtin (an overloaded deref), or the borrow is `&raw const`/`&raw mut`, they are not removed.
## rust-analyzer.inlayHints.expressionAdjustmentHints.enable {#inlayHints.expressionAdjustmentHints.enable}
Default: `"never"`