Skip to content

Commit

Permalink
Rollup merge of rust-lang#128925 - dingxiangfei2009:smart-ptr-helper-…
Browse files Browse the repository at this point in the history
…attr, r=compiler-errors

derive(SmartPointer): register helper attributes

Fix rust-lang#128888

This PR enables built-in macros to register helper attributes, if any, to support correct name resolution in the correct lexical scope under the macros.

Also, `#[pointee]` is moved into the scope under `derive(SmartPointer)`.

cc `@Darksonn` `@davidtwco`
  • Loading branch information
matthiaskrgr authored Aug 14, 2024
2 parents ba3a942 + b247d9a commit 383c4db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ pub trait FnPtr: Copy + Clone {
}

/// Derive macro generating impls of traits related to smart pointers.
#[rustc_builtin_macro]
#[rustc_builtin_macro(SmartPointer, attributes(pointee))]
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
pub macro SmartPointer($item:item) {
Expand Down

0 comments on commit 383c4db

Please sign in to comment.