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

Ergonomic ref counting #134797

Merged
merged 25 commits into from
Mar 7, 2025
Merged

Conversation

spastorino
Copy link
Member

@spastorino spastorino commented Dec 26, 2024

This is an experimental first version of ergonomic ref counting.

This first version implements most of the RFC but doesn't implement any of the optimizations. This was left for following iterations.

RFC: rust-lang/rfcs#3680
Tracking issue: #132290
Project goal: rust-lang/rust-project-goals#107

r? @nikomatsakis

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 26, 2024
@spastorino spastorino force-pushed the ergonomic-ref-counting-1 branch from e4e8ad3 to b003b20 Compare December 26, 2024 19:43
@rust-log-analyzer

This comment has been minimized.

@spastorino spastorino force-pushed the ergonomic-ref-counting-1 branch from b003b20 to 94d4dde Compare December 26, 2024 20:47
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@spastorino spastorino force-pushed the ergonomic-ref-counting-1 branch from 42e6956 to 0aaedb8 Compare December 27, 2024 03:55
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@spastorino spastorino force-pushed the ergonomic-ref-counting-1 branch from f9a2abe to 0c29a0b Compare December 27, 2024 13:14
@rust-log-analyzer

This comment has been minimized.

@spastorino spastorino force-pushed the ergonomic-ref-counting-1 branch from 0c29a0b to b82e779 Compare December 27, 2024 14:35
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Very close! First round of feedback.

@rustbot 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 Dec 27, 2024
@spastorino
Copy link
Member Author

I've pushed some tests and I've found some parsing errors, a diagnostic ICE and another issue that needs handling during borrowck. CI is going to be red but is fine as this is not yet done.

@rust-log-analyzer

This comment has been minimized.

@spastorino spastorino force-pushed the ergonomic-ref-counting-1 branch from 2737662 to a5cb5f9 Compare February 20, 2025 18:53
@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Feb 20, 2025
@spastorino spastorino changed the title [WIP] Ergonomic ref counting Ergonomic ref counting Feb 20, 2025
@spastorino spastorino marked this pull request as ready for review February 20, 2025 18:53
@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 2025

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

Some changes occurred in rustc_ty_utils::consts.rs

cc @BoxyUwU

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@spastorino
Copy link
Member Author

@nikomatsakis I'm going to do some further reviews, probably add some more tests, add comments, etc, etc but would leave this up for review as it is "almost" done.

@rust-log-analyzer

This comment has been minimized.

@spastorino spastorino force-pushed the ergonomic-ref-counting-1 branch from 28beb7c to d7104dc Compare March 6, 2025 21:08
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

I looked over the UseCloned trait definition to double check the stability attributes -- seems good. Maybe add this slight modification to the test.

@spastorino
Copy link
Member Author

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 7, 2025

📌 Commit d2bde63 has been approved by nikomatsakis

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 Mar 7, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 7, 2025
…1, r=nikomatsakis

Ergonomic ref counting

This is an experimental first version of ergonomic ref counting.

This first version implements most of the RFC but doesn't implement any of the optimizations. This was left for following iterations.

RFC: rust-lang/rfcs#3680
Tracking issue: rust-lang#132290
Project goal: rust-lang/rust-project-goals#107

r? `@nikomatsakis`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 7, 2025
…1, r=nikomatsakis

Ergonomic ref counting

This is an experimental first version of ergonomic ref counting.

This first version implements most of the RFC but doesn't implement any of the optimizations. This was left for following iterations.

RFC: rust-lang/rfcs#3680
Tracking issue: rust-lang#132290
Project goal: rust-lang/rust-project-goals#107

r? ``@nikomatsakis``
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#134797 (Ergonomic ref counting)
 - rust-lang#137549 (Clean up various LLVM FFI things in codegen_llvm)
 - rust-lang#137977 (Reduce `kw::Empty` usage, part 1)
 - rust-lang#138042 (Suggest struct or union to add generic that impls trait)
 - rust-lang#138141 (tests: fix some typos in comment)
 - rust-lang#138150 (Streamline HIR intravisit `visit_id` calls for items)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f5a143f into rust-lang:master Mar 7, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 7, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
Rollup merge of rust-lang#134797 - spastorino:ergonomic-ref-counting-1, r=nikomatsakis

Ergonomic ref counting

This is an experimental first version of ergonomic ref counting.

This first version implements most of the RFC but doesn't implement any of the optimizations. This was left for following iterations.

RFC: rust-lang/rfcs#3680
Tracking issue: rust-lang#132290
Project goal: rust-lang/rust-project-goals#107

r? ```@nikomatsakis```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustc-dev-guide Area: rustc-dev-guide 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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants