See: https://gist.github.com/Meyermagic/10636908 (where the underscores in the filenames represent forward slashes / subdirectories)
With Foo as an enum, the TypeId differs in each crate. With a simple struct, the TypeIds match.