Skip to content

Option, Result: not all arguments passed to map_or are eagerly evaluated - #163376

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:map_or
Sep 26, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:map_or

Conversation

@RalfJung

Copy link
Copy Markdown
Member

The 2nd argument is a closure, which is lazily evaluated. I this this text was copied from other methods like ok_or that only have a single argument.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 26, 2026
@rustbot

rustbot commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 12 candidates
  • Random selection from 6 candidates

@hanna-kruppe

Copy link
Copy Markdown
Contributor

r? me @bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9fdcfdd has been tentatively approved by hanna-kruppe

It will be put into the queue for this repository once PR CI succeeds.

@rustbot rustbot assigned hanna-kruppe and unassigned JohnTitor Sep 26, 2026
@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 Sep 26, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #150824 (Document platform-specific behavior of `current_exe`, including that Linux can add `" (deleted)"`)
 - #159564 (Allow elided ('static) lifetimes in `thread_local!`)
 - #163026 (hir_typeck: simplify `upvar::determine_capture_info` impl)
 - #163256 (Document `rustc_abi::VariantLayout`)
 - #163366 (Stabilize SyncView)
 - #163376 (Option, Result: not all arguments passed to map_or are eagerly evaluated)
rust-bors Bot pushed a commit that referenced this pull request Sep 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #150824 (Document platform-specific behavior of `current_exe`, including that Linux can add `" (deleted)"`)
 - #159564 (Allow elided ('static) lifetimes in `thread_local!`)
 - #163026 (hir_typeck: simplify `upvar::determine_capture_info` impl)
 - #163256 (Document `rustc_abi::VariantLayout`)
 - #163366 (Stabilize SyncView)
 - #163376 (Option, Result: not all arguments passed to map_or are eagerly evaluated)
@rust-bors
rust-bors Bot merged commit ea2a3d8 into rust-lang:main Sep 26, 2026
13 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Sep 26, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 26, 2026
Rollup merge of #163376 - RalfJung:map_or, r=hanna-kruppe

Option, Result: not all arguments passed to map_or are eagerly evaluated

The 2nd argument is a closure, which is lazily evaluated. I this this text was copied from other methods like `ok_or` that only have a single argument.
@RalfJung
RalfJung deleted the map_or branch September 27, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants