Typeck: Disallow scalar casts to bare_fn.

Bare functions are another example of a scalar but non-numeric
type (like char) that should be handled separately in casts.
This disallows expressions like `0 as extern "Rust" fn() -> int;`.

It might be advantageous to allow casts between bare functions
and raw pointers in unsafe code in the future, to pass function
pointers between Rust and C.

Closes #8728
Remove type overflow checks from check_const.rs, refs #4220

The checks are now handled by the linter
Check inferred integer literals for overflows, closes #4220
be more robust when removing download artifacts and remove bogus raise statement
add rust_trylock_little_lock

Try to acquire lock and succeed only if lock is not already held.
Uses TryEnterCriticalSection or pthread_mutex_trylock.
auto merge of #10464 : gutworth/rust/snap-err, r=pnkfelix

...tatement
Implement native::IoFactory

This commit re-organizes the io::native module slightly in order to have a
working implementation of rtio::IoFactory which uses native implementations. The
goal is to seamlessly multiplex among libuv/native implementations wherever
necessary.

Right now most of the native I/O is unimplemented, but we have existing bindings
for file descriptors and processes which have been hooked up. What this means is
that you can now invoke println!() from libstd with no local task, no local
scheduler, and even without libuv.

There's still plenty of work to do on the native I/O factory, but this is the
first steps into making it an official portion of the standard library. I don't
expect anyone to reach into io::native directly, but rather only std::io
primitives will be used. Each std::io interface seamlessly falls back onto the
native I/O implementation if the local scheduler doesn't have a libuv one
(hurray trait ojects!)
auto merge of #10457 : alexcrichton/rust/native-io, r=brson

This commit re-organizes the io::native module slightly in order to have a
working implementation of rtio::IoFactory which uses native implementations. The
goal is to seamlessly multiplex among libuv/native implementations wherever
necessary.

Right now most of the native I/O is unimplemented, but we have existing bindings
for file descriptors and processes which have been hooked up. What this means is
that you can now invoke println!() from libstd with no local task, no local
scheduler, and even without libuv.

There's still plenty of work to do on the native I/O factory, but this is the
first steps into making it an official portion of the standard library. I don't
expect anyone to reach into io::native directly, but rather only std::io
primitives will be used. Each std::io interface seamlessly falls back onto the
native I/O implementation if the local scheduler doesn't have a libuv one
(hurray trait ojects!)
test: Clean up xfail-{fast,win32} tests

Rename {struct-update,fsu}-moves-and-copies, since win32
failed to run the test since UAC prevents any executable whose
name contaning "update". (#10452)

Some tests related to #9205 are expected to fail on gcc 4.8,
so they are marked as `xfail-win32` instead of `xfail-fast`.

Some tests using `extra::tempfile` fail on win32 due to #10462.
Mark them as `xfail-win32`.
test: Fix signal-exit-status on windows
rustpkg: Disable test suite on windows

sha1, version, util tests are still alive and they pass on win32.
test: Add xfail-win32 to two debug-info tests
doc: Fix example on Windows
auto merge of #10472 : klutzy/rust/cleanup-xfail, r=alexcrichton

Closes #10452.
docs: Change "workspace" to "package directory"

spotted by Yurume
auto merge of #10473 : jschaf/rust/ignore-windows-build-dir, r=alexcrichton

Ignoring the build directory on Windows.
auto merge of #10476 : catamorphism/rust/rustpkg-doc-fix, r=catamorphism

spotted by Yurume
auto merge of #9788 : geoffhill/rust/bare-fn-cast, r=pnkfelix

Bare functions are another example of a scalar but non-numeric
type (like char) that should be handled separately in casts.
This disallows expressions like `0 as extern "Rust" fn() -> int;`.

It might be advantageous to allow casts between bare functions
and raw pointers in unsafe code in the future, to pass function
pointers between Rust and C.

Closes #8728
Fixes formatting

Without this, a.rs appears as a struck out line.
auto merge of #10484 : nibrahim/rust/docfix, r=cmr

Without this, a.rs appears as a struck out line.