Uh oh!
There was an error while loading. Please reload this page.
E0608 - #42568
Conversation
rust-highfive
commented
Jun 9, 2017
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
This isn't really getting an index, at least in the eyes of the user, is it? It's more trying to index into the type. Maybe rephrase this as "An attempt to index into a type which doesn't implement the Index trait was performed." Maybe it actually makes sense to use std::ops::Index instead of Index as well.
There was a problem hiding this comment.
I would use "cannot index into a value of type {}" instead
There was a problem hiding this comment.
That's not the into the problem, that's the index. I think switching the message to this would make the error lose its meaning.
There was a problem hiding this comment.
This is separate than the Into trait stuff. I've always heard indexing described as being into something, like you "index into an array", you don't "index an array". The latter sounds weird to me. With the current PR you use "index into" in the detailed explanation, but the short error title is still "index a value". This should at least be consistent.
There was a problem hiding this comment.
Ok, let me rewrite this then.
GuillaumeGomez
commented
Jun 10, 2017
Updated. |
There was a problem hiding this comment.
This is separate than the Into trait stuff. I've always heard indexing described as being into something, like you "index into an array", you don't "index an array". The latter sounds weird to me. With the current PR you use "index into" in the detailed explanation, but the short error title is still "index a value". This should at least be consistent.
GuillaumeGomez
commented
Jun 11, 2017
Updated. |
bors
commented
Jun 12, 2017
☔ The latest upstream changes (presumably #42585) made this pull request unmergeable. Please resolve the merge conflicts. |
GuillaumeGomez
commented
Jun 12, 2017
Updated as well. cc @Susurrus |
There was a problem hiding this comment.
Instead "To be able to index into a type it needs to implement ..."
GuillaumeGomez
commented
Jun 15, 2017
And updated. |
QuietMisdreavus
commented
Jun 15, 2017
Looks good! @bors r+ |
bors
commented
Jun 15, 2017
📌 Commit b6e9ed1 has been approved by |
bors
commented
Jun 16, 2017
bors
commented
Jun 16, 2017
☀️ Test successful - status-appveyor, status-travis |
Part of #42229.
cc @Susurrus