Skip to content

Commit

Permalink
Auto merge of rust-lang#131284 - dingxiangfei2009:rename-smart-ptr-to…
Browse files Browse the repository at this point in the history
…-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`
  • Loading branch information
bors committed Oct 27, 2024
2 parents c667683 + 1bb8bde commit cde6279
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1063,9 +1063,10 @@ 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))]
pub macro CoercePointee($item:item) {
/* compiler built-in */
}

0 comments on commit cde6279

Please sign in to comment.