Trait bound on type alias

I agree it's a hole that should be filled, though I'd phrase it more as "why aren't bounds enforced on type aliases" instead of "why are trait bounds enforced on associated types". Here's the issue.

Here's a workaround (perhaps there are better ones):

type MyAlias /*: MyTrait*/ = MyType;
struct MyAliasGuard<T: MyTrait + ?Sized>([T; 0]);
static MY_ALIAS_GUARD: MyAliasGuard<MyAlias> = MyAliasGuard([]);

Edit: e.g. of better, by supporting non-Sized aliases...

use core::marker::PhantomData;
type MyAlias /*: MyTrait*/ = MyType;
struct MyAliasGuard<T: MyTrait + ?Sized>(PhantomData<T>);
static MY_ALIAS_GUARD: MyAliasGuard<MyAlias> = MyAliasGuard(PhantomData);