-
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
compiler error: lifetimes in associated types leading to a compiler error. #58694
Comments
|
That's correct, but even without enabled feature it crashes, which should not happen, or am I wrong? :/ |
cc @rust-lang/compiler @rust-lang/release It's technically a stable-to-beta regression, but it goes from hard error to ICE so I don't think it's worth blocking the release on this. (Also woops, mistakenly closed the issue) |
As long as we're not breaking working code it's not really a breakage and so I agree we should not block a release on it. |
Also +1 for not blocking the release on this. This error does not only occur in code that is illegal, it (apparently) only occurs in code that has already triggered a visible, clear, feature-gate error. Therefore, it's not even a particularly-high risk for confusing users (unlike e.g. an ICE that occurs instead of a valid error message, or an ICE that occurs after an obscure error message). |
triage: P-medium. Assigning to self for initial investigation. (P-medium based on the reasons given by @arielb1 : the risks for end users here do seem quite low.) |
triage: confirmed this was promoted into stable, as one would expect based on the conversation above. Marking as regression-from-stable-to-stable. |
This seems like it was fixed. Going to bisect and see if a corresponding test was already added at time it was fixed. |
Fixed between nightly-2019-05-25 (dec4c52 2019-05-24) and nightly-2019-05-26 (f492693 2019-05-25) Here's what landed in that time frame:
|
@pnkfelix it is not really fixed. It doesn't crash anymore with the above code, but it still ICEs with the feature gate: playground |
well, if the ICE is not occurring any more when the feature attribute is omitted and we're back to a hard error, then its not a regression-from-stable-to-stable. |
(the remaining bug, when the feature gate is enabled, is tracked in issue #62521) |
closing as fixed as remaining bug is in #62521 |
Hello!
I am getting a compiler error when trying to define the following trait:
I would have expected my code to compile successfully, or to exit with some error explaining why static compilation failed.
Instead, I am getting a:
More specifically, I'm having troubles trying to define some type
PublicKey
that must implementAsRef<[u8]>
andFrom<&[u8]>
. If I try with lifetimes I get this compiler error; if I replace the from trait withFrom<[u8; N]>
for some const N: usize (enablinggeneric_associated_types
andconst_generics
) I get:Am I doing something terribly stupid here or const generics for associated types are not yet ready and lifetimes on associated types lead to a compiler error?
Here's the full traceback
The text was updated successfully, but these errors were encountered: