Return opaque type from PanicInfo::message()
This changes the return type of the (unstable) PanicInfo::message() method to an opaque type (that implements Display). This allows for a bit more flexibility in the future.
See https://github.com/rust-lang/rust/issues/66745
Migrate `extern-flag-fun`, `incremental-debugger-visualiser` and `incremental-session-fail` `run-make` tests to `rmake.rs`
Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
try-job: arm-android
try-job: armhf-gnu
try-job: test-various
try-job: x86_64-msvc
try-job: dist-i686-mingw
Migrate `link-arg`, `link-dedup` and `issue-26092` `run-make` tests to `rmake` format
Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
All of these tests check if rustc's output contains (or does not) contain certain strings. Does that mean these could be better suited to becoming UI/codegen tests?
try-job: x86_64-msvc
Update books
## rust-lang/book
5 commits in 5228bfac8267ad24659a81b92ec5417976b5edbc..45c1a6d69edfd1fc91fb7504cb73958dbd09441e
2024-06-14 16:25:20 UTC to 2024-06-11 13:43:29 UTC
- Convert Chapters 12-14 (rust-lang/book#3959)
- Fix a typo in `ADMIN_TASKS` (rust-lang/book#3958)
- Swap inconsistent `assert_eq!` argument order in testing chapter (rust-lang/book#3497)
- Convert chapter 11 to use Listing component (rust-lang/book#3955)
- Convert ch02 and ch03 listings to `<Listing>` (rust-lang/book#3926)
## rust-lang/edition-guide
5 commits in bbaabbe088e21a81a0d9ae6757705020d5d7b416..cb58c430b4e8054c2cb81d2d4434092c482a93d8
2024-06-13 16:52:10 UTC to 2024-06-06 21:19:03 UTC
- Merge PR #307: Add IntoIterator for Box<[T]> in 2024
- "cargo fix" now removes "extern crate" statements (rust-lang/edition-guide#305)
- typo (rust-lang/edition-guide#306)
- Remove public/private dependencies from 2024 (rust-lang/edition-guide#303)
- Add stub for macro fragment matcher updates (rust-lang/edition-guide#302)
## rust-lang/reference
1 commits in 6019b76f5b28938565b251bbba0bf5cc5c43d863..0b805c65804019b0ac8f2fe3117afad82a6069b8
2024-06-07 16:06:44 UTC to 2024-06-07 16:06:44 UTC
- union syntax fix for empty field list (rust-lang/reference#1509)
## rust-lang/rust-by-example
4 commits in 4840dca06cadf48b305d3ce0aeafde7f80933f80..b1d97bd6113aba732b2091ce093c76f2d05bb8a0
2024-06-17 12:45:15 UTC to 2024-06-06 11:44:38 UTC
- Update ja.po and mdbook-i18n-helpers (rust-lang/rust-by-example#1863)
- Fix typo (rust-lang/rust-by-example#1861)
- Update instruction to add language entry of TRANSLATING.md (rust-lang/rust-by-example#1860)
- Incorrect variable name according to comments (rust-lang/rust-by-example#1858)
## rust-lang/rustc-dev-guide
10 commits in 6a7374bd87cbac0f8be4fd4877d8186d9c313985..aec82168dd3121289a194b381f56076fc789a4d2
2024-06-16 06:39:57 UTC to 2024-06-04 05:31:05 UTC
- tell about `STAGE0_MISSING_TARGETS` for new targets (rust-lang/rustc-dev-guide#1996)
- Rewrite CI documentation (rust-lang/rustc-dev-guide#1972)
- Compiletest docs for recently-added features (rust-lang/rustc-dev-guide#1994)
- Add {{target}} to header substitutions (rust-lang/rustc-dev-guide#1995)
- run-make: add tip about quick-compile with stage0 rustc (rust-lang/rustc-dev-guide#1993)
- Mention `COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS` in `needs-llvm-components` documentation (rust-lang/rustc-dev-guide#1990)
- Add run-make port initiative to the Recurring work section (rust-lang/rustc-dev-guide#1992)
- Document the `//@ unused-revision-names:` test header (rust-lang/rustc-dev-guide#1991)
- Fix dead links (rust-lang/rustc-dev-guide#1988)
- use `&` to load completions for PowerShell (rust-lang/rustc-dev-guide#1978)
Rename `InstanceDef` -> `InstanceKind`
Renames `InstanceDef` to `InstanceKind`. The `Def` here is confusing, and makes it hard to distinguish `Instance` and `InstanceDef`. `InstanceKind` makes this more obvious, since it's really just describing what *kind* of instance we have.
Not sure if this is large enough to warrant a types team MCP -- it's only 53 files. I don't personally think it does, but happy to write one if anyone disagrees. cc ``@rust-lang/types``
r? types
Pass target to some run-make tests
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
While trying to enable riscv64gc in https://github.com/rust-lang/rust/pull/125669, I noticed several tests failing in https://github.com/rust-lang/rust/actions/runs/9454116367/job/26040977376. I spoke a bit with `@pietroalbini` and he recommended this approach to resolving the issue.
This PR interacts with https://github.com/rust-lang/rust/pull/126279, and it is likely preferable that https://github.com/rust-lang/rust/pull/126279 merges and my changes in ae769f930e2510e57ed8bd379b1b2d393b2312c3 get removed from this PR.
## Testing
> [!NOTE]
> `riscv64gc-unknown-linux-gnu` is a [**Tier 2 with Host Tools** platform](https://doc.rust-lang.org/beta/rustc/platform-support.html), all tests may not necessarily pass! There is work in https://github.com/rust-lang/rust/pull/125220 which helps fix several related tests.
You can test out the renamed job:
```sh
DEPLOY=1 ./src/ci/docker/run.sh riscv64gc-gnu
```
`DEPLOY=1` helps reproduce the CI's environment and also avoids the chance of a `llvm-c/BitReader.h` error (detailed in https://github.com/rust-lang/rust/issues/85424 and https://github.com/rust-lang/rust/issues/56650).
<details>
<summary>tests/run-make/inaccessible-temp-dir failure</summary>
```bash
---- [run-make] tests/run-make/inaccessible-temp-dir stdout ----
# ...
--- stdout -------------------------------
# Create an inaccessible directory
mkdir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible
chmod 000 /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible
# Run rustc with `-Ztemps-dir` set to a directory
# *inside* the inaccessible one, so that it can't create it
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir -Ainternal_features -Clinker='riscv64-linux-gnu-gcc' program.rs -Ztemps-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible/tmp 2>&1 \
| "/checkout/src/etc/cat-and-grep.sh" 'failed to find or create the directory specified by `--temps-dir`'
[[[ begin stdout ]]]
error: linking with `riscv64-linux-gnu-gcc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "riscv64-linux-gnu-gcc" "-m64" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/rustcHHUPmd/symbols.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible/tmp/program.program.45572bc5f2b14090-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible/tmp/program.dv9uftjrq86w5xa7l2eo7g9l7.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e6e3c30ae61f5a31.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4f01f359c61a0a5e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-02c7b58963139ffd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-b66d5aea60ed3c58.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-5208f104036103e4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-fdc5183e4f6dcbdd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-eab0987d4aea0945.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ef07c8021adbf53.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-35ca031413717e66.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-9bf8f545a9224c8a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-d6c6aeb7f3b89252.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-80de6049595b0062.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-49619208c34115e6.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b4719719d9691028.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-279763368bc9fa45.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-86a2a7591afd1d37.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-d0bf37205fb9f76a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-70719e8645e6f000.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-97c640fd5e54ed4c.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/program" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: riscv64-linux-gnu-gcc: error: unrecognized command-line option '-m64'
error: aborting due to 1 previous error
[[[ end stdout ]]]
Error: cannot match: failed to find or create the directory specified by `--temps-dir`
------------------------------------------
--- stderr -------------------------------
make: *** [Makefile:26: all] Error 1
------------------------------------------
```
</details>
<details>
<summary>tests/run-make/issue-47551 failure</summary>
```bash
---- [run-make] tests/run-make/issue-47551 stdout ----
# ...
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551 -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551 -Ainternal_features -Clinker='riscv64-linux-gnu-gcc' eh_frame-terminator.rs
------------------------------------------
--- stderr -------------------------------
error: linking with `riscv64-linux-gnu-gcc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "riscv64-linux-gnu-gcc" "-m64" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551/rustcL9WAHK/symbols.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551/eh_frame-terminator.eh_frame_terminator.de96000750278472-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551/eh_frame-terminator.11u7alf4d09fd9gei30vk4yzn.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e6e3c30ae61f5a31.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4f01f359c61a0a5e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-02c7b58963139ffd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-b66d5aea60ed3c58.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-5208f104036103e4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-fdc5183e4f6dcbdd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-eab0987d4aea0945.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ef07c8021adbf53.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-35ca031413717e66.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-9bf8f545a9224c8a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-d6c6aeb7f3b89252.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-80de6049595b0062.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-49619208c34115e6.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b4719719d9691028.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-279763368bc9fa45.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-86a2a7591afd1d37.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-d0bf37205fb9f76a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-70719e8645e6f000.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-97c640fd5e54ed4c.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551/eh_frame-terminator" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: riscv64-linux-gnu-gcc: error: unrecognized command-line option '-m64'
error: aborting due to 1 previous error
make: *** [Makefile:7: all] Error 1
------------------------------------------
failures:
[run-make] tests/run-make/inaccessible-temp-dir
[run-make] tests/run-make/issue-47551
test result: FAILED. 151 passed; 2 failed; 201 ignored; 0 measured; 0 filtered out; finished in 59.77s
Some tests failed in compiletest suite=run-make mode=run-make host=x86_64-unknown-linux-gnu target=riscv64gc-unknown-linux-gnu
Build completed unsuccessfully in 1:03:01
local time: Mon Jun 10 20:20:39 UTC 2024
network time: Mon, 10 Jun 2024 20:20:39 GMT
</details>
try-job: riscv64gc-gnu
fix checking git submodules during a commit hook
Fixes https://github.com/rust-lang/rust/issues/125954
The one thing that still puzzles me is why this only is a problem with worktrees.
r? `@onur`
Rollup of 3 pull requests
Successful merges:
- #126568 (mark undetermined if target binding in current ns is not got)
- #126577 (const_refs_to_static test and cleanup)
- #126584 (Do not ICE in privacy when type inference fails.)
r? `@ghost`
`@rustbot` modify labels: rollup
const_refs_to_static test and cleanup
r? ``@RalfJung``
test the existing behaviour of adt_const_params combined with const_refs_to_static.
also remove a dead error variant about consts referring to statics
Consistently use subtyping in method resolution
fixes#126062
An earlier version of this PR modified how we compute variance, but the root cause was an inconsistency between the usage of `eq` and `sub`, where we assumed that the latter passing implies the former will pass.
r? `@compiler-errors`
Rollup of 3 pull requests
Successful merges:
- #126226 (Make suggestion to change `Fn` to `FnMut` work with methods as well)
- #126570 (Convert a `span_bug` to a `span_delayed_bug`.)
- #126580 (Add `run-make/const_fn_mir` missing test annotation)
r? `@ghost`
`@rustbot` modify labels: rollup
Convert a `span_bug` to a `span_delayed_bug`.
PR #121208 converted this from a `span_delayed_bug` to a `span_bug` because nothing in the test suite caused execution to hit this path. But now fuzzing has found a test case that does hit it. So this commit converts it back to `span_delayed_bug` and adds the relevant test.
Fixes#126385.
r? `@lcnr`
Make suggestion to change `Fn` to `FnMut` work with methods as well
Fixes#125325
The issue occurred because the code that emitted the suggestion to change `Fn` to `FnMut` worked only for function calls and not method calls. This PR makes it work with methods as well.
More preparation for new trait solver uplifting
Getting closer to being able to uplift the whole solver 🙏
Each commit should be self-justifying.
r? lcnr
PR #121208 converted this from a `span_delayed_bug` to a `span_bug`
because nothing in the test suite caused execution to hit this path. But
now fuzzing has found a test case that does hit it. So this commit
converts it back to `span_delayed_bug` and adds the relevant test.
Fixes#126385.
Rollup of 8 pull requests
Successful merges:
- #125258 (Resolve elided lifetimes in assoc const to static if no other lifetimes are in scope)
- #126250 (docs(change): Don't mention a Cargo 2024 edition change for 1.79)
- #126288 (doc: Added commas where needed)
- #126346 (export std::os::fd module on HermitOS)
- #126468 (div_euclid, rem_euclid: clarify/extend documentation)
- #126531 (Add codegen test for `Request::provide_*`)
- #126535 (coverage: Arrange span extraction/refinement as a series of passes)
- #126538 (coverage: Several small improvements to graph code)
r? `@ghost`
`@rustbot` modify labels: rollup
coverage: Several small improvements to graph code
This PR combines a few small improvements to coverage graph handling code:
- Remove some low-value implementation tests that were getting in the way of other changes.
- Clean up `pub` visibility.
- Flatten some code using let-else.
- Prefer `.copied()` over `.cloned()`.
`@rustbot` label +A-code-coverage
coverage: Arrange span extraction/refinement as a series of passes
The old code for extracting/refining coverage spans from MIR has been dismantled and split up into several passes (e.g. see #126294), but because this was done incrementally, the resulting code is disorganised.
This PR addresses that by moving the main control-flow into a single function (`coverage::spans::extract_refined_covspans`) that more clearly shows the process as a series of separate steps, most delegated to helper functions in the same file.
This should make it easier to understand and modify the refinement process. It also means that submodule `from_mir` is now only concerned with the details of extracting relevant spans from the various kinds of MIR statement/terminator.
There should be no change to the resulting coverage maps, as demonstrated by the lack of changes to tests.
Add codegen test for `Request::provide_*`
Codegen before & after https://github.com/rust-lang/rust/pull/126242: https://gist.github.com/slanterns/3789ee36f59ed834e1a6bd4677b68ed4.
Also adjust an outdated comment since `tag_id` is no longer attached to `TaggedOption` via `Erased`, but stored next to it in `Tagged` under the new implementation.
My first time writing FileCheck xD. Correct me if there is anything that should be amended.
r? libs
export std::os::fd module on HermitOS
The HermitOS' IO interface is similiar to Unix. Consequently, this PR synchronize the FD implementation between both.
closes#126198
doc: Added commas where needed
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->