Commit graph

254053 commits

Author SHA1 Message Date
bors
49cd705189 Auto merge of #3552 - RalfJung:ci, r=RalfJung
even out CI runner times
2024-05-04 11:18:42 +00:00
bors
9d4eea1369 Auto merge of #3556 - RalfJung:intrinsics, r=RalfJung
move intrinsics tests into dedicated folder

And separate them from "shims" (which are for extern functions we link against).
2024-05-04 10:48:35 +00:00
Ralf Jung
52bf84f3cf move some minimal targets over to the macOS runner, to even out CI times 2024-05-04 12:43:48 +02:00
Ralf Jung
a4355bbbb1 fix grouping of target-specific LLVM shims 2024-05-04 12:39:37 +02:00
Ralf Jung
3046dbe7de move intrinsics implementations and tests into dedicated folder
and make them separate from 'shims'
2024-05-04 12:34:42 +02:00
Ralf Jung
57ff16bb5f rename integer test 2024-05-04 12:30:52 +02:00
Ralf Jung
be874a468b move available-parallelism tests into shims/ folder 2024-05-04 12:01:18 +02:00
bors
7b57f122b9 Auto merge of #3533 - Luv-Ray:file-descriptors-to-refcount-references, r=RalfJung
Make file descriptors into refcount references

fixes #3525

Remove `fn dup` in `trait FileDescription`, define `struct FileDescriptor(Rc<RefCell<dyn FileDescription>>)`, and use `BTreeMap<i32, FileDescriptor>` in `FdTable`.

---

There are some refactors similar to the following form:
```rust
{  // origin:
    if let Some(file_descriptor) = this.machine.fds.get_mut(fd) {
        // write file_descriptor
        this.try_unwrap_io_result(result)
    } else {
        this.fd_not_found()
    }
}
{  // now:
    let Some(mut file_descriptor) = this.machine.fds.get_mut(fd) else {
        return this.fd_not_found();
    };
    // write file_descriptor
    drop(file_descriptor);
    this.try_unwrap_io_result(result)
}
```
The origin form can't compile because as using `RefCell` to get interior mutability, `fn get_mut` return `Option<std::cell::RefMut<'_, dyn FileDescription>>` instead of `Option<&mut dyn FileDescription>` now, and the `deref_mut` on `file_descriptor: RefMut` will cause borrow `this` as mutable more than once at a time.
So this form of refactors and manual drops are are implemented to avoid borrowing `this` at the same time.
2024-05-04 09:52:39 +00:00
Ralf Jung
502ed4965f show time taken in run_tests_minimal 2024-05-04 11:46:52 +02:00
Ralf Jung
d130eaac1f speed up Windows runner: don't run GC_STRESS test 2024-05-04 11:46:52 +02:00
Luv-Ray
459c6ce944 Make file descriptors into refcount references
take ownership of self and return `io::Result<()>` in `FileDescription::close`

Co-authored-by: Ralf Jung <post@ralfj.de>
2024-05-04 17:24:18 +08:00
bors
705d48cff9 Auto merge of #3551 - RalfJung:getentropy, r=RalfJung
macos: use getentropy from libc

This has been added in the mean time.
2024-05-04 09:20:04 +00:00
Ralf Jung
07a517a6ba macos: use getentropy from libc 2024-05-04 10:52:25 +02:00
bors
82456b4ce3 Auto merge of #3550 - RalfJung:unix-tls, r=RalfJung
tls dtors: treat all unixes uniformly
2024-05-04 08:50:21 +00:00
Ralf Jung
6559342058 tls dtors: treat all unixes uniformly 2024-05-04 10:45:54 +02:00
bors
38715f714f Auto merge of #3548 - RalfJung:many-seeds, r=RalfJung
make many-seeds a mode of ./miri run rather than a separate command

Also parallelize it so we use all cores to try seeds at the same time.

Fixes https://github.com/rust-lang/miri/issues/3509 by not alternating between different build modes (with/without dev-dependencies) all the time.
2024-05-04 07:04:10 +00:00
Ralf Jung
f7a3aa9811 remove a hack that is no longer needed 2024-05-04 09:02:51 +02:00
Ralf Jung
6ce00aa992 make many-seeds a mode of ./miri run rather than a separate command 2024-05-04 08:23:05 +02:00
bors
74701dcef2 Auto merge of #3547 - RalfJung:ci, r=RalfJung
CI: no need to surround if: condition in expansion braces

That seems to be implicit for `if:` (but interestingly, redundant braces are tolerated).
2024-05-03 20:57:06 +00:00
Ralf Jung
aa71f9b033 CI: no need to surround if: condition in expansion braces 2024-05-03 21:45:03 +02:00
bors
692b769d61 Auto merge of #3545 - RalfJung:miri-run, r=RalfJung
./miri run: support -v flag to print what it is doing
2024-05-03 18:50:28 +00:00
Ralf Jung
eaf30cee7e ./miri run: support -v flag to print what it is doing 2024-05-03 20:31:27 +02:00
bors
dcf956c365 Auto merge of #3544 - RalfJung:rustup, r=RalfJung
Preparing for merge from rustc

Unblocks https://github.com/rust-lang/miri/pull/3526.
2024-05-03 18:18:27 +00:00
Ralf Jung
0de07d80ff Preparing for merge from rustc 2024-05-03 19:52:08 +02:00
bors
8a31014b9f Auto merge of #3542 - RalfJung:clippy-win, r=RalfJung
run clippy on a Windows host

Fixes https://github.com/rust-lang/miri/issues/3324
2024-05-03 17:45:09 +00:00
Ralf Jung
03589bfe98 run clippy on a Windows host 2024-05-03 19:36:33 +02:00
bors
5ce8532c26 Auto merge of #3537 - rust-lang:rustup-2024-05-03, r=RalfJung
Automatic Rustup
2024-05-03 06:34:17 +00:00
Ralf Jung
4af1ba0204 update lockfile 2024-05-03 08:10:16 +02:00
bors
3c6d194186 Auto merge of #3536 - tiif:add_rustbot_feat, r=RalfJung
Add rustbot claim feature

Add rustbot ``claim``, ``release-assignment`` and ``assign-user`` as mentioned in #3528.

rustbot issue assignment documentation: https://forge.rust-lang.org/triagebot/issue-assignment.html
pr trigger option documentation: https://forge.rust-lang.org/triagebot/pr-assignment.html#additional-new-pr-trigger-options
2024-05-03 06:02:10 +00:00
Ralf Jung
b348e41861
update comments and URL 2024-05-03 08:00:24 +02:00
The Miri Cronjob Bot
3e2164fef2 Merge from rustc 2024-05-03 05:03:41 +00:00
Urgau
f43e3e2023 Fix ignored tests for formatting 2024-05-04 12:37:30 +02:00
bors
d6d3b342e8 Auto merge of #124660 - matthiaskrgr:rollup-j8bfzfn, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #124461 (handle the targets that are missing in stage0)
 - #124492 (Generalize `adjust_from_tcx` for `Allocation`)
 - #124588 (Use `ObligationCtxt` in favor of `TraitEngine` in many more places)
 - #124612 (Add support for inputing via stdin with run-make-support)
 - #124613 (Allow fmt to run on rmake.rs test files)
 - #124649 (Fix HorizonOS build broken by #124210)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-03 15:37:22 +00:00
Matthias Krüger
a7f4a2edc6
Rollup merge of #124649 - Meziu:master, r=ChrisDenton
Fix HorizonOS build broken by #124210

HorizonOS (for the Tier-3 target `armv6k-nintendo-3ds`) does not support `dirfd()`, as many other similar targets.
2024-05-03 15:26:11 +02:00
Matthias Krüger
82030f2dd4
Rollup merge of #124613 - GuillaumeGomez:fmt-run-make, r=onur-ozkan
Allow fmt to run on rmake.rs test files

As discussed with `@jieyouxu,` `rmake.rs` from the `run-make` testsuite would benefit from being formatted as well.

Only thing needed to be done for it to work: allow support for `!` in our `rustfmt.toml` file parsing.

r? `@onur-ozkan`
2024-05-03 15:26:11 +02:00
Matthias Krüger
c27d3d5d2a
Rollup merge of #124612 - Urgau:run-make-stdin, r=jieyouxu
Add support for inputing via stdin with run-make-support

This PR adds the facility to set a input bytes that will be passed via the standard input.

This is useful for testing `rustc -` (and soon `rustdoc -`).

In #124611 took the approach of having a dedicated `run` method but it is not very convenient to use and would necessitate many functions, one for success, one for fail, ...

Instead this PR takes a different approach and allows setting the input bytes as if it were a parameter and when calling the (now custom) `output` function, we write the input bytes into stdin. I think this gives us maximum flexibility in the implementation and a simple interface for users.

To test this new logic I ported `tests/run-make/stdin-non-utf8/` to an `rmake.rs` one.

r? `@jieyouxu`
2024-05-03 15:26:10 +02:00
Matthias Krüger
08d9992812
Rollup merge of #124588 - compiler-errors:ocx, r=lcnr
Use `ObligationCtxt` in favor of `TraitEngine` in many more places

r? lcnr
2024-05-03 15:26:10 +02:00
Matthias Krüger
eaca729e0b
Rollup merge of #124492 - Strophox:adjust-allocbytes, r=RalfJung
Generalize `adjust_from_tcx` for `Allocation`

Previously, `adjust_from_tcx` would take an `Allocation` and "adjust allocation from the ones in `tcx` to a custom Machine instance [...]".
This PR generalizes this so the Machine instance can also determine the `Bytes` type of the output `Allocation`.

r? `@RalfJung`
2024-05-03 15:26:09 +02:00
Matthias Krüger
819a5f0546
Rollup merge of #124461 - onur-ozkan:followup-123546, r=pietroalbini
handle the targets that are missing in stage0

During sanity checks, we search for target names to determine if they exist in the compiler's built-in target list (`rustc --print target-list`). While a target name may be present in the stage2 compiler, it might not yet be included in stage0. This PR handles that difference.

Follow-up of https://github.com/rust-lang/rust/pull/123546
2024-05-03 15:26:08 +02:00
Strophox
38181cba79 remove trait bounds on AllocBytes 2024-05-03 15:00:37 +02:00
Strophox
235770c851 Cow::from(&*...) changed to Cow::Owned(Vec::from(...)) 2024-05-03 13:47:16 +02:00
Strophox
47e2cc2ea1 generalize adjust_from_tcx 2024-05-03 13:47:16 +02:00
bors
561b5dea1e Auto merge of #124646 - matthiaskrgr:rollup-crlsvg5, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #123480 (deref patterns: impl `DerefPure` for more std types)
 - #124412 (io safety: update Unix explanation to use `Arc`)
 - #124441 (String.truncate comment microfix (greater or equal))
 - #124594 (run-make-support: preserve tooks.mk behavior for EXTRACXXFLAGS)
 - #124604 (library/std: Remove unused `gimli-symbolize` feature)
 - #124607 (`rustc_expand` cleanups)
 - #124609 (variable-precision float operations can differ depending on optimization levels)
 - #124610 (Tweak `consts_may_unify`)
 - #124626 (const_eval_select: add tracking issue)
 - #124637 (AST pretty: Use `builtin_syntax` for type ascription)

Failed merges:

 - #124638 (Move some tests from `rustc_expand` to `rustc_parse`.)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-03 11:17:51 +00:00
Guillaume Gomez
8f47f9773d Allow fmt to run on rmake.rs test files 2024-05-03 11:05:58 +02:00
Guillaume Gomez
3d1062c1a4 Allow to negate ignored files 2024-05-03 11:04:05 +02:00
Andrea Ciliberti
bdf1eae360 Horizon OS: dirfd unavailable 2024-05-03 10:09:28 +02:00
Urgau
2c4214e0a0 run-make: port stdin-rustc to Rust-based rmake.rs 2024-05-03 08:09:57 +02:00
The Miri Cronjob Bot
aeef18043e Preparing for merge from rustc 2024-05-03 04:56:14 +00:00
Matthias Krüger
e6c82d9b59
Rollup merge of #124637 - fmease:ast-pretty-ty-asc-builtin-syn, r=compiler-errors
AST pretty: Use `builtin_syntax` for type ascription

Follow-up to #122806.
CC #124619.
2024-05-03 06:04:24 +02:00
Matthias Krüger
e2a53441b9
Rollup merge of #124626 - RalfJung:const_eval_select, r=joboet
const_eval_select: add tracking issue
2024-05-03 06:04:23 +02:00