Skip to content

Commit 2676918

Browse files
Rollup merge of rust-lang#125575 - dingxiangfei2009:derive-smart-ptr, 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`
2 parents 9dcffa5 + 7c83a04 commit 2676918

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/src/marker.rs

+9
Original file line numberDiff line numberDiff line change
@@ -1018,3 +1018,12 @@ pub trait FnPtr: Copy + Clone {
10181018
#[lang = "fn_ptr_addr"]
10191019
fn addr(self) -> *const ();
10201020
}
1021+
1022+
/// Derive macro generating impls of traits related to smart pointers.
1023+
#[cfg(not(bootstrap))]
1024+
#[rustc_builtin_macro]
1025+
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
1026+
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
1027+
pub macro SmartPointer($item:item) {
1028+
/* compiler built-in */
1029+
}

0 commit comments

Comments
 (0)