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
add rust_trylock_little_lock

Try to acquire lock and succeed only if lock is not already held.
Uses TryEnterCriticalSection or pthread_mutex_trylock.
docs: Change "workspace" to "package directory"

spotted by Yurume
Add shootout meteor contest benchmark.

This implementation of the meteor contest implements:
 - insertion check with bit trick;
 - pregenetation of every feasible placement of the pieces on the
   board;
 - filtering of placement that implies unfeasible board
 - central symetry breaking
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.
auto merge of #10428 : toffaletti/rust/try_lock, r=alexcrichton

I need try_lock for an algorithm I'm trying to implement in Rust.
auto merge of #10018 : fhahn/rust/check-inferred-ints, r=alexcrichton

I've started working on this issue and pushed a small commit, which adds a range check for integer literals in `middle::const_eval` (no `uint` at the moment) 
At the moment, this patch is just a proof of concept, I'm not sure if there is a better function for the checks in `middle::const_eval`. This patch does not check for overflows after constant folding, eg:

    let x: i8 = 99 + 99;
remove useless Iterate impl, and permute the order of the argument of iterate

Writing iterate(x, f) is more logical as rust iterator pipeline is left to right.
Improve variable naming.
remove `cast::unsafe_copy`

This is the same functionality as `ptr::read_ptr`.
auto merge of #10497 : thestinger/rust/cleanup, r=cmr

This is the same functionality as `ptr::read_ptr`.
auto merge of #10478 : TeXitoi/rust/shootout-meteor, r=brson

This implementation of the meteor contest implements:
 - insertion check with bit trick;
 - pregenetation of every feasible placement of the pieces on the
   board;
 - filtering of placement that implies unfeasible board
 - central symetry breaking

related to #2776