Skip to content

clippy: add deprecation comment for from_iter_instead_of_collect lint - #14062

Open
cakebaker wants to merge 1 commit into
uutils:mainfrom
cakebaker:clippy_remove_lint
Open

clippy: add deprecation comment for from_iter_instead_of_collect lint#14062
cakebaker wants to merge 1 commit into
uutils:mainfrom
cakebaker:clippy_remove_lint

Conversation

@cakebaker

@cakebaker cakebaker commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This PR removes the from_iter_instead_of_collect lint from Cargo.tomladds a deprecation comment for the from_iter_instead_of_collect lint as it has been deprecated upstream (rust-lang/rust-clippy#17208).

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/retry (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/env/env-signal-handler was skipped on 'main' but is now failing.
Skip an intermittent issue tests/tail/tail-n0f (was skipped on 'main', now failing)

@codspeed-hq

codspeed-hq Bot commented Aug 21, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 4.15%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 356 untouched benchmarks
⏩ 50 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation du_summarize_balanced_tree[(5, 4, 10)] 16.1 ms 16.8 ms -4.15%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing cakebaker:clippy_remove_lint (564846d) with main (a5a7249)

Open in CodSpeed

Footnotes

  1. 50 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@xtqqczze

Copy link
Copy Markdown
Contributor

The issue is that we set pedantic = { level = "warn", priority = -1 }. Wouldn’t removing this potentially cause warnings on the MSRV toolchain, where the lint hasn’t been deprecated yet?

@cakebaker

Copy link
Copy Markdown
Contributor Author

@xtqqczze yes, you are right. I re-added the lint and added a TODO that it can be removed when we have an MSRV of 1.98.

@cakebaker cakebaker changed the title clippy: remove from_iter_instead_of_collect lint clippy: add deprecation comment for from_iter_instead_of_collect lint Aug 21, 2026
@xtqqczze

Copy link
Copy Markdown
Contributor

Do we want something like:

[workspace.lints.rust]
renamed_and_removed_lints = { level = "allow", priority = -1 }

@cakebaker

Copy link
Copy Markdown
Contributor Author

Hm, I'm not sure about this setting as it is useful to know when a lint gets deprecated. Maybe it would rather make sense to set the MSRV for clippy?

@xtqqczze

Copy link
Copy Markdown
Contributor

Clippy should already respect package.rust-version in Cargo.toml.

@xtqqczze

Copy link
Copy Markdown
Contributor

I have to say, it is annoying to not get clean output from:

$ cargo clippy --workspace -q
warning: lint `clippy::from_iter_instead_of_collect` has been removed: lint has proved problematic
  |
  = note: requested on the command line with `-A clippy::from_iter_instead_of_collect`
  = note: `#[warn(renamed_and_removed_lints)]` on by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants