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 unused/unnecessary features #119968

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Conversation

clubby789
Copy link
Contributor

@clubby789 clubby789 commented Jan 14, 2024

The bulk of the actual code changes here is replacing try blocks with equivalent closures. I'm not entirely sure that's a good idea since it may have perf impact, happy to revert if that's the case/the change is unwanted.

I also removed a lot of recursion_limit = "256" since everything seems to build fine without that and most don't have any comment justifying it.

@rustbot
Copy link
Collaborator

rustbot commented Jan 14, 2024

r? @WaffleLapkin

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

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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 14, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jan 14, 2024

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

This PR changes Stable MIR

cc @oli-obk, @celinval, @spastorino, @ouz-a

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in need_type_info.rs

cc @lcnr

rustc_errors::translation was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

@clubby789 clubby789 added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Jan 14, 2024
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation for removing try blocks? The rest of the changes seem fine, but there's no bad reason to keep "testing" try blocks in the compiler imo.

@clubby789
Copy link
Contributor Author

Mostly just because it was a very easy change to make to cut down on unstable features - but yeah, I'll restore them

@WaffleLapkin
Copy link
Member

Yeah, +1 to what @compiler-errors said — there isn't really a reason to avoid try blocks.

And while it's possible to remove their uses, it makes the code worse imo.

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, though I guess I don't necessarily agree that we should be removing harmless libs features like .get_or_insert_with_default().

@compiler-errors
Copy link
Member

Should be fine tho

@bors r+

@bors
Copy link
Contributor

bors commented Jan 14, 2024

📌 Commit 9a17b9f has been approved by compiler-errors

It is now in the queue for this repository.

@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 Jan 14, 2024
Copy link
Contributor

@cjgillot cjgillot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, should this PR be limited to removing the attributes? Testing library features is normal in the compiler.

compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs Outdated Show resolved Hide resolved
compiler/rustc_mir_dataflow/src/framework/graphviz.rs Outdated Show resolved Hide resolved
@compiler-errors
Copy link
Member

@bors r-

Yeah, let's just revert all the libs feature changes.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 14, 2024
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 14, 2024

📌 Commit e5a520f has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 14, 2024
@bors
Copy link
Contributor

bors commented Jan 21, 2024

📌 Commit 5bb0097 has been approved by compiler-errors

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 21, 2024
@bors
Copy link
Contributor

bors commented Jan 23, 2024

☔ The latest upstream changes (presumably #120251) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 23, 2024
@clubby789
Copy link
Contributor Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Jan 24, 2024

📌 Commit cd4a889 has been approved by compiler-errors

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 24, 2024
@clubby789
Copy link
Contributor Author

@bors r-
Looks like there was a conflict (the queue page says this isn't queued any more but no notification from Bors here)?

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 25, 2024
@clubby789
Copy link
Contributor Author

Found another conflict while fixing that one so
@bors r=compiler-errors rollup=never

@bors
Copy link
Contributor

bors commented Jan 25, 2024

📌 Commit fd29f74 has been approved by compiler-errors

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 25, 2024
@bors
Copy link
Contributor

bors commented Jan 26, 2024

⌛ Testing commit fd29f74 with merge 69db514...

@bors
Copy link
Contributor

bors commented Jan 26, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 69db514 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Jan 26, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 69db514 to master...

@bors bors added merged-by-bors This PR was explicitly merged by bors. labels Jan 26, 2024
@bors bors merged commit 69db514 into rust-lang:master Jan 26, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 26, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (69db514): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.0% [2.6%, 3.4%] 2
Improvements ✅
(primary)
-3.7% [-3.7%, -3.7%] 1
Improvements ✅
(secondary)
-4.2% [-4.2%, -4.2%] 1
All ❌✅ (primary) -3.7% [-3.7%, -3.7%] 1

Cycles

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

Binary size

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

Bootstrap: 663.451s -> 662.651s (-0.12%)
Artifact size: 308.15 MiB -> 308.15 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants