-
Notifications
You must be signed in to change notification settings - Fork 13.4k
objc2 fails to build on latets nightly #109632
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Note in particular that it's only the overridden A smaller reproducer can be found in this playground. If you either remove the |
searched nightlies: from nightly-2023-03-18 to nightly-2023-03-26 bisected with cargo-bisect-rustc v0.6.5Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc -- check Regression in #104100. Looks like this is caused by this bound: rust/library/core/src/iter/traits/iterator.rs Line 393 in 89c2e3d
@rustbot label -E-needs-bisection |
That's what I suspected, thanks for confirming it! Though I agree with the assessment in madsmtm/objc2#432 (comment) that the added |
It's not supposed to regress normal code, but if it does it is a bug. I'm going to look into this when I have time. |
This seems to be a general limitation of the old trait solver and unrelated to But it works with the new trait solver ( pub struct GenericType<T>(T);
pub trait Trait1 {
type Assoc1;
}
trait Trait2 {
type Assoc2;
}
impl<T: Trait1> Trait2 for GenericType<T> {
type Assoc2 = T::Assoc1;
}
trait Anything {}
trait MyIterator {
type MyItem;
fn my_nth() where Self::MyItem: Anything;
}
impl<T: Trait1> MyIterator for GenericType<T>
where
<Self as Trait2>::Assoc2: MyIterator,
// <T as Trait1>::Assoc1: MyIterator, // stop-gap fix
{
type MyItem = <<Self as Trait2>::Assoc2 as MyIterator>::MyItem;
fn my_nth() {}
}
(also the suggestion is wrong) |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high +T-compiler |
Our CI in winit started breaking on nightly recently due to inability of recent rustc nightly to build the https://github.com/madsmtm/objc2 crate, in particular you can look into madsmtm/objc2#432 issue.
Error
The error we get is:
I expected to see this happen: it should build.
Instead, this happened: it doesn't build, see above.
Version it worked on
It most recently worked on: rust version 1.69.0-nightly (31f858d 2023-02-28)
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: