-
Notifications
You must be signed in to change notification settings - Fork 13.5k
error on calls to ABIs that cannot be called #142597
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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.
7ae8882
to
54970a8
Compare
@rustbot ready |
…=workingjubilee error on calls to ABIs that 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 rust-lang#140566 (comment) r? `@workingjubilee`
Rollup of 8 pull requests Successful merges: - #138291 (rewrite `optimize` attribute to use new attribute parsing infrastructure) - #140920 (Extract some shared code from codegen backend target feature handling) - #141990 (Implement send_signal for unix child processes) - #142597 (error on calls to ABIs that cannot be called) - #142668 (vec_deque/fmt/vec tests: remove static mut) - #142687 (Reduce uses of `hir_crate`.) - #142699 (Update books) - #142714 (add comment to `src/bootstrap/build.rs`) r? `@ghost` `@rustbot` modify labels: rollup
Well, this is doing its job #142762 (comment) @bors r- |
A casualty of CI now running on aarch64. This test could just use https://github.com/rust-lang/rust/blob/master/tests/codegen/naked-asan.rs |
@bors2 delegate=try |
@folkertdev can now perform try builds on this pull request |
54970a8
to
a32d085
Compare
@bors2 try=x86_64-gnu-llvm-19-3 |
Unknown command "try". |
@bors2 try |
error on calls to ABIs that 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` try-job: x86_64-gnu-llvm-19-3
For reference it’s |
@rustbot ready |
@bors r=workingjubilee rollup=maybe |
Rollup of 7 pull requests Successful merges: - #142502 (rustdoc_json: improve handling of generic args) - #142597 (error on calls to ABIs that cannot be called) - #142785 (fix(linkcheck): Build using the lockfile) - #142787 (Add diagnostic items for Clippy) - #142788 (add doc(alias("AsciiChar")) to core::ascii::Char) - #142801 (Use gen blocks in the compiler instead of `from_coroutine`) - #142804 (Rename `LayoutS` to `LayoutData` in comments) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142597 - folkertdev:abi-cannot-be-called, r=workingjubilee error on calls to ABIs that 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` try-job: x86_64-gnu-llvm-19-3
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
try-job: x86_64-gnu-llvm-19-3