Skip to content

Commit

Permalink
Rollup merge of rust-lang#125575 - dingxiangfei2009:derive-smart-ptr,…
Browse files Browse the repository at this point in the history
… r=davidtwco

SmartPointer derive-macro

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->

Possibly replacing rust-lang#123472 for continued upkeep of the proposal rust-lang/rfcs#3621 and implementation of the tracking issue rust-lang#123430.

cc `@Darksonn` `@wedsonaf`
  • Loading branch information
compiler-errors authored Jun 24, 2024
2 parents 9dcffa5 + 7c83a04 commit 2676918
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1018,3 +1018,12 @@ pub trait FnPtr: Copy + Clone {
#[lang = "fn_ptr_addr"]
fn addr(self) -> *const ();
}

/// Derive macro generating impls of traits related to smart pointers.
#[cfg(not(bootstrap))]
#[rustc_builtin_macro]
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
pub macro SmartPointer($item:item) {
/* compiler built-in */
}

0 comments on commit 2676918

Please sign in to comment.