-
Notifications
You must be signed in to change notification settings - Fork 13.4k
error on calls to ABIs that cannot be called #142597
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
base: master
Are you sure you want to change the base?
Conversation
|
8a2bc53
to
e88e066
Compare
e88e066
to
03b0436
Compare
03b0436
to
70c0e58
Compare
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 think we would both like a slightly less annoying rebase, depending on which PR lands first (probably yours, tbh).
extern "riscv-interrupt-s" fn riscv_s() {} | ||
//[x64,x64_win,i686,arm,aarch64]~^ ERROR is not a supported ABI | ||
fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) { | ||
//[x64,x64_win,i686,arm,aarch64]~^ WARN unsupported_fn_ptr_calling_conventions | ||
//[x64,x64_win,i686,arm,aarch64]~^^ WARN this was previously accepted | ||
f() | ||
//[riscv32,riscv64]~^ ERROR functions with the `"riscv-interrupt-s"` ABI cannot be called | ||
} | ||
extern "riscv-interrupt-s" {} | ||
//[x64,x64_win,i686,arm,aarch64]~^ ERROR is not a supported ABI |
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.
this sure is getting to be an exciting test file
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.
in the interest of minimizing (not eliminating, only minimizing) conflicts with a number of other in-flight PRs touching this file, can you duplicate (yes, duplicate as in add-a-new-file-with, not first-remove-here-and-then-add-a-new-file-with) the parts of the test for interrupt ABIs that you want to edit? then revert the change to this file that aren't going-to-happen-anyway?
include a FIXME that the duplication is intentional in the new file and that in the near future the duplication should be reduced (preferably by splitting up unsupported.rs a bit more but it really doesn't matter).
functions with the `"custom"` ABI cannot be called | ||
.note = an `extern "custom"` function can only be called from within inline assembly | ||
hir_typeck_abi_cannot_be_called = | ||
functions with the `{$abi}` ABI cannot be called |
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.
same idea as the style nits on other PR
functions with the `{$abi}` ABI cannot be called | |
functions with the {$abi} ABI cannot be called |
We recently added
extern "custom"
, which cannot be called using a rust call expression. But there are more ABIs that can't be called in that way, because the call does not semantically make sense.More details are in #140566 (comment)
r? @workingjubilee