-
Notifications
You must be signed in to change notification settings - Fork 13k
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
provide on_unimplemented hint for ops::Index #31062
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Comments
steveklabnik
added
A-libs
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
labels
Jan 20, 2016
brson
added
the
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
label
Jan 21, 2016
It looks like fun, I take it. |
Fixed by #33401 \o/ |
PR #33491 is going to regress this issue; reopen when it lands |
No it's not. It is going to give the same error message on ranges (which is debatable), but it will give the correct error message with slices. |
@arielb1: This feature isn't just for ranges and slices. So for now, this is a regression. |
GuillaumeGomez
removed
the
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
label
May 18, 2016
bors
added a commit
that referenced
this issue
May 19, 2016
implement fuzzy matching in on_unimplemented Fixes #31062 r? @nikomatsakis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As discussed on IRC. cc @steveklabnik
If you do
slice[2i32]
you get an error that tells you what is wrong (Index<i32>
is not implemented for[T]
) but not how to fix it (slices are indexed by usize). A quick fix would be to use#[rustc_on_unimplemented]
; it would look like this.If you are indexing something that isn't
[T]
then the message would be a false positive.The text was updated successfully, but these errors were encountered: