-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
add rustc_abi(assert_eq) to test some guaranteed or at least highly expected ABI compatibility guarantees #115372
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
tests/ui/abi/transparent.rs
Outdated
test_transparent!(pair, (i32, f32)); | ||
test_transparent!(tuple, (i32, f32, i64, f64)); | ||
test_transparent!(zst, ()); | ||
test_transparent!(empty_array, [u32; 0]); |
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 expect this will fail on some targets due to #115336. However that's a tier 2 target so I think we don't run tests?
072bfa5
to
3a81c97
Compare
@@ -43,7 +43,6 @@ pub extern "C" fn test_WithZst(_: WithZst) -> WithZst { loop {} } | |||
#[repr(transparent)] | |||
pub struct WithZeroSizedArray(*const f32, [i8; 0]); | |||
|
|||
// Apparently we use i32* when newtype-unwrapping f32 pointers. Whatever. |
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 comment seems to be from a time when LLVM still had pointee types, so I think it can be removed.
e26a5f6
to
ec75ba4
Compare
This comment has been minimized.
This comment has been minimized.
ec75ba4
to
e99ff9a
Compare
This comment has been minimized.
This comment has been minimized.
30dfab9
to
1a85aed
Compare
57dce60
to
170df61
Compare
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
cf929af
to
ad14c49
Compare
This comment has been minimized.
This comment has been minimized.
a26f3a5
to
8522721
Compare
add rustc_abi(assert_eq) to test some guaranteed or at least highly expected ABI compatibility guarantees This new repr(transparent) test is super useful, it would have found rust-lang#115336 and found rust-lang#115404, rust-lang#115481, rust-lang#115509.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
bd13b26
to
e726be2
Compare
☀️ Test successful - checks-actions |
Finished benchmarking commit (cd71a37): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 629.695s -> 631.473s (0.28%) |
Support Result<T, E> across FFI when niche optimization can be used Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang#110503 Additional ABI and codegen tests were added in rust-lang#115372
Support Result<T, E> across FFI when niche optimization can be used Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang#110503 Additional ABI and codegen tests were added in rust-lang#115372
Support Result<T, E> across FFI when niche optimization can be used Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang#110503 Additional ABI and codegen tests were added in rust-lang#115372
Support Result<T, E> across FFI when niche optimization can be used (v2) This PR is identical to rust-lang#122253, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang#110503 Additional ABI and codegen tests were added in rust-lang#115372
Support Result<T, E> across FFI when niche optimization can be used (v2) This PR is identical to rust-lang#122253, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang#110503 Additional ABI and codegen tests were added in rust-lang#115372
Support Result<T, E> across FFI when niche optimization can be used (v2) This PR is identical to rust-lang#122253, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang#110503 Additional ABI and codegen tests were added in rust-lang#115372
Support Result<T, E> across FFI when niche optimization can be used (v2) This PR is identical to #122253, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang/rust#110503 Additional ABI and codegen tests were added in rust-lang/rust#115372
Support Result<T, E> across FFI when niche optimization can be used (v2) This PR is identical to #122253, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang/rust#110503 Additional ABI and codegen tests were added in rust-lang/rust#115372
Support Result<T, E> across FFI when niche optimization can be used (v2) This PR is identical to #122253, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang/rust#110503 Additional ABI and codegen tests were added in rust-lang/rust#115372
This new repr(transparent) test is super useful, it would have found #115336 and found #115404, #115481, #115509.