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 upWrong error message when attempting to use a trait method's result as array length #48701
Comments
gnzlbg
changed the title
Confusing error message when using trait method for array length
Wrong error message when using trait method for array length
Mar 3, 2018
gnzlbg
changed the title
Wrong error message when using trait method for array length
Wrong error message when attempting to use a trait method's result as array length
Mar 3, 2018
pietroalbini
added
C-enhancement
A-diagnostics
T-compiler
labels
Mar 6, 2018
This comment has been minimized.
This comment has been minimized.
|
Is this a duplicate of: #44168 ? That one uses an associated constant but they do look really similar otherwise. |
This comment has been minimized.
This comment has been minimized.
|
Closing as a duplicate of #44168. The "trait bounds don't work in array length" aspect of this is the same issue. |
dtolnay
closed this
Jun 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gnzlbg commentedMar 3, 2018
The following code came up on IRC. It cannot ever work, but the error message is completely wrong (playground):
outputs:
This error messages is 100% wrong:
Fdoes implement the traitFoosince the function signature does require it.