Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
New lint: add function_abi_no_longer_unwind lint #689
New lint: add function_abi_no_longer_unwind lint #689
Changes from 2 commits
1e791ac
a483787
f590805
dfffe7f
d0c2614
61ab58c
35d9443
442f257
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't necessarily know that the change was specifically
C-unwind
toC
. It's possible that the change is from a different unwind-capable ABI to its non-unwind-capable equivalent.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I will change the description to "pub fn changed from an unwind-capable ABI to the same-named ABI without unwind" then. So that the description doesn't specify if the change was specifically
C-unwind
toC
to anticipate new types of unwind capable ABI being added to rust in the future (although I don't know any other unwind capable FFI other thanC-unwind
so far). Is this an appropriate approach to address this issue?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me!
Here are a few more unwind-capable ABIs in case you're curious: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md#other-unwind-abi-strings
If we expand the set to not-yet-stable ABIs, the set is even bigger:
https://doc.rust-lang.org/beta/unstable-book/language-features/c-unwind.html
We might want to use the RFC that introduced
unwind
ABIs as the reference link on line 6 btw: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.mdThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include an appropriate reference link here. Anything is better than nothing. For example, we could link to the reference page that other ABI-related lints use, if there's nothing more specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attached the proposal to add
C-unwind
ABI. It contains lots of information about the design and behaviours. It also links to the RFC PR and issue toC-unwind
.