Skip to content

Rollup of 7 pull requests - #164939

Closed
JonathanBrouwer wants to merge 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Vx3MqwX
Closed

JonathanBrouwer wants to merge 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Vx3MqwX

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

Warning

This rollup conflicts with pending auto build #164928 and may need to be recreated if the pending build succeeds.

r? @ghost

Create a similar rollup

sorairolake and others added 18 commits October 19, 2026 08:38
- compiletest detects crash as an error code > 127.
- This does not work for UEFI, since UEFI errors are usize by default,
  and when converting to i32, we just remove the bits in middle. Eg:
  0x8000000000000007 becomes 0x80000007
- So in case of crash, we get a negetive value as error  instead of
  the expected signal when the host is linux.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
…acrum

tools: remote-test-server: Fix UEFI crash return code

- compiletest detects crash as an error code > 127.
- This does not work for UEFI, since UEFI errors are usize by default, and when converting to i32, we just remove the bits in middle. Eg: 0x8000000000000007 becomes 0x80000007
- So in case of crash, we get a negetive value as error  instead of the expected signal when the host is linux.
…d-return-type, r=ChrisDenton

feat!: change return type of `TryFromIntError::kind`

- Tracking issue: rust-lang#153978

Change the return type from `&IntErrorKind` to `IntErrorKind`.

Since [`IntErrorKind`](https://doc.rust-lang.org/core/num/enum.IntErrorKind.html) implements the `Copy` trait, I think it should be fine to return an owned type. Returning a reference type is appropriate when we want to ensure the return type matches [`ParseIntError::kind`](https://doc.rust-lang.org/core/num/struct.ParseIntError.html#method.kind).
Switch from `insta` to `expect-test` in bootstrap

While I like `insta` a bit more for snapshot tests, it has a disadvantage that it requires installing a separate binary (`cargo insta`) for blessing *inline* snapshot tests. That is not very intuitive for people who need to bless inline bootstrap snapshots, and then realize that `x test bootstrap --bless` does nothing.

This PR switches from `insta` to `expect-test`, which allows updating inline snapshots via an environment variable while running `cargo test`, without requiring a separate binary. `expect-test` is a `rust-lang` (well, `rust-analyzer`) [repository](https://github.com/rust-analyzer/expect-test), so we should be good there, and it even removes two `dev` dependencies from bootstrap.

Changing the inline snapshots was a bit non-trivial to do with a regex (at least in my IDE) because we have to switch the argument order, which is not that simple across multiple lines. So I decided to try https://github.com/ast-grep/ast-grep. I used an LLM to propose the initial rewrite rule, and then modified it slightly and ran `ast-grep` to update the code. The applied rule was this:
```yaml
id: insta-to-expect-test
language: rust
rule:
  pattern: insta::assert_snapshot!($$$ARGS)
transform:
  LHS:
    replace:
      source: $$$ARGS
      replace: '(?s)^(?<lhs>.*?),\s*@(?<rhs>.*?)\s*,?\s*$'
      by: '${lhs}'
  RHS:
    replace:
      source: $$$ARGS
      replace: '(?s)^(?<lhs>.*?),\s*@(?<rhs>.*?)\s*,?\s*$'
      by: '${rhs}'
fix: expect_test::expect![[$RHS]].assert_eq(&$LHS)
```

You can test it in the `ast-grep` [playground](https://ast-grep.github.io/playground.html#eyJtb2RlIjoiQ29uZmlnIiwibGFuZyI6InJ1c3QiLCJxdWVyeSI6IiIsInJld3JpdGUiOiJzb3VyY2U6ICQkJEFSR1NcbnJlcGxhY2U6ICcoP3MpXig/PGxocz4uKj8pLFxccypAKD88cmhzPi4qPylcXHMqLD9cXHMqJCdcbmJ5OiAnJHtyaHN9JyIsInN0cmljdG5lc3MiOiJzbWFydCIsInNlbGVjdG9yIjoiIiwiY29uZmlnIjoiaWQ6IGluc3RhLXRvLWV4cGVjdC10ZXN0XG5sYW5ndWFnZTogcnVzdFxucnVsZTpcbiAgcGF0dGVybjogaW5zdGE6OmFzc2VydF9zbmFwc2hvdCEoJCQkQVJHUylcbnRyYW5zZm9ybTpcbiAgTEhTOlxuICAgIHJlcGxhY2U6XG4gICAgICBzb3VyY2U6ICQkJEFSR1NcbiAgICAgIHJlcGxhY2U6ICcoP3MpXig/PGxocz4uKj8pLFxccypAKD88cmhzPi4qPylcXHMqLD9cXHMqJCdcbiAgICAgIGJ5OiAnJHtsaHN9J1xuICBSSFM6XG4gICAgcmVwbGFjZTpcbiAgICAgIHNvdXJjZTogJCQkQVJHU1xuICAgICAgcmVwbGFjZTogJyg/cyleKD88bGhzPi4qPyksXFxzKkAoPzxyaHM+Lio/KVxccyosP1xccyokJ1xuICAgICAgYnk6ICcke3Joc30nXG5maXg6IGV4cGVjdF90ZXN0OjpleHBlY3QhWyRSSFNdLmFzc2VydF9lcSgmJExIUykiLCJzb3VyY2UiOiJpbnN0YTo6YXNzZXJ0X3NuYXBzaG90IShcbiAgICAgICAgICAgIGN0eC5jb25maWcoXCJidWlsZFwiKVxuICAgICAgICAgICAgICAgIC5yZW5kZXJfc3RlcHMoKSwgQHJcIlxuICAgICAgICBbYnVpbGRdIGxsdm0gPGhvc3Q+XG4gICAgICAgIFtidWlsZF0gcnVzdGMgMCA8aG9zdD4gLT4gcnVzdGMgMSA8aG9zdD5cbiAgICAgICAgW2J1aWxkXSBydXN0YyAxIDxob3N0PiAtPiBzdGQgMSA8aG9zdD5cbiAgICAgICAgW2J1aWxkXSBydXN0ZG9jIDEgPGhvc3Q+XG4gICAgICAgIFwiLFxuICAgICAgICApOyJ9).

I used double brackets because it formatted better (IMO) with `x fmt`. Most of the diff comes from the this mechanical change. I split it into a separate commit for easier review.

I tried to replicate the disk snapshots as closely as possible, by even including the source file path in them, though I think it is not very useful. There are some newline changes in a few tests, I didn't feel like it is worth fixing those.

CC @Zalathar

I suppose that we should do the same for `citool`, I can send that as a follow-up.

Fixes: rust-lang#164837
…nilla

Add regression test for CoerceShared impl with unnormalizable target

Fixes rust-lang#156699

The ICE was fixed by rust-lang#158659
Add regression test for self referential inherent associated type ICE

Fixes rust-lang#157774
…l-tests, r=Urgau

Cleanup `rustdoc-html` tests

r? @Urgau
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 26, 2026
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Oct 26, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants