TAITs have been troubled by obscure rules around when exactly you may register a hidden type for a while. Additionally the implementation was backwards out of concerns that query caching for the trait solver queries would regress in performance if we'd use a new magical where bound. We're now simplifying the impl and making the language rules clearer at the same time. The way we do that is by adding a #[defines(Foo)] attribute that you can slap on functions to allow them to actually register hidden types for Foo.
Anyway, what I actually wanted to share was this funny diagnostic that I saw because I typoed a lower case char as an upper case one:
error[E0412]: cannot find type `FooT` in this scope
--> $DIR/nested_type_alias_impl_trait.rs:16:15
|
LL | pub type Foot = impl Debug;
| --------------------------- similarly named type alias `Foot` defined here
...
LL | #[defines(FooT)]
| ^^^^ help: a type alias with a similar name exists: `Foot`
We can now have types in attributes. This is not even hacky and easy to reproduce for other cases. Bring me your worst proposals around that :D
