Skip to content

feat: Visualize compiler inserted reborrows via inlay hints #11771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2022

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Mar 20, 2022

Disabled by default.

image

Closes #11275

@Veykril
Copy link
Member Author

Veykril commented Mar 20, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 20, 2022

@bors bors bot merged commit 966b692 into rust-lang:master Mar 20, 2022
@Veykril Veykril deleted the spring-cleaning branch March 20, 2022 14:00
@flodiebold
Copy link
Member

It would be nice to be able to toggle visualizations like this and the implicit lifetimes, I guess. Probably very few people will want to turn them on permanently, but would sometimes want to see them.

@Veykril
Copy link
Member Author

Veykril commented Mar 20, 2022

Ye hence why I've disabled them by default. Iirc you can (at least in VSCode) bind configuration toggles to buttons? I'll check that, would probably be good to mention that in the changelog if that is indeed possible.

@Veykril
Copy link
Member Author

Veykril commented Mar 20, 2022

Ah nvm, we added an extra thing for that #4601

@Veykril
Copy link
Member Author

Veykril commented Mar 20, 2022

So, I personally don't feel too good about adding a toggle X command for all these things that we might have and as it turns out (at least for VSCode) you can do arbitrary config toggles by adding an extension and then adding to your keybindings like written here https://medium.com/hack-visual-studio-code/toggle-any-setting-in-vs-code-using-keyboard-shortcut-arguments-cdb5ddc56955
Which sounds like the better overall solution to me to point people to.

@lnicola
Copy link
Member

lnicola commented Mar 20, 2022

Can we drop #4601 then? 😆

@Veykril
Copy link
Member Author

Veykril commented Mar 20, 2022

I'd say yes :)

@flodiebold
Copy link
Member

I wouldn't want to add a toggle command for all the things. I do think though that if we want to provide a good user experience for this, we should provide some way of showing it temporarily and not require a hack with another extension. (Is it even possible to toggle the setting without restarting the server?)

@Veykril
Copy link
Member Author

Veykril commented Mar 20, 2022

Yes changing inlay hint settings retriggers them.

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.

(Configurable) Inlay hints for visualizing compiler inserted reborrows
3 participants