-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Stable ICE: assertion failed: (left == right)
#77329
Comments
This started happening on stable 1.36 |
I'm realy unsure on how much this bisect can be trusted, I'm happy to run other ones with a little bit of help, this is the best I got. searched nightlies: from nightly-2020-04-30 to nightly-2020-08-28 bisected with cargo-bisect-rustc v0.5.2Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --regress=non-error |
My bisect:
Command: |
Smaller example: trait Foo {}
fn bug() -> impl Foo<[(); |_: ()| {}]> {} Something wrong with the inference when |
Using regular const generics on nightly produces the same error, so it's probably related: #![feature(min_const_generics)]
trait Foo {}
struct Bar<const N: usize>;
fn bug() -> impl Foo<Bar<{|_: ()| {}}>> {} |
All example include closure. So I don't think it is particular bug for const generics. |
Looks like something blocking const generics, even if it's not directly caused by it. Also something I want to look into myself, so @rustbot claim |
This also breaks code which, if nonsensical, should be working. Don't think we have to increase the priority because of this though. fn bug<T>() -> impl Iterator<Item = [(); { |x: u32| { x }; 4 }]> {
std::iter::empty()
}
fn ok<T>() -> Box<dyn Iterator<Item = [(); { |x: u32| { x }; 4 }]>> {
Box::new(std::iter::empty())
} |
It is a regression - stable 1.26.0 correctly outputs a compile error |
Not something I can fix myself, releasing assignment. |
Something I can fix myself, #77546 (with a lot of guidance by eddyb) |
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: