-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Also emit suggestions for usages in the non_upper_case_globals
lint
#142645
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
base: master
Are you sure you want to change the base?
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
2589fe0
to
17f95ca
Compare
17f95ca
to
4df9f2f
Compare
This PR currently collects use sites eagerly, i.e., before the indirect call to If this ends up perf heavy, it should be possible to turn this into a @bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Also emit suggestions for usages in the `non_upper_case_globals` lint This PR adds suggestions for all the usages of the renamed item in the warning of the `non_upper_case_globals` lint. Fixes #124061
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (4bb20cc): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.2%, secondary -4.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 30.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 692.606s -> 715.256s (3.27%) |
} else { | ||
NonUpperCaseGlobalSub::Label { span: ident.span } | ||
}; | ||
|
||
struct UsageCollector<'a, 'tcx> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impl LintDiagnostic
manually for NonUpperCaseGlobal
(it can still remain translatable) and move the usage collection into decorate_lint
. This way, we only collect usages when absolutely necessary which should fix perf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did something different I called opt_span_lint
directly, and since we aren't supposed to (which I kind of disagree) I added a emit_span_lint_lazy
to do that.
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Also emit suggestions for usages in the `non_upper_case_globals` lint This PR adds suggestions for all the usages of the renamed item in the warning of the `non_upper_case_globals` lint. Fixes #124061
This comment has been minimized.
This comment has been minimized.
3939316
to
1b5ec3f
Compare
Finished benchmarking commit (5aafa84): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -3.2%, secondary -2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 689.042s -> 689.239s (0.03%) |
This PR adds suggestions for all the usages of the renamed item in the warning of the
non_upper_case_globals
lint.Fixes #124061