-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Bogus associated type HKT syntax somehow compiles with no errors #23543
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Comments
use std::marker::PhantomFn;
trait Trait<T>: PhantomFn<Self, T> {}
impl<T> Trait<T> for () where Trait<T>: Eq {}
fn main() {} This seems similar (illegal bounds at where clause) |
This is incorrectly labelled. This should be |
@bombless I'm not sure that is illegal, since use std::marker::PhantomFn;
trait Trait<T>: PhantomFn<Self, T> {}
impl<T> Trait<T> for () where Trait<T>: Eq {}
fn foo<T, U: Trait<T>>() {}
impl PartialEq for Trait<u16> {
fn eq(&self, _: &Trait<u16>) -> bool { false }
}
impl Eq for Trait<u16> {}
fn main() {
foo::<u16, ()>();
// foo::<u8, ()>();
// error: the trait `core::cmp::Eq` is not implemented for the type `Trait<u8>`
} |
Triage: can't reproduce.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Code:
playpen
This isn't supposed to compile at all.
Probably a variant of #23544
The text was updated successfully, but these errors were encountered: