You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.The text was updated successfully, but these errors were encountered: