-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 Self: ~const Trait
to traits with #[const_trait]
#99704
Add Self: ~const Trait
to traits with #[const_trait]
#99704
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@@ -1,18 +1,49 @@ | |||
error: pointers cannot be reliably compared during const eval |
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.
The const checking logic for this message can now just be an assert or a delay_span_bug I believe
LL | unsafe { x == y } | ||
| ^^ | ||
= help: the following other types implement trait `PartialEq<Rhs>`: | ||
extern "C" fn() -> Ret |
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.
Do these types implement PartialEq as const? If not, this seems like a slight diagnostic regression. (Not sure if that's relevant for this PR.)
This comment has been minimized.
This comment has been minimized.
Note to self: need to prepare a PR for disallowing |
fe169d6
to
fd6f5e1
Compare
This comment has been minimized.
This comment has been minimized.
fd6f5e1
to
4b7a348
Compare
@bors r+ |
Rollup of 5 pull requests Successful merges: - rust-lang#99079 (Check that RPITs constrained by a recursive call in a closure are compatible) - rust-lang#99704 (Add `Self: ~const Trait` to traits with `#[const_trait]`) - rust-lang#99769 (Sync rustc_codegen_cranelift) - rust-lang#99783 (rustdoc: remove Clean trait impls for more items) - rust-lang#99789 (Refactor: use `pluralize!`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
r? @oli-obk