std::libc: Remove TCHAR types
std::libc: Simplify win32/win64 type definitions
std: Fix transmute error on win64
llvm: Disable pthreads on mingw-w64 platforms
std::rt: Fix record_stack_bounds on win64
std::rt: Fix crate_map on Win64
Represent C-like enums with a plain LLVM integer, not a struct.

This is needed so that the FFI works as expected on platforms that don't
flatten aggregates the way the AMD64 ABI does, especially for `#[repr(C)]`.

This moves more of `type_of` into `trans::adt`, because the type might
or might not be an LLVM struct.
Move LittleLock to using RAII

This moves the locking/waiting methods to returning an RAII struct instead of
relying on closures. Additionally, this changes the methods to all take
'&mut self' to discourage recursive locking. The new method to block is to call
`wait` on the returned RAII structure instead of calling it on the lock itself
(this enforces that the lock is held).

At the same time, this improves the Mutex interface a bit by allowing
destruction of non-initialized members and by allowing construction of an empty
mutex (nothing initialized inside).
Fix the usual check-fast scoping mistake.
rustc: Add lint for misplaced crate attributes
rustc: Add lint for obsolete attributes

This also moves `#[auto_{en,de}code]` checker from syntax to lint.
std: Remove unused attributes

This also enables two tests properly.
Add tests for attribute lint
auto merge of #10652 : jld/rust/enum-unstruct, r=thestinger

This is needed so that the FFI works as expected on platforms that don't
flatten aggregates the way the AMD64 ABI does, especially for `#[repr(C)]`.

This moves more of `type_of` into `trans::adt`, because the type might
or might not be an LLVM struct.

Closes #10308.
rustc: Add lint for unknown attributes
Add test for unknown attribute lint
rustc: Update obsolete attribute list
rustc: Add crate-level attribute lint
auto merge of #10316 : klutzy/rust/attr-lint, r=cmr

This patchset makes warning if crate-level attribute is used at other places, obsolete attributed is used, or unknown attribute is used, since they are usually from mistakes.

Closes #3348
auto merge of #10631 : klutzy/rust/win-fixes, r=alexcrichton

This patchset fixes some parts broken on Win64.

This also adds `--disable-pthreads` flags to llvm on mingw-w64 archs (both 32-bit and 64-bit, not mingw) due to bad performance. See #8996 for discussion.