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

Remove crate visibility modifier #97239

Merged
merged 2 commits into from
May 21, 2022
Merged

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented May 21, 2022

FCP to remove this syntax is just about complete in #53120. Once it completes, this should be merged ASAP to avoid merge conflicts.

The first two commits remove usage of the feature in this repository, while the last removes the feature itself.

@rust-highfive
Copy link
Collaborator

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred in src/tools/rustfmt.

cc @rust-lang/rustfmt

Some changes occurred in clean/types.rs.

cc @camelid

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 21, 2022
@rust-highfive
Copy link
Collaborator

r? @jsha

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 21, 2022
@jhpratt
Copy link
Member Author

jhpratt commented May 21, 2022

As to how this was done: nearly every change was done via regex replacement in my editor. The only code deliberately left using this syntax is in the feature gate test.

I updated the tests and blessed the output, so they should all be up to date. The only non-trivial change was deleting a test that was self-proclaimed to be a duplicate of another. While I did manually review each part of the diff when committing, I did not do so in depth. It was merely a "yes, this diff is semantically correct" check. I presume whoever reviews this will take a similar approach.

@rust-log-analyzer

This comment has been minimized.

@jhpratt jhpratt changed the title Remove all uses of crate visibility modifier Remove crate visibility modifier May 21, 2022
@rust-log-analyzer

This comment has been minimized.

@jackh726
Copy link
Member

If you make a separate PR just removing the uses without removing the features, I'll approve that immediately. Otherwise, just wait until FCP finishes.

@jhpratt
Copy link
Member Author

jhpratt commented May 21, 2022

Thanks @jackh726. I just pushed the diff that only removes the uses. If tests fail, I'll keep trying until it passes. I'm building them locally now to try to find any issues quicker.

@joshtriplett
Copy link
Member

@bors r+

@jhpratt
Copy link
Member Author

jhpratt commented May 21, 2022

CI is green.

@bors
Copy link
Contributor

bors commented May 21, 2022

📌 Commit 6970246 has been approved by joshtriplett

@bors 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 May 21, 2022
@oli-obk
Copy link
Contributor

oli-obk commented May 21, 2022

@bors p=1 bitrotty

@bors
Copy link
Contributor

bors commented May 21, 2022

⌛ Testing commit 6970246 with merge 4f372b1...

@bors
Copy link
Contributor

bors commented May 21, 2022

☀️ Test successful - checks-actions
Approved by: joshtriplett
Pushing 4f372b1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 21, 2022
@bors bors merged commit 4f372b1 into rust-lang:master May 21, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 21, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4f372b1): comparison url.

Instruction count

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

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 1 3 0 1 1
mean2 3.2% 3.3% N/A -1.1% 3.2%
max 3.2% 5.3% N/A -1.1% 3.2%

Cycles

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 😿 relevant regression found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 2 1 0 0 2
mean2 1.9% 5.8% N/A N/A 1.9%
max 2.0% 5.8% N/A N/A 2.0%

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

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes 2

  2. the arithmetic mean of the percent change 2

@jhpratt jhpratt deleted the remove-crate-vis branch May 21, 2022 16:57
bors added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2022
Remove box syntax from rustc_mir_dataflow and rustc_mir_transform

Continuation of rust-lang#87781, inspired by rust-lang#97239. The usages that this PR removes have not appeared from nothing, instead the usage in `rustc_mir_dataflow` and `rustc_mir_transform` was from rust-lang#80522 which split up `rustc_mir`, and which was filed before I filed rust-lang#87781, so it was using the state from before my PR. But it was merged after my PR was merged, so the `box_syntax` uses were able to survive here. Outside of this introduction due to the code being outside of the master branch at the point of merging of my PR, there was only one other introduction of box syntax, in rust-lang#95159. That box syntax was removed again though in rust-lang#95555. Outside of that, `box_syntax` has not made its reoccurrance in compiler crates.
bors added a commit to rust-lang/rust-analyzer that referenced this pull request Jul 18, 2023
internal: remove `crate` visibility modifier

This PR removes `crate` as a now-unaccepted experimental visibility modifier from our parser. This feature has been [unaccepted] and [removed] from rustc more than a year ago, so I don't think this removal affects anyone.

[unaccepted]: rust-lang/rust#53120 (comment)
[removed]: rust-lang/rust#97239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants