Skip to content

Update example code of std::array::from_fn#156354

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
lms0806:issue_156102
May 9, 2026
Merged

Update example code of std::array::from_fn#156354
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
lms0806:issue_156102

Conversation

@lms0806
Copy link
Copy Markdown
Contributor

@lms0806 lms0806 commented May 9, 2026

Since the std::array::from_fn feature has been stabilized since version 1.91.1, the comment stating that it is not stable has been removed.

Additionally, the related example code has been modified into a simple example that is easy to understand.

Close #156102

@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 May 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 9, 2026

r? @scottmcm

rustbot has assigned @scottmcm.
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: @scottmcm, libs
  • @scottmcm, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, nia-e, scottmcm

@fmease fmease changed the title remove not stable explain and edit code explain Update example code of std::array::from_fn May 9, 2026
@chenyukang
Copy link
Copy Markdown
Member

@bors r=chenyukang

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 9, 2026

📌 Commit 5d7f9b5 has been approved by chenyukang

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 May 9, 2026
rust-bors Bot pushed a commit that referenced this pull request May 9, 2026
Rollup of 5 pull requests

Successful merges:

 - #156354 (Update example code of `std::array::from_fn`)
 - #156359 (use `cfg_select!` in integer `{to, from}_{le, be}`)
 - #156124 (Make stable hashing names consistent (part 2))
 - #156235 (fix: Guard SizeSkeleton::compute against stack overflow)
 - #156353 (resolve: Set correct parent and expansion for `self` declarations)
@rust-bors rust-bors Bot merged commit 3e95ad5 into rust-lang:main May 9, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 9, 2026
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.

Update std::array::from_fn example comment

4 participants