-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -425,8 +425,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 traits as per `CoercePointee` specification | ||||||
(unstable, derive_coerce_pointee, "1.79.0", Some(123430)), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
per @compiler-errors's comment |
||||||
/// Controls errors in trait implementations. | ||||||
(unstable, do_not_recommend, "1.67.0", Some(51992)), | ||||||
/// Tells rustdoc to automatically generate `#[doc(cfg(...))]`. | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1063,10 +1063,11 @@ pub trait FnPtr: Copy + Clone { | |
} | ||
|
||
/// Derive macro generating impls of traits related to smart pointers. | ||
#[rustc_builtin_macro(SmartPointer, attributes(pointee))] | ||
#[rustc_builtin_macro(CoercePointee, attributes(pointee))] | ||
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)] | ||
#[unstable(feature = "derive_smart_pointer", issue = "123430")] | ||
pub macro SmartPointer($item:item) { | ||
#[unstable(feature = "derive_coerce_pointee", issue = "123430")] | ||
#[cfg(not(bootstrap))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will remove this in the next beta release. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
pub macro CoercePointee($item:item) { | ||
/* compiler built-in */ | ||
} | ||
|
||
|
There was a problem hiding this comment.
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.