Skip to content

Rollup of 3 pull requests#158087

Closed
jhpratt wants to merge 10 commits into
rust-lang:mainfrom
jhpratt:rollup-ivPSKIy
Closed

Rollup of 3 pull requests#158087
jhpratt wants to merge 10 commits into
rust-lang:mainfrom
jhpratt:rollup-ivPSKIy

Conversation

@jhpratt

@jhpratt jhpratt commented Jun 18, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

P8L1 and others added 10 commits May 28, 2026 16:23
* Handle generic reborrow in expression-use adjustment walking
* Require generic reborrow to be terminal in adjustment walks
Co-authored-by: Timo <30553356+y21@users.noreply.github.com>
`accept` can return an error that belongs to a single incoming
connection, not to the listener itself, for example a connection
aborted by the peer before it could be accepted. The listener stays
usable in that case, so code serving a long-lived listener usually
wants to log the error and keep accepting connections rather than
treat it as fatal. This was previously undocumented.

- Add an `# Errors` section to `accept` that describes this behavior
  without listing specific error codes.
- Note that `Interrupted` errors are retried internally on Unix.
- Point `incoming` and `into_incoming` at `accept` for the same
  details.
…-visitor, r=dingxiangfei2009

Handle generic reborrow in expression-use adjustment walking

Fixes an ICE in expression-use adjustment walking where `Adjust::GenericReborrow` could reach a match arm that assumed generic reborrow was unreachable.

`GenericReborrow` is already emitted by typeck and classified as rvalue-producing elsewhere in `expr_use_visitor.rs`, so the adjustment walker must handle it explicitly instead of panicking.

This PR models `GenericReborrow` as a borrow-like use of the source expression:
- `Mutability::Mut` is treated like an exclusive/mutable reborrow use.
- `Mutability::Not` is treated like a shared/coerce-shared borrow-like use.
- The source is not moved or treated as a mere copy.

cc @aapoalas
@rustbot label F-reborrow
Fixes rust-lang#156339
Tracking: rust-lang#145612
…orrow-source-unsafety, r=dingxiangfei2009

Fix reborrow source expression visits

Fixes rust-lang#158033
…rrors, r=Darksonn

Document transient connection errors from TcpListener::accept

`TcpListener::accept` can return an error that belongs to a single incoming
connection, not to the listener, for example a connection aborted by the peer
before it could be accepted (`ConnectionAborted`). The listener stays usable, so
a server looping over connections usually wants to log the error and keep
accepting rather than treat it as fatal. This was not documented, and the
`incoming` example treated every error as a failed connection.

This implements the libs-team decision in rust-lang#142557: document these transient
errors instead of changing `accept` to retry them, since retrying would hide
errors that some callers want to observe.

Changes:
- Add an `# Errors` section to `accept` describing this behavior, without
  listing specific error codes since some may be more permanent than others.
- Note that `Interrupted` errors are retried internally on Unix.
- Add the same pointer to `incoming` and `into_incoming`, which are `accept`
  in a loop.

Addresses rust-lang#142557.

r? rust-lang/libs
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 18, 2026
@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 18, 2026
@jhpratt

jhpratt commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 41cf3cd has been approved by jhpratt

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 Jun 18, 2026
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 18, 2026
@rust-bors

rust-bors Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 18, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Doubling the size of the rollup
#158094

@jhpratt jhpratt deleted the rollup-ivPSKIy branch June 18, 2026 18:19
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 S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants