You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#124073 - saethlin:rust-get-test-int, r=wesleywiser
Remove libc from rust_get_test_int uses
`rust_test_helpers.c` has a few unfortunate signatures which have made some of our UI tests _technically_ need the `libc` crate. This is my attempt to evict the need of `libc` for `rust_get_test_int`.
I've deleted `tests/ui/abi/foreign/foreign-no-abi.rs` because the test was originally written to check that `native mod` will compile without an ABI specifier. `native mod` was removed years before 1.0 and the test hasn't checked for anything for a long time.
// Different type, but same ABI (on all supported platforms).
23
-
// Ensures that we don't ICE or trigger LLVM asserts when
24
-
// importing the same symbol under different types.
25
-
// See https://github.com/rust-lang/rust/issues/32740.
17
+
// The point of this test is to ensure that we don't ICE or trigger LLVM asserts when importing
18
+
// the same symbol with different types. This is not really possible to test portably; there is
19
+
// no different signature we can come up with that is different to LLVM but which for sure has
20
+
// the same behavior on all platforms. The signed-ness of integers is ignored by LLVM as well
21
+
// as pointee types. So the only ways to make our signatures differ are to use
22
+
// differently-sized integers which is definitely an ABI mismatch, or to rely on pointers and
23
+
// isize/usize having the same ABI, which is wrong on CHERI and probably other niche platforms.
24
+
// If this test causes you trouble, please file an issue.
25
+
// See https://github.com/rust-lang/rust/issues/32740 for the bug that prompted this test.
0 commit comments