-
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
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).
tests/ui/abi/unsupported.rs
Outdated
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.
the alternative is to split it up per-target, which has upsides and downsides.
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).
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 split this out, and really there is less overlap than it seems: when using revisions, this is just kind of what you get. Any changes to the error messages will prompt to look at the duplication again.
b09ca75
to
7ae8882
Compare
7ae8882
to
54970a8
Compare
@rustbot ready |
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