| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
De-duplicate SSE2 sll/srl/sra code
|
|
|
|
|
|
passed to the driver
|
|
|
|
|
|
|
|
|
|
Signed-off-by: findseat <penglili@outlook.com>
|
|
r=RalfJung,oli-obk
Revert removing miri jobserver workaround
Reverts #123469.
r? ``@ghost``
|
|
This reverts commit af81ab762888eb04d01e9ad5269df5202d6a38b8.
|
|
Rollup of 8 pull requests
Successful merges:
- #122334 (Vendor rustc_codegen_gcc)
- #122894 (Move check for error in impl header outside of reporting)
- #123149 (Port argument-non-c-like-enum to Rust)
- #123311 (Match ergonomics: implement "`&`pat everywhere")
- #123350 (Actually use the inferred `ClosureKind` from signature inference in coroutine-closures)
- #123474 (Port `run-make/issue-7349` to a codegen test)
- #123489 (handle rustc args properly in bootstrap)
- #123496 (ping on wf changes, remove fixme)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Actually use the inferred `ClosureKind` from signature inference in coroutine-closures
A follow-up to https://github.com/rust-lang/rust/pull/123349, which fixes another subtle bug: We were not taking into account the async closure kind we infer during closure signature inference.
When I pass a closure directly to an arg like `fn(x: impl async FnOnce())`, that should have the side-effect of artificially restricting the kind of the async closure to `ClosureKind::FnOnce`. We weren't doing this -- that's a quick fix; however, it uncovers a second, more subtle bug with the way that `move`, async closures, and `FnOnce` interact.
Specifically, when we have an async closure like:
```
let x = Struct;
let c = infer_as_fnonce(async move || {
println!("{x:?}");
}
```
The outer closure captures `x` by move, but the inner coroutine still immutably borrows `x` from the outer closure. Since we've forced the closure to by `async FnOnce()`, we can't actually *do* a self borrow, since the signature of `AsyncFnOnce::call_once` doesn't have a borrowed lifetime. This means that all `async move` closures that are constrained to `FnOnce` will fail borrowck.
We can fix that by detecting this case specifically, and making the *inner* async closure `move` as well. This is always beneficial to closure analysis, since if we have an `async FnOnce()` that's `move`, there's no reason to ever borrow anything, so `move` isn't artificially restrictive.
|
|
Support running library tests in Miri
This adds a new bootstrap subcommand `./x.py miri` which can test libraries in Miri. This is in preparation for eventually doing that as part of bors CI, but this PR only adds the infrastructure, and doesn't enable it yet.
`@rust-lang/bootstrap` should this be `x.py test --miri library/core` or `x.py miri library/core`? The flag has the advantage that we don't have to copy all the arguments from `Subcommand::Test`. It has the disadvantage that most test steps just ignore `--miri` and still run tests the regular way. For clippy you went the route of making it a separate subcommand. ~~I went with a flag now as that seemed easier, but I can change this.~~ I made it a new subcommand. Note however that the regular cargo invocation would be `cargo miri test ...`, so `x.py` is still going to be different in that the `test` is omitted. That said, we could also make it `./x.py miri-test` to make that difference smaller -- that's in fact more consistent with the internal name of the command when bootstrap invokes cargo.
`@rust-lang/libs` ~~unfortunately this PR does some unholy things to the `lib.rs` files of our library crates.~~
`@m-ou-se` found a way that entirely avoids library-level hacks, except for some new small `lib.miri.rs` files that hopefully you will never have to touch. There's a new hack in cargo-miri but there it is in good company...
|
|
socketpair
|
|
|
|
also `move`
|
|
coroutine-closures
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
their FD types
|
|
shims/unix: split general FD management from FS access
`fd.rs` was a mix of general file descriptor infrastructure and file system access. Split those things up properly.
Also add a `socket.rs` file where support for sockets can go eventually. For now it just contains the socketpair stub.
|
|
|
|
Fix capture analysis for by-move closure bodies
The check we were doing to figure out if a coroutine was borrowing from its parent coroutine-closure was flat-out wrong -- a misunderstanding of mine of the way that `tcx.closure_captures` represents its captures.
Fixes #123251 (the miri/ui test I added should more than cover that issue)
r? `@oli-obk` -- I recognize that this PR may be underdocumented, so please ask me what I should explain further.
|
|
|
|
|
|
rename ptr::from_exposed_addr -> ptr::with_exposed_provenance
As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/To.20expose.20or.20not.20to.20expose/near/427757066).
The old name, `from_exposed_addr`, makes little sense as it's not the address that is exposed, it's the provenance. (`ptr.expose_addr()` stays unchanged as we haven't found a better option yet. The intended interpretation is "expose the provenance and return the address".)
The new name nicely matches `ptr::without_provenance`.
|
|
|
|
|
|
Refactor the way bootstrap invokes `cargo miri`
Instead of basically doing `cargo run --manifest-path=<cargo-miri's manifest> -- miri`, let's invoke the `cargo-miri` binary directly. That means less indirections, and also makes it easier to e.g. run the libcore test suite in Miri. (But there are still other issues with that.)
Also also adjusted Miri's stage numbering so that it is consistent with rustc/rustdoc.
This also makes `./x.py test miri` honor `--no-doc`.
And this fixes https://github.com/rust-lang/rust/issues/123177 by moving where we handle parallel_compiler.
|
|
|
|
|
|
looks like the M1 runners don't like it when the cache was created on x86
also reorder the lines to be more semantically grouped
|
|
|
|
speed up Windows CI
The many-seeds test is taking 15 minutes. Let's just run that only once instead of many times on Windows.
Also refactor the CI script to make the caller control which tests are being run.
|
|
|
|
|
|
|
|
|
|
|