-
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
Add derive for core::marker::ConstParamTy
#111649
Conversation
r? @lcnr (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
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 tests for:
derive(ConstParamTy, Eq, PartialEq)
on a struct with a field that isntConstParamTy
derive(ConstParamTy)
on a union that has a manualStructuralEq
impl
r=me afterwards
r? @BoxyUwU |
This makes it easier to implement it for a type, just like `Copy`.
eecc364
to
0336dd1
Compare
impl Eq for Union {} | ||
impl std::marker::StructuralEq for Union {} | ||
|
||
impl std::marker::ConstParamTy for Union {} |
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.
xd this should error oh well not this PR's fault
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.
well, i'm glad i added a test at least 😆
@bors r+ |
Rollup of 6 pull requests Successful merges: - rust-lang#110145 (Share slice of bytes) - rust-lang#111043 (Stabilize feature `cstr_is_empty`) - rust-lang#111648 (Remove `LangItems::require`) - rust-lang#111649 (Add derive for `core::marker::ConstParamTy`) - rust-lang#111654 (Add a conversion from `&mut T` to `&mut UnsafeCell<T>`) - rust-lang#111661 (Erase regions of type in `offset_of!`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This makes it easier to implement it for a type, just like
Copy
.@BoxyUwU half asked me to add it