Auto merge of #126185 - matthiaskrgr:rollup-72dn1s2, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #126137 (tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs) - #126146 (std::unix::process adding few specific freebsd signals to be able to id.) - #126155 (Remove empty test suite `tests/run-make-fulldeps`) - #126168 (std::unix::os current_exe implementation simplification for haiku.) - #126175 (Use --quiet flag when installing pip dependencies) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
4f3a276ff1
@ -462,21 +462,21 @@ pub fn current_exe() -> io::Result<PathBuf> {
|
||||
|
||||
#[cfg(target_os = "haiku")]
|
||||
pub fn current_exe() -> io::Result<PathBuf> {
|
||||
let mut name = vec![0; libc::PATH_MAX as usize];
|
||||
unsafe {
|
||||
let mut info: mem::MaybeUninit<libc::image_info> = mem::MaybeUninit::uninit();
|
||||
let mut cookie: i32 = 0;
|
||||
// the executable can be found at team id 0
|
||||
let result = libc::_get_next_image_info(
|
||||
0,
|
||||
&mut cookie,
|
||||
info.as_mut_ptr(),
|
||||
mem::size_of::<libc::image_info>(),
|
||||
let result = libc::find_path(
|
||||
std::ptr::null_mut(),
|
||||
libc::path_base_directory::B_FIND_PATH_IMAGE_PATH,
|
||||
std::ptr::null_mut(),
|
||||
name.as_mut_ptr(),
|
||||
name.len(),
|
||||
);
|
||||
if result != 0 {
|
||||
if result != libc::B_OK {
|
||||
use crate::io::ErrorKind;
|
||||
Err(io::const_io_error!(ErrorKind::Uncategorized, "Error getting executable path"))
|
||||
} else {
|
||||
let name = CStr::from_ptr((*info.as_ptr()).name.as_ptr()).to_bytes();
|
||||
// find_path adds the null terminator.
|
||||
let name = CStr::from_ptr(name.as_ptr()).to_bytes();
|
||||
Ok(PathBuf::from(OsStr::from_bytes(name)))
|
||||
}
|
||||
}
|
||||
|
@ -1053,6 +1053,10 @@ fn signal_string(signal: i32) -> &'static str {
|
||||
libc::SIGINFO => " (SIGINFO)",
|
||||
#[cfg(target_os = "hurd")]
|
||||
libc::SIGLOST => " (SIGLOST)",
|
||||
#[cfg(target_os = "freebsd")]
|
||||
libc::SIGTHR => " (SIGTHR)",
|
||||
#[cfg(target_os = "freebsd")]
|
||||
libc::SIGLIBRT => " (SIGLIBRT)",
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
|
@ -1487,12 +1487,6 @@ fn run(self, builder: &Builder<'_>) {
|
||||
}
|
||||
}
|
||||
|
||||
host_test!(RunMakeFullDeps {
|
||||
path: "tests/run-make-fulldeps",
|
||||
mode: "run-make",
|
||||
suite: "run-make-fulldeps"
|
||||
});
|
||||
|
||||
default_test!(Assembly { path: "tests/assembly", mode: "assembly", suite: "assembly" });
|
||||
|
||||
/// Coverage tests are a bit more complicated than other test suites, because
|
||||
@ -1973,9 +1967,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
add_link_lib_path(vec![llvm_libdir.trim().into()], &mut cmd);
|
||||
}
|
||||
|
||||
if !builder.config.dry_run()
|
||||
&& (matches!(suite, "run-make" | "run-make-fulldeps") || mode == "coverage-run")
|
||||
{
|
||||
if !builder.config.dry_run() && matches!(mode, "run-make" | "coverage-run") {
|
||||
// The llvm/bin directory contains many useful cross-platform
|
||||
// tools. Pass the path to run-make tests so they can use them.
|
||||
// (The coverage-run tests also need these tools to process
|
||||
@ -1987,7 +1979,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
cmd.arg("--llvm-bin-dir").arg(llvm_bin_path);
|
||||
}
|
||||
|
||||
if !builder.config.dry_run() && matches!(suite, "run-make" | "run-make-fulldeps") {
|
||||
if !builder.config.dry_run() && mode == "run-make" {
|
||||
// If LLD is available, add it to the PATH
|
||||
if builder.config.lld_enabled {
|
||||
let lld_install_root =
|
||||
@ -2007,7 +1999,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
|
||||
// Only pass correct values for these flags for the `run-make` suite as it
|
||||
// requires that a C++ compiler was configured which isn't always the case.
|
||||
if !builder.config.dry_run() && matches!(suite, "run-make" | "run-make-fulldeps") {
|
||||
if !builder.config.dry_run() && mode == "run-make" {
|
||||
cmd.arg("--cc")
|
||||
.arg(builder.cc(target))
|
||||
.arg("--cxx")
|
||||
|
@ -332,7 +332,6 @@ pub fn assert_single_path(&self) -> &TaskPath {
|
||||
"tests/mir-opt",
|
||||
"tests/pretty",
|
||||
"tests/run-make",
|
||||
"tests/run-make-fulldeps",
|
||||
"tests/run-pass-valgrind",
|
||||
"tests/rustdoc",
|
||||
"tests/rustdoc-gui",
|
||||
@ -828,7 +827,6 @@ macro_rules! describe {
|
||||
test::RustAnalyzer,
|
||||
test::ErrorIndex,
|
||||
test::Distcheck,
|
||||
test::RunMakeFullDeps,
|
||||
test::Nomicon,
|
||||
test::Reference,
|
||||
test::RustdocBook,
|
||||
|
@ -44,6 +44,14 @@ ENV RUST_CONFIGURE_ARGS \
|
||||
--set target.x86_64-unknown-linux-gnu.cc=clang \
|
||||
--set target.x86_64-unknown-linux-gnu.cxx=clang++
|
||||
|
||||
# This job appears to be checking two separate things:
|
||||
# - That we can build the compiler with `--enable-debug`
|
||||
# (without necessarily testing the result).
|
||||
# - That the tests with `//@ needs-matching-clang` pass, since they
|
||||
# don't run by default unless RUSTBUILD_FORCE_CLANG_BASED_TESTS is set.
|
||||
# - FIXME(https://github.com/rust-lang/rust/pull/126155#issuecomment-2156314273):
|
||||
# Currently we only run the subset of tests with "clang" in their name.
|
||||
|
||||
ENV SCRIPT \
|
||||
python3 ../x.py --stage 2 build && \
|
||||
python3 ../x.py --stage 2 test tests/run-make-fulldeps --test-args clang
|
||||
python3 ../x.py --stage 2 test tests/run-make --test-args clang
|
||||
|
@ -37,7 +37,7 @@ runners:
|
||||
|
||||
envs:
|
||||
env-x86_64-apple-tests: &env-x86_64-apple-tests
|
||||
SCRIPT: ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc --skip tests/run-make-fulldeps
|
||||
SCRIPT: ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc
|
||||
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
|
||||
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.12
|
||||
@ -294,7 +294,7 @@ auto:
|
||||
|
||||
- image: x86_64-apple-2
|
||||
env:
|
||||
SCRIPT: ./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps
|
||||
SCRIPT: ./x.py --stage 2 test tests/ui tests/rustdoc
|
||||
<<: *env-x86_64-apple-tests
|
||||
<<: *job-macos-xl
|
||||
|
||||
|
@ -160,8 +160,7 @@ export exclude_tests='
|
||||
--exclude src/tools/linkchecker
|
||||
--exclude tests/ui-fulldeps
|
||||
--exclude rustc
|
||||
--exclude rustdoc
|
||||
--exclude tests/run-make-fulldeps'
|
||||
--exclude rustdoc'
|
||||
|
||||
env $build_env \
|
||||
./x.py test \
|
||||
|
@ -320,7 +320,7 @@ fn install_requirements(
|
||||
}
|
||||
|
||||
let stat = Command::new(py_path)
|
||||
.args(["-m", "pip", "install", "--require-hashes", "-r"])
|
||||
.args(["-m", "pip", "install", "--quiet", "--require-hashes", "-r"])
|
||||
.arg(src_reqs_path)
|
||||
.status()?;
|
||||
if !stat.success() {
|
||||
|
@ -1,4 +0,0 @@
|
||||
If this directory is empty, Git won't create it, and compiletest will complain
|
||||
that it can't find a nonexistent test suite directory.
|
||||
|
||||
FIXME(#126111): Remove `run-make-fulldeps` from bootstrap.
|
@ -1 +0,0 @@
|
||||
can-only-test-this-in-run-make-fulldeps //~ ERROR expected one of `!` or `::`, found `-`
|
@ -1,8 +0,0 @@
|
||||
error: expected one of `!` or `::`, found `-`
|
||||
--> $DIR/feature-gate-extern_prelude.rs:1:4
|
||||
|
|
||||
LL | can-only-test-this-in-run-make-fulldeps
|
||||
| ^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
@ -0,0 +1,9 @@
|
||||
error[E0284]: type annotations needed: cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc <: <T as Trait<'_>>::Assoc`
|
||||
--> $DIR/rigid-equate-projections-in-higher-ranked-fn-signature.rs:27:50
|
||||
|
|
||||
LL | let _: for<'a> fn(<_ as Trait<'a>>::Assoc) = foo::<T>();
|
||||
| ^^^^^^^^^^ cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc <: <T as Trait<'_>>::Assoc`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0284`.
|
@ -0,0 +1,30 @@
|
||||
//@ revisions: current next
|
||||
//@[current] check-pass
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@[next] check-fail
|
||||
//@ ignore-compare-mode-next-solver (explicit revisions)
|
||||
|
||||
/// This triggers an ICE with (and without) `--emit metadata` using the old
|
||||
/// trait solver:
|
||||
/// ```
|
||||
/// rustc +nightly-2023-01-09 \
|
||||
/// tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs
|
||||
/// ```
|
||||
/// The ICE was unknowingly fixed by
|
||||
/// <https://github.com/rust-lang/rust/pull/101947> in `nightly-2023-01-10`.
|
||||
/// This is a regression test for that fixed ICE. For the next solver we simply
|
||||
/// make sure there is a compiler error.
|
||||
|
||||
trait Trait<'a> {
|
||||
type Assoc;
|
||||
}
|
||||
|
||||
fn foo<T: for<'a> Trait<'a>>() -> for<'a> fn(<T as Trait<'a>>::Assoc) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn bar<T: for<'a> Trait<'a>>() {
|
||||
let _: for<'a> fn(<_ as Trait<'a>>::Assoc) = foo::<T>(); //[next]~ ERROR type annotations needed
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user