Skip to content

Commit 4f3a276

Browse files
committed
Auto merge of rust-lang#126185 - matthiaskrgr:rollup-72dn1s2, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - rust-lang#126137 (tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs) - rust-lang#126146 (std::unix::process adding few specific freebsd signals to be able to id.) - rust-lang#126155 (Remove empty test suite `tests/run-make-fulldeps`) - rust-lang#126168 (std::unix::os current_exe implementation simplification for haiku.) - rust-lang#126175 (Use --quiet flag when installing pip dependencies) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b3ca6ee + 8875fd1 commit 4f3a276

File tree

13 files changed

+69
-42
lines changed

13 files changed

+69
-42
lines changed

Diff for: library/std/src/sys/pal/unix/os.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -462,21 +462,21 @@ pub fn current_exe() -> io::Result<PathBuf> {
462462

463463
#[cfg(target_os = "haiku")]
464464
pub fn current_exe() -> io::Result<PathBuf> {
465+
let mut name = vec![0; libc::PATH_MAX as usize];
465466
unsafe {
466-
let mut info: mem::MaybeUninit<libc::image_info> = mem::MaybeUninit::uninit();
467-
let mut cookie: i32 = 0;
468-
// the executable can be found at team id 0
469-
let result = libc::_get_next_image_info(
470-
0,
471-
&mut cookie,
472-
info.as_mut_ptr(),
473-
mem::size_of::<libc::image_info>(),
467+
let result = libc::find_path(
468+
std::ptr::null_mut(),
469+
libc::path_base_directory::B_FIND_PATH_IMAGE_PATH,
470+
std::ptr::null_mut(),
471+
name.as_mut_ptr(),
472+
name.len(),
474473
);
475-
if result != 0 {
474+
if result != libc::B_OK {
476475
use crate::io::ErrorKind;
477476
Err(io::const_io_error!(ErrorKind::Uncategorized, "Error getting executable path"))
478477
} else {
479-
let name = CStr::from_ptr((*info.as_ptr()).name.as_ptr()).to_bytes();
478+
// find_path adds the null terminator.
479+
let name = CStr::from_ptr(name.as_ptr()).to_bytes();
480480
Ok(PathBuf::from(OsStr::from_bytes(name)))
481481
}
482482
}

Diff for: library/std/src/sys/pal/unix/process/process_unix.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,10 @@ fn signal_string(signal: i32) -> &'static str {
10531053
libc::SIGINFO => " (SIGINFO)",
10541054
#[cfg(target_os = "hurd")]
10551055
libc::SIGLOST => " (SIGLOST)",
1056+
#[cfg(target_os = "freebsd")]
1057+
libc::SIGTHR => " (SIGTHR)",
1058+
#[cfg(target_os = "freebsd")]
1059+
libc::SIGLIBRT => " (SIGLIBRT)",
10561060
_ => "",
10571061
}
10581062
}

Diff for: src/bootstrap/src/core/build_steps/test.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -1487,12 +1487,6 @@ impl Step for RunMake {
14871487
}
14881488
}
14891489

1490-
host_test!(RunMakeFullDeps {
1491-
path: "tests/run-make-fulldeps",
1492-
mode: "run-make",
1493-
suite: "run-make-fulldeps"
1494-
});
1495-
14961490
default_test!(Assembly { path: "tests/assembly", mode: "assembly", suite: "assembly" });
14971491

14981492
/// Coverage tests are a bit more complicated than other test suites, because
@@ -1973,9 +1967,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
19731967
add_link_lib_path(vec![llvm_libdir.trim().into()], &mut cmd);
19741968
}
19751969

1976-
if !builder.config.dry_run()
1977-
&& (matches!(suite, "run-make" | "run-make-fulldeps") || mode == "coverage-run")
1978-
{
1970+
if !builder.config.dry_run() && matches!(mode, "run-make" | "coverage-run") {
19791971
// The llvm/bin directory contains many useful cross-platform
19801972
// tools. Pass the path to run-make tests so they can use them.
19811973
// (The coverage-run tests also need these tools to process
@@ -1987,7 +1979,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
19871979
cmd.arg("--llvm-bin-dir").arg(llvm_bin_path);
19881980
}
19891981

1990-
if !builder.config.dry_run() && matches!(suite, "run-make" | "run-make-fulldeps") {
1982+
if !builder.config.dry_run() && mode == "run-make" {
19911983
// If LLD is available, add it to the PATH
19921984
if builder.config.lld_enabled {
19931985
let lld_install_root =
@@ -2007,7 +1999,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
20071999

20082000
// Only pass correct values for these flags for the `run-make` suite as it
20092001
// requires that a C++ compiler was configured which isn't always the case.
2010-
if !builder.config.dry_run() && matches!(suite, "run-make" | "run-make-fulldeps") {
2002+
if !builder.config.dry_run() && mode == "run-make" {
20112003
cmd.arg("--cc")
20122004
.arg(builder.cc(target))
20132005
.arg("--cxx")

Diff for: src/bootstrap/src/core/builder.rs

-2
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ const PATH_REMAP: &[(&str, &[&str])] = &[
332332
"tests/mir-opt",
333333
"tests/pretty",
334334
"tests/run-make",
335-
"tests/run-make-fulldeps",
336335
"tests/run-pass-valgrind",
337336
"tests/rustdoc",
338337
"tests/rustdoc-gui",
@@ -828,7 +827,6 @@ impl<'a> Builder<'a> {
828827
test::RustAnalyzer,
829828
test::ErrorIndex,
830829
test::Distcheck,
831-
test::RunMakeFullDeps,
832830
test::Nomicon,
833831
test::Reference,
834832
test::RustdocBook,

Diff for: src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile

+9-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ ENV RUST_CONFIGURE_ARGS \
4444
--set target.x86_64-unknown-linux-gnu.cc=clang \
4545
--set target.x86_64-unknown-linux-gnu.cxx=clang++
4646

47+
# This job appears to be checking two separate things:
48+
# - That we can build the compiler with `--enable-debug`
49+
# (without necessarily testing the result).
50+
# - That the tests with `//@ needs-matching-clang` pass, since they
51+
# don't run by default unless RUSTBUILD_FORCE_CLANG_BASED_TESTS is set.
52+
# - FIXME(https://github.com/rust-lang/rust/pull/126155#issuecomment-2156314273):
53+
# Currently we only run the subset of tests with "clang" in their name.
54+
4755
ENV SCRIPT \
4856
python3 ../x.py --stage 2 build && \
49-
python3 ../x.py --stage 2 test tests/run-make-fulldeps --test-args clang
57+
python3 ../x.py --stage 2 test tests/run-make --test-args clang

Diff for: src/ci/github-actions/jobs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ runners:
3737

3838
envs:
3939
env-x86_64-apple-tests: &env-x86_64-apple-tests
40-
SCRIPT: ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc --skip tests/run-make-fulldeps
40+
SCRIPT: ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc
4141
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
4242
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
4343
MACOSX_DEPLOYMENT_TARGET: 10.12
@@ -294,7 +294,7 @@ auto:
294294

295295
- image: x86_64-apple-2
296296
env:
297-
SCRIPT: ./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps
297+
SCRIPT: ./x.py --stage 2 test tests/ui tests/rustdoc
298298
<<: *env-x86_64-apple-tests
299299
<<: *job-macos-xl
300300

Diff for: src/doc/rustc/src/platform-support/nto-qnx.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ export exclude_tests='
160160
--exclude src/tools/linkchecker
161161
--exclude tests/ui-fulldeps
162162
--exclude rustc
163-
--exclude rustdoc
164-
--exclude tests/run-make-fulldeps'
163+
--exclude rustdoc'
165164

166165
env $build_env \
167166
./x.py test \

Diff for: src/tools/tidy/src/ext_tool_checks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ fn install_requirements(
320320
}
321321

322322
let stat = Command::new(py_path)
323-
.args(["-m", "pip", "install", "--require-hashes", "-r"])
323+
.args(["-m", "pip", "install", "--quiet", "--require-hashes", "-r"])
324324
.arg(src_reqs_path)
325325
.status()?;
326326
if !stat.success() {

Diff for: tests/run-make-fulldeps/README.md

-4
This file was deleted.

Diff for: tests/ui/feature-gates/feature-gate-extern_prelude.rs

-1
This file was deleted.

Diff for: tests/ui/feature-gates/feature-gate-extern_prelude.stderr

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0284]: type annotations needed: cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc <: <T as Trait<'_>>::Assoc`
2+
--> $DIR/rigid-equate-projections-in-higher-ranked-fn-signature.rs:27:50
3+
|
4+
LL | let _: for<'a> fn(<_ as Trait<'a>>::Assoc) = foo::<T>();
5+
| ^^^^^^^^^^ cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc <: <T as Trait<'_>>::Assoc`
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0284`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//@ revisions: current next
2+
//@[current] check-pass
3+
//@[next] compile-flags: -Znext-solver
4+
//@[next] check-fail
5+
//@ ignore-compare-mode-next-solver (explicit revisions)
6+
7+
/// This triggers an ICE with (and without) `--emit metadata` using the old
8+
/// trait solver:
9+
/// ```
10+
/// rustc +nightly-2023-01-09 \
11+
/// tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs
12+
/// ```
13+
/// The ICE was unknowingly fixed by
14+
/// <https://github.com/rust-lang/rust/pull/101947> in `nightly-2023-01-10`.
15+
/// This is a regression test for that fixed ICE. For the next solver we simply
16+
/// make sure there is a compiler error.
17+
18+
trait Trait<'a> {
19+
type Assoc;
20+
}
21+
22+
fn foo<T: for<'a> Trait<'a>>() -> for<'a> fn(<T as Trait<'a>>::Assoc) {
23+
todo!()
24+
}
25+
26+
fn bar<T: for<'a> Trait<'a>>() {
27+
let _: for<'a> fn(<_ as Trait<'a>>::Assoc) = foo::<T>(); //[next]~ ERROR type annotations needed
28+
}
29+
30+
fn main() {}

0 commit comments

Comments
 (0)