-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Change location of where clause on GATs #90076
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #90188) made this pull request unmergeable. Please resolve the merge conflicts. |
nikomatsakis
left a comment
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.
As discussed on our call, let's change this to store a usize "split point" instead.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
One concern I have are generic constants, for example const SIZE_OF<T>: usize = std::mem::size_of::<T>();
trait IsEqual: 'static {
const TO<U: 'static>: bool;
}
impl<T: 'static> IsEqual for T {
const TO<U: 'static>: bool = TypeId::of::<T>() == TypeId::of::<U>();
}while both of these are currently not allowed in Rust, I personally quite strongly believe that we should add them in the future and want to at least want to keep this option open. Can we unambiguously parse impl<T: 'static> IsEqual for T {
const TO<U>: bool = TypeId::of::<T>() == TypeId::of::<U>()
where
U: 'static;
} |
|
@rfcbot fcp cancel |
|
This shouldn't have been a T-compiler FCP! |
This comment has been minimized.
This comment has been minimized.
Ah, good call! I'm glad you brought that up, we didn't discuss associated constants in the meeting. I'm not worried about parsing ambiguities, the I'm not 100% sure where I think EDIT: Upon further reflection, I think that I would probably expect where clauses to come after the value for const expressions, too, for the same reasons give above. I don't really expect "complex" const values that span many lines; though I don't doubt they will occur, I suspect it would also be better for folks to factor them out into a |
Do you remember the Centril's proposal to abbreviate fn foo() -> u8 = match x {
A => 1,
B => 2,
C => 3,
_ => 999,
};What is the preferable position for |
|
(Self-assigning, because I have some comments about the implementation as well.) |
I believe this is it: Centril/rfcs#17 |
|
Something is wrong with the FCP here, it's still active and assigned to the compiler team. UPD: The previous cancel didn't work because nikomatsakis removed the T-compiler label before writing |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp cancel |
|
@petrochenkov proposal cancelled. |
|
⌛ Testing commit 29f0837501e6f6af372e9274d4ba575409e6f524 with merge 3e5332fe9b563beb405e82b84f4fb648b79b2780... |
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
Let's try this again. @bors r=nikomatsakis |
|
📌 Commit d16ec7b has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (ad0d1d7): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Closes #89122
Blocked on lang FCPr? @nikomatsakis