Skip to content

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Oct 20, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

joshtriplett and others added 13 commits October 5, 2025 10:23
This simplifies the initial conditional, and will allow reusing the
variable in subsequent checks.
This suppresses warnings on things like `Result<(), !>`, which helps
simplify code using the common pattern of having an `Error` associated
type: code will only have to check the error if there is a possibility
of error.
This makes it easier to review without cross-referencing each test
function with its invocation.
…r=lcnr,petrochenkov

Deny-by-default never type lints

In Rust [1.89.0](https://github.com/rust-lang/rust/milestone/133) we started emitting these lints in dependencies. I discussed the future steps with `@lcnr` and we think that before stabilizing the never type (and doing the breaking changes) we should deny the lints for ~4 releases.

This PR marks `never_type_fallback_flowing_into_unsafe` and `dependency_on_unit_never_type_fallback` lints as deny-by-default.

Tracking:

- rust-lang#35121

Related:

- rust-lang#141937
…e-result-unit-uninhabited, r=fmease

unused_must_use: Don't warn on `Result<(), Uninhabited>` or `ControlFlow<Uninhabited, ()>`

This suppresses warnings on things like `Result<(), !>`, which helps simplify code using the common pattern of having an `Error` associated type: code will only have to check the error if there is a possibility of error.

This will, for instance, help with future refactorings of `write!` in the standard library.

As this is a user-visible change to lint behavior, it'll require a lang FCP.

---

My proposal, here, is that we handle this simple case to make common patterns more usable. This does not rule out the possibility of adding more cases in the future, including general trait-based cases. However, I don't think we should make this common case wait on the more general cases. In particular, this solution does not close any doors on replacing this special case with a general case.

This would unblock some planned work in the standard library to make `write!` more usable for infallible cases (e.g. writing into a `Vec` or `String`).
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Oct 20, 2025
@Zalathar
Copy link
Contributor Author

Rollup of everything not in #147892.

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Oct 20, 2025

📌 Commit acd42f6 has been approved by Zalathar

It is now in the queue for this repository.

@bors bors 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 Oct 20, 2025
@bors
Copy link
Collaborator

bors commented Oct 20, 2025

⌛ Testing commit acd42f6 with merge 7451f9f...

bors added a commit that referenced this pull request Oct 20, 2025
Rollup of 2 pull requests

Successful merges:

 - #146167 (Deny-by-default never type lints)
 - #147382 (unused_must_use: Don't warn on `Result<(), Uninhabited>` or `ControlFlow<Uninhabited, ()>`)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

error: test failed, to rerun pass `-p std --test sync`
Bootstrap failed while executing `test --stage 2 --skip=compiler --skip=src`
Build completed unsuccessfully in 2:08:48
make: *** [Makefile:123: ci-mingw-x] Error 1
  local time: Mon Oct 20 05:09:54 CUT 2025
  network time: Mon, 20 Oct 2025 05:09:55 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@bors
Copy link
Collaborator

bors commented Oct 20, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 20, 2025
@Zalathar
Copy link
Contributor Author

Looks flaky.

@Zalathar Zalathar closed this Oct 20, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 20, 2025
@Zalathar Zalathar deleted the rollup-gzveh7z branch October 20, 2025 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup T-compiler Relevant to the compiler 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