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 upremove ?Sized bounds from Index #59527
Conversation
rust-highfive
assigned
joshtriplett
Mar 29, 2019
This comment has been minimized.
This comment has been minimized.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
label
Mar 29, 2019
Centril
added
T-lang
T-libs
needs-fcp
labels
Mar 29, 2019
This comment has been minimized.
This comment has been minimized.
|
So this was not the PR I expected.
Perhaps. But if so, this is to me a happy accident.
I don't mind running crater, but I would not want to remove the bound when
We can add a test now and later remove it if we change our minds. |
This comment has been minimized.
This comment has been minimized.
|
@bors try |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Mar 29, 2019
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@craterbot run mode=check-only |
This comment has been minimized.
This comment has been minimized.
|
|
craterbot
added
S-waiting-on-crater
and removed
S-waiting-on-review
labels
Mar 29, 2019
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
What concrete problem is this solving, exactly? It's not clear to me why we should invest crater/person time on removing this bound. |
This comment has been minimized.
This comment has been minimized.
|
See discussion in https://internals.rust-lang.org/t/why-ops-index-idx-allows-unsized-idx/9738. |
This comment has been minimized.
This comment has been minimized.
|
@sfackler I agree that this is basically a non-issue, except for the mere fact that we have a random untested bound in std’s public API. |
This comment has been minimized.
This comment has been minimized.
|
|
matklad commentedMar 29, 2019
•
edited
I've noticed that we have an
Idx: ?Sizedbound on the index in theIndex, which seems strange given that we accept index by value. My guess is that it was meant to be removed in #23601, but was overlooked.If I remove this bound,
./x.py src/libstd/ src/libcore/passes, which means at least that this is not covered by test.I think there's three things we can do here:
cc @rust-lang/libs
EDIT: the forth alternative is that there exist a genuine reason why this is the case, but I failed to see it :D