8

add rustc lint, warning when iterating over hashmaps 2 by lcnr · Pull Request #9...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/92584
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

New issue

add rustc lint, warning when iterating over hashmaps 2 #92584

Conversation

Copy link

Contributor

lcnr commented on Jan 5

first introduced in #89558 and reverted in #90380 due to its perf impact

r? @estebank

Copy link

Contributor

Author

lcnr commented on Jan 5

Copy link

Collaborator

rust-timer commented on Jan 5

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

Copy link

Contributor

bors commented on Jan 5

hourglass Trying commit 1460dfd with merge 446098f...

This comment has been hidden.

lcnr

marked this pull request as draft

last month

Copy link

Contributor

Author

lcnr commented on Jan 6

Copy link

Collaborator

rust-timer commented on Jan 6

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

Copy link

Contributor

bors commented on Jan 6

hourglass Trying commit 016df18 with merge ad47090...

Copy link

Contributor

bors commented on Jan 6

sunny Try build successful - checks-actions
Build commit: ad47090 (ad47090cb5e41b11dcd8682dee0cacc33b2e9903)

Copy link

Collaborator

rust-timer commented on Jan 6

Copy link

Collaborator

rust-timer commented on Jan 6

Finished benchmarking commit (ad47090): comparison url.

Summary: This change led to very large relevant regressions crying_cat_face in compiler performance.

  • Very large regression in instruction counts (up to 10.4% on incr-full builds of deeply-nested-async)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

Copy link

Contributor

Author

lcnr commented on Jan 6

Copy link

Collaborator

rust-timer commented on Jan 6

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

Copy link

Contributor

bors commented on Jan 6

hourglass Trying commit 81cf157 with merge f595a08...

This comment has been hidden.

Copy link

Contributor

bors commented on Jan 6

sunny Try build successful - checks-actions
Build commit: f595a08 (f595a08cba4963a2575a9e38727108c748031450)

Copy link

Collaborator

rust-timer commented on Jan 6

Copy link

Collaborator

rust-timer commented on Jan 6

Finished benchmarking commit (f595a08): comparison url.

Summary: This change led to very large relevant regressions crying_cat_face in compiler performance.

  • Very large regression in instruction counts (up to 10.4% on incr-full builds of deeply-nested-async)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

Copy link

Collaborator

rust-timer commented 29 days ago

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

Copy link

Contributor

bors commented 29 days ago

hourglass Trying commit 1b6090b with merge 5d17beb...

Copy link

Contributor

bors commented 29 days ago

sunny Try build successful - checks-actions
Build commit: 5d17beb (5d17beb959299ea0fbd2279075b7f0746ad7f886)

Copy link

Collaborator

rust-timer commented 29 days ago

Copy link

Collaborator

rust-timer commented 29 days ago

Finished benchmarking commit (5d17beb): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Copy link

Contributor

Author

lcnr commented 28 days ago

should now be ready for review/merged again

Copy link

Contributor

@estebank estebank left a comment

r=me after addressing the blanket import.

compiler/rustc_lint/src/internal.rs

Outdated Show resolved

// FIXME(rustdoc): This lint uses typecheck results, causing rustdoc to

// error if there are resolution failures.

//

// As internal lints are currently always run if there are `unstable_options`,

// they are added to the lint store of rustdoc. Internal lints are also

// not used via the `lint_mod` query. Crate lints run outside of a query

// so rustdoc currently doesn't disable them.

//

// Instead of relying on this, either change crate lints to a query disabled by

// rustdoc, only run internal lints if the user is explicitly opting in

// or figure out a different way to avoid running lints for rustdoc.

if cx.tcx.sess.opts.actually_rustdoc {

return;

}

Copy link

Contributor

@estebank estebank 16 days ago

Do any other lints have to deal with this?

Copy link

Contributor

Author

@lcnr lcnr 16 days ago

edited

not sure, rustdoc disables the late lint query and afaik pretty much runs no lints outside of the internal lints (which we run because we always add them to the lint store if -Zunstable-options is set)

and no other internal lint uses the typeck query which is what is causing rustdoc to error

estebank reacted with thumbs up emoji

Copy link

Contributor

Author

lcnr commented 16 days ago

@bors r=estebank rollup

Copy link

Contributor

bors commented 16 days ago

pushpin Commit 4bbe970 has been approved by estebank

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

Reviewers

estebank

Assignees

estebank

Projects

None yet

Milestone

1.60.0

Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK