-
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
derive(SmartPointer): register helper attributes #128925
Conversation
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.
This needs a test
Yeah working on a test now |
This may also implicitly fix #128485 |
This comment has been minimized.
This comment has been minimized.
abe68df
to
02638a3
Compare
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.
Can you add a test showing what happens when you have #[pointee]
without #[derive(SmartPointer)]
?
How does the |
02638a3
to
f254ee6
Compare
Ah it registered that with |
@bors r+ rollup |
f254ee6
to
5534cb0
Compare
Another test was added but I think it is optional. I just found that the test was convered by the Default macro test suite. |
@rustbot label F-derive_smart_pointer |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024) - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target) - rust-lang#128925 (derive(SmartPointer): register helper attributes) - rust-lang#128946 (Hash Ipv*Addr as an integer) - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout) - rust-lang#129015 (Update books) - rust-lang#129067 (Use `append` instead of `extend(drain(..))`) - rust-lang#129100 (Fix dependencies cron job) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024) - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target) - rust-lang#128925 (derive(SmartPointer): register helper attributes) - rust-lang#128946 (Hash Ipv*Addr as an integer) - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout) - rust-lang#129015 (Update books) - rust-lang#129067 (Use `append` instead of `extend(drain(..))`) - rust-lang#129100 (Fix dependencies cron job) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128925 - dingxiangfei2009:smart-ptr-helper-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`
[beta] backports and bump stage0 - Disable jump threading of float equality rust-lang#128271 - Normalize when equating `dyn` tails in MIR borrowck rust-lang#128694 - Improve `Ord` violation help rust-lang#128273 - bump stage0 to stable 1.80.1 - Revert rust-lang#125915 on beta rust-lang#128760 - derive(SmartPointer): register helper attributes rust-lang#128925 - Fix bug in `Parser::look_ahead`. rust-lang#128994 r? cuviper
Fix #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 underderive(SmartPointer)
.cc @Darksonn @davidtwco