Skip to content

Remove unneeded [const] Destruct bound in array::from_fn - #160956

Closed
Lars-Schumann wants to merge 1 commit into
rust-lang:mainfrom
Lars-Schumann:array-from-fn-bounds
Closed

Remove unneeded [const] Destruct bound in array::from_fn#160956
Lars-Schumann wants to merge 1 commit into
rust-lang:mainfrom
Lars-Schumann:array-from-fn-bounds

Conversation

@Lars-Schumann

@Lars-Schumann Lars-Schumann commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

relevant tracking issue: #147606

Using array::try_from_fn introduces an unneeded T: [const] Destruct bound.

Given that try_from_fn internally uses try_from_fn_erased, this change could have negative perf implications.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 12, 2026
@rust-log-analyzer

This comment has been minimized.

@Lars-Schumann

Copy link
Copy Markdown
Contributor Author

@bors retry

@rust-bors

rust-bors Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@Lars-Schumann: 🔑 Insufficient privileges: not in review users

@panstromek

Copy link
Copy Markdown
Contributor

@bors retry

@rust-bors

rust-bors Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@panstromek: 🔑 Insufficient privileges: not in review users

@panstromek

Copy link
Copy Markdown
Contributor

I think you'll have to re-push to rerun CI, but we can run try at least. Do you also need perf run?

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 12, 2026
Remove unneeded `[const] Destruct` bound in `array::from_fn`
@rust-bors

rust-bors Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a98450b (a98450ba9dafb1bf4ac77cc63b1dc64bca93429b)
Base parent: 6660e28 (6660e286ea36304054d6ca5264f5392513622b66)

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

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

---- iter::adapters::map_windows::drop_checks::panicking_clone stdout ----

thread 'iter::adapters::map_windows::drop_checks::panicking_clone' (42823) panicked at library/coretests/tests/iter/adapters/map_windows.rs:158:21:
⚞(· <:::> ·)⚟ aaaaaah its the turbofish monster!!! its gonna eat us all!!!1!

thread 'iter::adapters::map_windows::drop_checks::panicking_clone' (42823) panicked at library/coretests/tests/iter/adapters/map_windows.rs:189:9:
assertion `left == right` failed
  left: 0
 right: 3

@Lars-Schumann

Copy link
Copy Markdown
Contributor Author

I didn't think about panic safety here, seems like the bound is needed after all.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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