-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
compiler: add ExternAbi::is_rustic_abi
#138028
Changes from all commits
1f32f7b
08b5783
5abf36b
e81fbe3
8a68987
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -436,10 +436,7 @@ fn fn_abi_sanity_check<'tcx>( | |
) { | ||
let tcx = cx.tcx(); | ||
|
||
if spec_abi == ExternAbi::Rust | ||
|| spec_abi == ExternAbi::RustCall | ||
|| spec_abi == ExternAbi::RustCold | ||
{ | ||
if spec_abi.is_rustic_abi() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah it was just checking that we don't put "weird" things into functions with these ABIs, so this just makes the check slightly stricter in a slightly irrelevant way because #132735 is the death sentence of the weird "rust-intrinsic" pseudo-ABI anyways. |
||
if arg.layout.is_zst() { | ||
// Casting closures to function pointers depends on ZST closure types being | ||
// omitted entirely in the calling convention. | ||
|
@@ -687,7 +684,7 @@ fn fn_abi_adjust_for_abi<'tcx>( | |
|
||
let tcx = cx.tcx(); | ||
|
||
if abi == ExternAbi::Rust || abi == ExternAbi::RustCall || abi == ExternAbi::RustIntrinsic { | ||
if abi.is_rustic_abi() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was missing |
||
fn_abi.adjust_for_rust_abi(cx, abi); | ||
|
||
// Look up the deduced parameter attributes for this function, if we have its def ID and | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//@build-pass | ||
//@compile-flags: -Clink-dead-code=true --crate-type lib | ||
// We used to not handle all "rustic" ABIs in a (relatively) uniform way, | ||
// so we failed to fix up arguments for actually passing through the ABI... | ||
#![feature(rust_cold_cc)] | ||
pub extern "rust-cold" fn foo(_: [usize; 3]) {} |
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.
hell ya