-
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
regression around trait bounds with associated types #33586
Comments
(This affects the latest Rayon.) |
Note that the error messages are talking about |
Really this is enough to show the problem: trait ParallelIterator {
type Item;
fn drive_unindexed<C>(self, consumer: C) -> C::Result
where C: Consumer<Self::Item>;
}
pub trait Consumer<ITEM> {
type Result;
}
fn main() { } |
This DOES compile, which gives a pretty good clue: trait ParallelIterator {
type Item;
fn drive_unindexed<C>(self, consumer: C) -> <C as Consumer<Self::Item>>::Result
where C: Consumer<Self::Item>;
}
pub trait Consumer<ITEM> {
type Result;
}
fn main() { } |
cc @eddyb any PRs that you've seen whih might affect how |
This is blocking a Servo upgrade of rustc currently. We seem to be stuck around 2016-05-07 until this is fixed. |
Seems likely to be a problem in the resolve refactoring. Basically the cc @jseyfried the problem seems to lie in resolve |
never mind, I think the problem is in astconv |
Got to love nondescript cleanup commits. |
I've also noticed that this crate fails on the current nightly for presumably similar reasons |
…-type-path, r=eddyb re-introduce a cache for ast-ty-to-ty It turns out that `ast_ty_to_ty` is supposed to be updating the `def` after it finishes, but at some point in the past it stopped doing so. This was never noticed because of the `ast_ty_to_ty_cache`, but that cache was recently removed. This PR fixes the code to update the def properly, but apparently that is not quite enough to make the operation idempotent, so for now we reintroduce the cache too. Fixes rust-lang#33586. r? @eddyb
… r=eddyb re-introduce a cache for ast-ty-to-ty It turns out that `ast_ty_to_ty` is supposed to be updating the `def` after it finishes, but at some point in the past it stopped doing so. This was never noticed because of the `ast_ty_to_ty_cache`, but that cache was recently removed. This PR fixes the code to update the def properly, but apparently that is not quite enough to make the operation idempotent, so for now we reintroduce the cache too. Fixes #33586. r? @eddyb
The following code works on stable, but not on the latest master. I believe it is valid.
On master I get:
The text was updated successfully, but these errors were encountered: