Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement RFC 3373: Avoid non-local definitions in functions #120393

Merged
merged 10 commits into from
Feb 25, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Jan 26, 2024

@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2024

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 26, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2024

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Nadrieril added a commit to Nadrieril/rust that referenced this pull request Jan 27, 2024
…piler-errors

Improve handling of numbers in `IntoDiagnosticArg`

While working on rust-lang#120393, I realize that my fluent selectors were not working. So here is an improvement (not a fix unfortunately).
Nadrieril added a commit to Nadrieril/rust that referenced this pull request Jan 27, 2024
…piler-errors

Improve handling of numbers in `IntoDiagnosticArg`

While working on rust-lang#120393, I realize that my fluent selectors were not working. So here is an improvement (not a fix unfortunately).
Nadrieril added a commit to Nadrieril/rust that referenced this pull request Jan 27, 2024
…piler-errors

Improve handling of numbers in `IntoDiagnosticArg`

While working on rust-lang#120393, I realize that my fluent selectors were not working. So here is an improvement (not a fix unfortunately).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 27, 2024
…piler-errors

Improve handling of numbers in `IntoDiagnosticArg`

While working on rust-lang#120393, I realize that my fluent selectors were not working. So here is an improvement (not a fix unfortunately).
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2024
Rollup merge of rust-lang#120398 - Urgau:into_diag_arg-numbers, r=compiler-errors

Improve handling of numbers in `IntoDiagnosticArg`

While working on rust-lang#120393, I realize that my fluent selectors were not working. So here is an improvement (not a fix unfortunately).
@rust-log-analyzer

This comment has been minimized.

compiler/rustc_lint/src/non_local_def.rs Outdated Show resolved Hide resolved
compiler/rustc_lint/src/non_local_def.rs Outdated Show resolved Hide resolved
compiler/rustc_lint/src/non_local_def.rs Outdated Show resolved Hide resolved
tests/ui/lint/non_local_definitions.rs Outdated Show resolved Hide resolved
tests/ui/lint/non_local_definitions.rs Outdated Show resolved Hide resolved
tests/ui/lint/non_local_definitions.rs Show resolved Hide resolved
compiler/rustc_lint/src/non_local_def.rs Outdated Show resolved Hide resolved
@WaffleLapkin WaffleLapkin self-assigned this Jan 27, 2024
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the perf-regression Performance regression. label Feb 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2024
@rylev
Copy link
Member

rylev commented Feb 27, 2024

For perf triage I'm going to mark this as triaged since #121625 is meant to try to address this. However, I hope that PR is currently only recovering a small fraction of the performance loss here. Given the complex nature of the change, I imagine a revert is not desirable though even if performance can't be gained back.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Feb 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 28, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 29, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 29, 2024
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Feb 29, 2024
@Urgau
Copy link
Member Author

Urgau commented Feb 29, 2024

@rylev I tried very hard in #121625 to fix the perf regression, but it when mostly nowhere. My latest (and most promising) attempt end up having a correctness issue.

At some point I was wondering why diesel was the only benchmark to show any regressions (even in incremental), just to realize that in the Crater run some older versions of the crate were affect by the lint; and indeed it now produces 155 warnings!

No wonder why my all attempts went no-where.

If only I could have gotten kcachegrind working earlier it would have screamed this to me; it shows that 99.39% the instructions in the lint is the diagnostic machinery.

So in summary, there is no perf-regression per se, rustc is now just doing way more work because it has to display more than 155 different warnings.

For those curious:
image2

flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 7, 2024
…leLapkin

Implement RFC 3373: Avoid non-local definitions in functions

This PR implements [RFC 3373: Avoid non-local definitions in functions](rust-lang#120363).
@Urgau Urgau mentioned this pull request May 4, 2024
calebcartwright pushed a commit to calebcartwright/rust that referenced this pull request Jun 22, 2024
…leLapkin

Implement RFC 3373: Avoid non-local definitions in functions

This PR implements [RFC 3373: Avoid non-local definitions in functions](rust-lang#120363).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

location / scoping of Impl