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
If I have an associated type that impls some trait or is some other known type, I can't treat it as so. Example (playpen link):
traitDoNothing{typeOutput;}structBob;implBob{fnprint(){println!("I AM BOB!");}}implDoNothingforBob{typeOutput = Bob;}typeBobAlso = <BobasDoNothing>::Output;fnmain(){// works fine:Bob::print();// compiler error:BobAlso::print();}
The type BobAlso is (or should be) just an alias for Bob, however when I try to call its print() function, the compiler complains that there is no print for <Bob as DoNothing>::Output without figuring out that that it isBob.