Skip to content

Rollup of 5 pull requests#153311

Closed
JonathanBrouwer wants to merge 13 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-ElCkBvj
Closed

Rollup of 5 pull requests#153311
JonathanBrouwer wants to merge 13 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-ElCkBvj

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

arferreira and others added 13 commits February 24, 2026 00:04
The behavior in the test case matches rustc's:

    test-dingus % ls
    main.rs
    test-dingus % mkdir foobar
    test-dingus % rustc --emit=dep-info main.rs --out-dir=foobar
    test-dingus % ls
    foobar  main.rs
    test-dingus % ls foobar
    main.d
    test-dingus % rustc --emit=dep-info=testfile.d main.rs --out-dir=foobar
    test-dingus % ls
    foobar          main.rs         testfile.d
    test-dingus % ls foobar
    main.d
This refactor will make an upcoming change smaller, and also adds
exhaustive matching.
This adds a variant `NoneWithError` to AST and HIR representations of
the “rest” or “tail”, which is currently always treated identically to
the `None` variant.
This prevents spurious errors when a field is intended to be present
but a preceding syntax error caused it not to be parsed. For example,

    StructName { foo: 1 bar: 2 }

will not successfully parse a field `bar`, and we will report the syntax
error but not the missing field.
The HermitCore name was dropped a while ago, the project is now simply
called "Hermit".
The HermitCore name was dropped a while ago, the project is now simply
called "Hermit".
prefer actual ABI-controling fields over target.abi when making ABI decisions

We don't actually check that `abi` is consistent with the fields that control the ABI, e.g. one could set `llvm_abiname` to "ilp32e" on a riscv target without setting a matching `abi`. So, if we need to make actual decisions, better to use the source of truth we forward to LLVM than the informational string we forward to the user.

This is a breaking change for aarch64 JSON target specs: setting `abi` to "softfloat" is no longer enough; one has to also set `rustc_abi` to "softfloat". That is consistent with riscv and arm32, but it's still surprising. Cc @Darksonn in case this affects the Linux kernel.

Also see rust-lang#153035 which does something similar for PowerPC, and [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/575095372). Happy to delay this PR if someone has a better idea.

Cc @folkertdev @workingjubilee
…ebank

Don’t report missing fields in struct exprs with syntax errors.

@Noratrieb [told me](https://internals.rust-lang.org/t/custom-cargo-command-to-show-only-errors-avoid-setting-rustflags-every-time/24032/7?u=kpreid) that “it is a bug if this recovery causes follow-up errors that would not be there if the user fixed the first error.” So, here’s a contribution to hide a follow-up error that annoyed me recently.

Specifically, if the user writes a struct literal with a syntax error, such as

```rust
StructName { foo: 1 bar: 2 }
```

the compiler will no longer report that the field `bar` is missing in addition to the syntax error.

This is my first time attempting any change to the parser or AST; please let me know if there is a better way to do what I’ve done here. ~~The part I’m least happy with is the blast radius of adding another field to `hir::ExprKind::Struct`, but this seems to be in line with the style of the rest of the code. (If this were my own code, I would consider changing `hir::ExprKind::Struct` to a nested struct, the same way it is in `ast::ExprKind`.)~~ The additional information is now stored as an additional variant of `ast::StructRest` / `hir::StructTailExpr`.

**Note to reviewers:** I recommend reviewing each commit separately, and in the case of the first one with indentation changes ignored.
rustdoc: make `--emit` and `--out-dir` mimic rustc

The behavior in the test case matches rustc's:

    test-dingus % ls
    main.rs
    test-dingus % mkdir foobar
    test-dingus % rustc --emit=dep-info main.rs --out-dir=foobar
    test-dingus % ls
    foobar  main.rs
    test-dingus % ls foobar
    main.d
    test-dingus % rustc --emit=dep-info=testfile.d main.rs --out-dir=foobar
    test-dingus % ls
    foobar          main.rs         testfile.d
    test-dingus % ls foobar
    main.d

CC rust-lang#146220 (comment)
…ostic, r=Kivooeo

Remove unhelpful hint from trivial bound errors

The `= help: see issue rust-lang#48214` hint on trivial bound errors isn't useful, most users hitting these errors aren't trying to use the `trivial_bounds` feature. The `disabled_nightly_features` call already handles suggesting the feature gate on nightly.

Closes rust-lang#152872
Update the name of the Hermit operating system

The HermitCore name was dropped a while ago, the project is now simply called "Hermit". See for example [the website](https://hermit-os.org/).

cc @stlankes @mkroening
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 2, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs O-hermit Operating System: Hermit S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Mar 2, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 2, 2026

📌 Commit 1541080 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs O-hermit Operating System: Hermit rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants