Skip to content

Conversation

ChayimFriedman2
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 commented Aug 23, 2025

Reborrows are consecutive deref then ref. Make it the default because reborrows are mostly useless to the programmer.

Also rename rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "reborrow" to rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "borrows", as it's not about reborrows but about any ref/deref and it's confusing with the new setting.

Closes #20516.

Reborrows are consecutive deref then ref. Make it the default because reborrows are mostly useless to the programmer.

Also rename `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "reborrow"` to `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "borrows"`, as it's not about reborrows but about any ref/deref and it's confusing with the new setting.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 23, 2025
Copy link
Member

@ShoyuVanilla ShoyuVanilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit surprising that current "Reborrows" option has been enabling everything except pointer cast and never to any adjustments 😅

@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Aug 26, 2025
Merged via the queue into rust-lang:master with commit 25adf34 Aug 26, 2025
16 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 26, 2025
@ChayimFriedman2 ChayimFriedman2 deleted the reborrow branch August 26, 2025 06:20
@lnicola lnicola changed the title feat: Add an option to remove reborrows from adjustment inlay hints feat: Add an option to hide reborrows in adjustment inlay hints Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reborrow expressionAdjustmentHints are rarely useful
3 participants