-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
SmartPointer derive-macro #125575
SmartPointer derive-macro #125575
Conversation
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
This comment has been minimized.
This comment has been minimized.
0c32103
to
8448bc7
Compare
This comment has been minimized.
This comment has been minimized.
8448bc7
to
ab3ebe1
Compare
This comment has been minimized.
This comment has been minimized.
ab3ebe1
to
a33685e
Compare
This comment has been minimized.
This comment has been minimized.
a33685e
to
37f682c
Compare
I don't feel competent reviewing this r? compiler |
r? compiler |
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.
Obviously this derive is still undergoing lots of discussion in the RFC, but this seems like a decent start at an implementation that will allow experimentation and can evolve once the RFC settles.
r=me with comments addressed
37f682c
to
8804882
Compare
Co-authored-by: Wedson Almeida Filho <walmeida@microsoft.com>
8804882
to
f1be59f
Compare
@bors r+ |
…mpiler-errors Rollup of 11 pull requests Successful merges: - rust-lang#124460 (Show notice about "never used" of Debug for enum) - rust-lang#124712 (Deprecate no-op codegen option `-Cinline-threshold=...`) - rust-lang#125082 (Remove `MaybeUninit::uninit_array()` and replace it with inline const blocks.) - rust-lang#125575 (SmartPointer derive-macro) - rust-lang#126413 (compiletest: make the crash test error message abit more informative) - rust-lang#126673 (Ensure we don't accidentally succeed when we want to report an error) - rust-lang#126682 (coverage: Overhaul validation of the `#[coverage(..)]` attribute) - rust-lang#126899 (Suggest inline const blocks for array initialization) - rust-lang#126904 (Small fixme in core now that NonZero is generic) - rust-lang#126909 (add `@kobzol` to bootstrap team for triagebot) - rust-lang#126911 (Split the lifetimes of `MirBorrowckCtxt`) r? `@ghost` `@rustbot` modify labels: rollup
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`
Assignment is not allowed on a closed PR. |
let s_ty = cx.ty_ident(span, Ident::new(sym::__S, span)); | ||
let mut alt_self_params = self_params; | ||
alt_self_params[pointee_param_idx] = GenericArg::Type(s_ty.clone()); | ||
let alt_self_type = cx.ty_path(cx.path_all(span, false, vec![name_ident], alt_self_params)); |
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.
It looks like the trait bounds on pointee need to be copied for __S
somewhere here. See #127647
Possibly replacing #123472 for continued upkeep of the proposal rust-lang/rfcs#3621 and implementation of the tracking issue #123430.
cc @Darksonn @wedsonaf