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

Rename macro SmartPointer to CoercePointee #131284

Merged

Conversation

dingxiangfei2009
Copy link
Contributor

@dingxiangfei2009 dingxiangfei2009 commented Oct 5, 2024

As per resolution #129104 we will rename the macro to better reflect the technical specification of the feature and clarify the communication.

  • SmartPointer is renamed to CoerceReferent
  • #[pointee] attribute is renamed to #[referent]
  • #![feature(derive_smart_pointer)] gate is renamed to #![feature(derive_coerce_referent)].
  • Any mention of SmartPointer in the file names are renamed accordingly.

r? @compiler-errors

cc @nikomatsakis @Darksonn

@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 Oct 5, 2024
@dingxiangfei2009
Copy link
Contributor Author

@rustbot labels +F-derive_smart_pointer

@rustbot rustbot added the F-derive_smart_pointer `#![feature(derive_smart_pointer)]` label Oct 5, 2024
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
pub macro SmartPointer($item:item) {
#[unstable(feature = "dervie_coerce_referent", issue = "123430")]
#[cfg(not(bootstrap))]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove this in the next beta release.

Copy link
Member

Choose a reason for hiding this comment

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

You don't need to remove it; it'll get removed by the release team member doing the beta release.

@rust-log-analyzer

This comment has been minimized.

@dingxiangfei2009 dingxiangfei2009 force-pushed the rename-smart-ptr-to-coerce-referent branch from 2d31f15 to ffef110 Compare October 5, 2024 10:02
@rust-log-analyzer

This comment has been minimized.

@dingxiangfei2009 dingxiangfei2009 force-pushed the rename-smart-ptr-to-coerce-referent branch 2 times, most recently from a761a7b to b5f8711 Compare October 5, 2024 10:19
@compiler-errors
Copy link
Member

@rustbot blocked

Blocked on FCP finishing

@rustbot rustbot added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2024
@@ -432,8 +432,8 @@ declare_features! (
(unstable, deprecated_suggestion, "1.61.0", Some(94785)),
/// Allows deref patterns.
(incomplete, deref_patterns, "1.79.0", Some(87121)),
/// Allows deriving `SmartPointer` traits
(unstable, derive_smart_pointer, "1.79.0", Some(123430)),
/// Allows deriving `CoerceReferent` traits
Copy link
Member

@compiler-errors compiler-errors Oct 5, 2024

Choose a reason for hiding this comment

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

I believe you should register derive_smart_pointer as a removed feature, or perhaps look into how we've handled renamed features in the past.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied. I moved it into the removed list.

@fmease fmease added the S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. label Oct 5, 2024
@bors
Copy link
Contributor

bors commented Oct 7, 2024

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

@dingxiangfei2009 dingxiangfei2009 force-pushed the rename-smart-ptr-to-coerce-referent branch 2 times, most recently from 6e7d624 to d83b461 Compare October 9, 2024 19:32
@dingxiangfei2009
Copy link
Contributor Author

@rustbot ready

  • The latest decision as per comment is CoercePointee.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Oct 9, 2024
@dingxiangfei2009 dingxiangfei2009 changed the title Rename macro SmartPointer to CoerceReferent Rename macro SmartPointer to CoercePointee Oct 9, 2024
@dingxiangfei2009 dingxiangfei2009 force-pushed the rename-smart-ptr-to-coerce-referent branch from d83b461 to ad79281 Compare October 9, 2024 19:36
@compiler-errors
Copy link
Member

This is still waiting for the FCP to finish. To avoid additional churn, and since I see no rush here:

@rustbot blocked

@rustbot rustbot added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 9, 2024
@bors
Copy link
Contributor

bors commented Oct 12, 2024

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

move derive_smart_pointer into removed set
@dingxiangfei2009 dingxiangfei2009 force-pushed the rename-smart-ptr-to-coerce-referent branch from ad79281 to fd36b3a Compare October 23, 2024 18:14
@dingxiangfei2009
Copy link
Contributor Author

@rustbot ready

  • Merge conflict was resolved
  • FCP has completed. The name is now in ink.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Oct 23, 2024
Comment on lines 428 to 429
/// Allows deriving traits as per `CoercePointee` specification
(unstable, derive_coerce_pointee, "1.79.0", Some(123430)),
Copy link
Member

Choose a reason for hiding this comment

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

Why is this a lang feature at all? The feature gating should be a library feature, since all this gates is a macro, and no behavior in the compiler.

I believe that you can remove this.

Comment on lines 428 to 429
/// Allows deriving traits as per `CoercePointee` specification
(unstable, derive_coerce_pointee, "1.79.0", Some(123430)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// Allows deriving traits as per `CoercePointee` specification
(unstable, derive_coerce_pointee, "1.79.0", Some(123430)),

per @compiler-errors's comment

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 27, 2024

📌 Commit 6cb84fe 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 Oct 27, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 27, 2024
…to-coerce-referent, r=compiler-errors

Rename macro `SmartPointer` to `CoercePointee`

As per resolution rust-lang#129104 we will rename the macro to better reflect the technical specification of the feature and clarify the communication.

- `SmartPointer` is renamed to `CoerceReferent`
- `#[pointee]` attribute is renamed to `#[referent]`
- `#![feature(derive_smart_pointer)]` gate is renamed to `#![feature(derive_coerce_referent)]`.
- Any mention of `SmartPointer` in the file names are renamed accordingly.

r? `@compiler-errors`

cc `@nikomatsakis` `@Darksonn`
@bors
Copy link
Contributor

bors commented Oct 27, 2024

⌛ Testing commit 6cb84fe with merge 81d6652...

@bors
Copy link
Contributor

bors commented Oct 27, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 27, 2024
@bors bors merged commit 81d6652 into rust-lang:master Oct 27, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Oct 27, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (81d6652): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.4%, -2.4%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -3.2%)

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-5.0%, -1.5%] 2
All ❌✅ (primary) - - 0

Cycles

Results (secondary 9.3%)

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)
9.3% [9.1%, 9.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 783.479s -> 782.673s (-0.10%)
Artifact size: 333.71 MiB -> 333.75 MiB (0.01%)

@dingxiangfei2009 dingxiangfei2009 deleted the rename-smart-ptr-to-coerce-referent branch October 31, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-derive_smart_pointer `#![feature(derive_smart_pointer)]` 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. S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. 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.

8 participants