Skip to content
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

Highlight functions that can panic if misused #5183

Closed
steven-joruk opened this issue Jul 1, 2020 · 1 comment
Closed

Highlight functions that can panic if misused #5183

steven-joruk opened this issue Jul 1, 2020 · 1 comment
Labels

Comments

@steven-joruk
Copy link
Contributor

Similar to issue #190 I think it would be useful to indicate functions that can panic if misused. Sometimes it might not be obvious that it's even possible to misuse a certain function, so it would be a good hint for users to properly read its documentation.

Clippy has an open issue about warning when a function panics but doesn't have a # Panics section in the rustdoc: rust-lang/rust-clippy#1974. That approach might be a reasonable way to determine if a function should be highlighted.

@matklad matklad added the E-hard label Jul 2, 2020
@matklad
Copy link
Member

matklad commented Jul 11, 2020

Hm, now that I think about this more, this seems pretty niche, and unlikely to be implemented in rust-analyzer proper. One day, once we have extension API, there might be a 3rd-party tool for this, but now, in the interst of keeping the issue list focused on actionable items I am going to close.

@matklad matklad closed this as completed Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants