-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
where clause in generic associated types causes no output #47206
Comments
cc @rust-lang/compiler — this is the source of that recent regression. Anybody care to investigate? |
Feature gate where clauses on associated type impls Fixes rust-lang#52913. This doesn't address the core problem, which is tracked by rust-lang#47206. However, it fixes the stable-to-stable regression: you now have to enable `#![feature(generic_associated_types)]` to trigger the weird behaviour.
Feature gate where clauses on associated type impls Fixes rust-lang#52913. This doesn't address the core problem, which is tracked by rust-lang#47206. However, it fixes the stable-to-stable regression: you now have to enable `#![feature(generic_associated_types)]` to trigger the weird behaviour.
Feature gate where clauses on associated type impls Fixes rust-lang#52913. This doesn't address the core problem, which is tracked by rust-lang#47206. However, it fixes the stable-to-stable regression: you now have to enable `#![feature(generic_associated_types)]` to trigger the weird behaviour.
Huh I'm still not sure what the heck is going on here. I started doing a bit of digging. I found that we seem to be dying sometime in |
OK, rust seems to panic. I don't know why this doesn't yield any output yet. I intercepted it in gdb:
|
Found the immediate problem, which is that we invoked Here: rust/src/librustc_typeck/astconv.rs Lines 696 to 698 in f7202e4
|
visited for triage. Clearing nomination tag as @nikomatsakis did the investigation that he asked for. PR #53748 should fix the most problematic issues (namely that this would affect non-feature-gated code). @nikomatsakis recommends P-medium for the remaining issue (which I infer is a remaining effect on some other feature-gated code) |
…atsakis Make GATs less ICE-prone. After this PR simple lifetime-generic associated types can now be used in a compiling program. There are two big limitations: * rust-lang#30472 has not been addressed in any way (see src/test/ui/generic-associated-types/iterable.rs) * Using type- and const-generic associated types errors because bound types and constants aren't handled by trait solving. * The errors are technically non-fatal, but they happen in a [part of the compiler](https://github.com/rust-lang/rust/blob/4abb0ad2731e9ac6fd5d64d4cf15b7c82e4b5a81/src/librustc_typeck/lib.rs#L298) that fairly aggressively stops compiling on errors. closes rust-lang#47206 closes rust-lang#49362 closes rust-lang#62521 closes rust-lang#63300 closes rust-lang#64755 closes rust-lang#67089
I'm working on implementing generic associated types in the compiler with mentoring by @nikomatsakis. He recently discovered an interesting issue that we're haven't found the source of yet. It seems that having a where clause like the one below results in a compilation error but no output.
The feature isn't actually fully finished yet, so we expect a compilation error. It just isn't clear why the compiler isn't actually reporting any specific problems. The message says that it failed due to a previous error but doesn't list any errors at all.
Here's the code that reproduces the issue: (Playground link)
Here's the output:
This is on the nightly compiler because the feature is gated while we're still working on it. If you try to run this on stable or beta, you get a normal error message.
If you delete the
where T: Iterator
you get an ICE which I think is expected given what I still have left to implement for the generic associated types feature.It might be that this gets fixed while we keep implementing generic associated types. Creating this issue will make sure that this doesn't get forgotten along the way.
The text was updated successfully, but these errors were encountered: