-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use the rustc_private libc less in tests #123943
Conversation
Thanks for cleaning this up! @bors r+ rollup |
tests/ui/extern/extern-const.fixed
Outdated
|
||
#[link(name = "rust_test_helpers", kind = "static")] | ||
extern "C" { | ||
static rust_dbg_static_mut: libc::c_int; //~ ERROR extern items cannot be `const` | ||
static rust_dbg_static_mut: i32; //~ ERROR extern items cannot be `const` |
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 is defines as int
on the C side, so using i32
will be incorrect on some architectures. Maybe use int32_t
on the C side?
rust/tests/auxiliary/rust_test_helpers.c
Lines 242 to 243 in 5dcb678
int | |
rust_dbg_static_mut = 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.
Fixed by using ffi::c_int
.
41bda39
to
7457a0d
Compare
…mpiler-errors Rollup of 4 pull requests Successful merges: - rust-lang#123900 (Stop using `PolyTraitRef` for closure/coroutine predicates already instantiated w placeholders) - rust-lang#123924 (Fix various bugs in `ty_kind_suggestion`) - rust-lang#123943 (Use the rustc_private libc less in tests) - rust-lang#123970 (zkvm: fix references to `os_str` module) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123943 - saethlin:less-sysroot-libc, r=workingjubilee Use the rustc_private libc less in tests I started looking into our use of `rustc_private` + `extern crate libc;` in tests because of rust-lang#123938 and it looks like some fraction of the users of libc simply don't need the libc crate anymore.
…=jieyouxu Remove libc from more tests The goal here is to trim down the number of tests that depend on libc from the sysroot to make rust-lang#123938 more plausible. This PR is a few simple cases that I missed in rust-lang#123943.
…ieyouxu Remove libc from more tests The goal here is to trim down the number of tests that depend on libc from the sysroot to make rust-lang#123938 more plausible. This PR is a few simple cases that I missed in rust-lang#123943.
Remove libc from more tests The goal here is to trim down the number of tests that depend on libc from the sysroot to make rust-lang/rust#123938 more plausible. This PR is a few simple cases that I missed in rust-lang/rust#123943.
I started looking into our use of
rustc_private
+extern crate libc;
in tests because of #123938 and it looks like some fraction of the users of libc simply don't need the libc crate anymore.