Modules are either public, or private, so private modules should be stripped out
Discard MTWT & interner tables from TLD after they stop being useful.
rustc: Fix x86 ffi for struct arguments

This fixes struct passing abi on x86 ffi: Structs are now passed
indirectly with byval attribute (as clang does).
rustc: Fix x86 ffi for empty struct arguments
rustc: put ty_trait behind some indirection.

This reduces ty::sty from 160 bytes to just 112, and some measurements
eddyb made suggest that the ty_trait variant occurs very
rarely (e.g. ~1% of all sty instances) hence this will result in a large
memory saving, and the cost of the indirection is unlikely to be an
issue.
rustc: put ty_closure behind some indirection.

This reduces the size of sty from 112 to 96; like with the ty_trait
variant, this variant of sty occurs rarely (~1%) so the benefits are
large and the costs small.
auto merge of #12762 : klutzy/rust/win-struct-abi, r=alexcrichton

This fixes struct passing abi on x86 ffi: Structs are now passed
indirectly with byval attribute (as clang does).
Empty structs are also explicitly ignored rather than directly passed.

Fixes #5744
Fixes #11198
Fixes #11343
auto merge of #12879 : Aatch/rust/rustdoc-mod-privacy, r=alexcrichton

Modules don't actually inherit privacy, so anything other than Public should be considered private.

Fixes #12801

cc @cmr
auto merge of #12770 : eddyb/rust/drop-tld, r=cmr

Sadly, this seems to make memory usage worse (unless `Vec<T>` makes it worse and this PR doesn't change that much, which is entirely possible).
Fix spans for enum-struct match arms

Correct spans for fields in enum struct arms where the field and variable are unified
auto merge of #13013 : huonw/rust/tytrait, r=cmr

These variants occur rarely but inflate the whole enum for the other variants, leaving a lot of wasted space. In total this reduces `ty::sty` from 160 bytes to 96 (on a 64-bit platform).

After this, `ty_struct` and `ty_enum` are the largest variants, with the 80-byte `substs` being the major contributor.
rename std::vec -> std::slice

Closes #12702
auto merge of #12772 : thestinger/rust/slice, r=alexcrichton

Closes #12702
auto merge of #12854 : nick29581/rust/parse-enum-struct, r=alexcrichton

...where the field and variable are unified
Add a Share kind

Fixes #11781
Make `Rc`, `Cell` and `RefCell` NoShare
Replace Freeze bounds with Share bounds
Relax interner's Share bound

The interner uses `RefCell` internally which opted out from Share.
Add Unsafe<T> type
Make Cell and RefCell use Unsafe<T>