You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bogus associated type HKT syntax somehow compiles with no errors #23543
@bombless I'm not sure that is illegal, since Trait<T> is a valid type (its is a DST): that impl is just conditional on whether the Trait<T> type implements Eq, e.g.
use std::marker::PhantomFn;traitTrait<T>:PhantomFn<Self,T>{}impl<T>Trait<T>for()whereTrait<T>:Eq{}fnfoo<T,U:Trait<T>>(){}implPartialEqforTrait<u16>{fneq(&self, _:&Trait<u16>) -> bool{false}}implEqforTrait<u16>{}fnmain(){foo::<u16,()>();// foo::<u8, ()>();// error: the trait `core::cmp::Eq` is not implemented for the type `Trait<u8>`}
tmp.rs:7:17: 7:28 error: associated type bindings are not allowed here [E0229]
tmp.rs:7 where T<Bogus = Foo>: A;
^~~~~~~~~~~
error: aborting due to previous error
Activity
bombless commentedon Apr 1, 2015
This seems similar (illegal bounds at where clause)
theemathas commentedon Apr 1, 2015
This is incorrectly labelled. This should be
I-wrong, notI-ICEhuonw commentedon Apr 1, 2015
@bombless I'm not sure that is illegal, since
Trait<T>is a valid type (its is a DST): thatimplis just conditional on whether theTrait<T>type implementsEq, e.g.Stebalien commentedon Sep 16, 2015
Triage: can't reproduce.
Auto merge of #28459 - apasel422:tests, r=alexcrichton
Merge pull request rust-lang#23543 from Wilfred/panic_derive_macros