-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Projecting <Type as Trait>::N
should check that N
is part of Trait
#22731
Comments
see also #19883 , which fixed a very similar bug, but presumably did so in a much more roundabout manner than what I am attempting. update: Oh I see, someone thought the issue was fixed because they started seeing failures on the particular test case that had been filed, and so they just added tests codifying those (strange) error messages. |
I think this is fixed, I see
👍 |
And at this point I do not know what regression tests my earlier comment was referencing; there are not any such tests on #22759 ... |
Hmm, maybe I meant to reference #21259 and just mistyped? Or maybe I meant to refer to this issue itself? Reopened so that I'll attempt to put in the corresponding tests. |
This is fixed & tested. |
spawned off of #21259
test case
The above code should be rejected by the compiler, because
<Self as Impled>::Noexist
is not a well-formed projection of an associated item. Instead, it currently runs.(This bug is not quite as bad as it might seem, since one easily runs into problems if one actually attempts to program generically with this trait and associated item, as shown in the below modification to the last three lines above. This new program is correctly rejected by the compiler, though perhaps with messages that are ... subpar:)
Transcript of error output:
The text was updated successfully, but these errors were encountered: