1

Replace visibility test with reachability test in dead code detection by krtab ·...

 1 month ago
source link: https://github.com/rust-lang/rust/pull/119552
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.

Conversation

Contributor

Fixes #119545

Also included is a fix for an error now flagged by the lint

Collaborator

r? @cjgillot

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

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. T-libs Relevant to the library team, which will review and decide on the PR/issue.

labels

Jan 3, 2024

This comment has been minimized.

This comment has been minimized.

Contributor

Author

Hm, my bad it took me some time to figure out why things were compiling on my side but not in the CI. I'll fix all the previously undetected dead code and you can review then.

@rustbot author

rustbot

added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Jan 4, 2024

This comment has been minimized.

Collaborator

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

This comment has been minimized.

Collaborator

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

This comment has been minimized.

Member

@flip1995 flip1995

left a comment

edited

Commit fb75654 is kinda a 🥷 fix for Clippy and doesn't really belong in this PR. I definitely appreciate the fix, but would prefer to have it in a Clippy PR. What's the motivation in including it in this PR?

Contributor

Author

Commit fb75654 is kinda a 🥷 fix for Clippy and doesn't really belong in this PR. I definitely appreciate the fix, but would prefer to have it in a Clippy PR. What's the motivation in including it in this PR?

I hesitated and discussed with other contributors to Rust. My issue with having it in a clippy specific PR is that I don't have a good solution to pass the CI in this one. I can delete or mark as allow(dead_code) the unused fields here and make the more substantial fix in clippy itself, but then this requires a correct ordering between this PR merge and the update of the in-tree clippy.
Having the fix here avoids having to PR to synchronize.

Member

Ah, was the self.allow_one_hash_in_raw_strings field unused? Well then, let's keep it in this PR. Thanks for the explanation!

krtab reacted with thumbs up emoji

Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

rustbot

added the O-unix Operating system: Unix-like label

Jan 5, 2024

This comment has been minimized.

Contributor

Author

Well it seems to finally pass the CI! Didn't expect it to end-up being a +120/-51 PR 😅
I expect that there will be breakage during bors try.

Anyway @rustbot review

This comment has been minimized.

Contributor

💔 Test failed - checks-actions

bors

added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Mar 22, 2024

Contributor

Author

@rustbot author

I need to find a way to compile src/bootstrap locally with the stage1 compiler to get rid of all errors befors re pushing.

rustbot

added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Mar 22, 2024

Contributor

Author

@rustbot review

rustbot

added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Mar 22, 2024

Member

@bors r=cjgillot,saethlin

krtab reacted with heart emoji

Contributor

📌 Commit 7342cc4 has been approved by cjgillot,saethlin

It is now in the queue for this repository.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Mar 22, 2024

Contributor

higher!
@bors p=2

krtab reacted with heart emoji

Contributor

⌛ Testing commit 7342cc4 with merge c308726...

Contributor

☀️ Test successful - checks-actions
Approved by: cjgillot,saethlin
Pushing c308726 to master...

saethlin, cjgillot, and krtab reacted with hooray emoji

bors

added the merged-by-bors This PR was explicitly merged by bors label

Mar 23, 2024

bors

merged commit c308726 into

rust-lang:master

Mar 23, 2024

12 checks passed

Collaborator

Finished benchmarking commit (c308726): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.1% [1.0%, 3.2%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.1% [1.0%, 3.2%] 4

Max RSS (memory usage)

Results

Cycles

Results

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 671.121s -> 671.167s (0.01%)
Artifact size: 315.04 MiB -> 315.03 MiB (-0.00%)

Contributor

Author

Thanks everyone, especially @cjgillot and @saethlin :)

Contributor

More warnings are now emitted for ripgrep (analyzed here).

@rustbot label: +perf-regression-triaged

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

Reviewers

antoyo

antoyo left review comments

cjgillot

cjgillot left review comments

flip1995

flip1995 left review comments

saethlin

saethlin left review comments
Assignees

cjgillot

Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface perf-regression Performance regressions 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects

None yet

Milestone

1.79.0

Development

Successfully merging this pull request may close these issues.

No warning for unread pub struct field in private module

15 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK