Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdding a specialized impl can break inference. #46363
Comments
pietroalbini
added
T-compiler
A-inference
C-bug
labels
Jan 23, 2018
nikomatsakis
referenced this issue
Feb 26, 2018
Open
🛠️ specialization permits empty impls when parent has no default items #48444
This comment has been minimized.
This comment has been minimized.
|
Is this the same issue that's causing this error? #51464 (comment) There used to be a bunch of specific impls for |
joshlf
referenced this issue
Jun 10, 2018
Closed
Implement SliceIndex for R: RangeBounds<usize> #51464
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
leodasvacas commentedNov 29, 2017
•
edited
Relevant to #31844. This is how it happens:
This issue does not originate from specialization, since if we removed
Impl 1the same problem would occur. But with specialization if those impls were added in order, the story would be a bit confusing:Impl 1, inference fails.Impl 2, yay inference succeeds.Impl 3, inference is back to failing.The only fix would be to make inference fail in step 2. Even if it's not something we want fix it still seems worth noting somewhere that we are ok with specializaton breaking inference.