Relicense shootout-threadring.rs

Everyone agreed.

Related to #14248, close #15328
Guide Redux: Pointers
Fill in example code for HashMap.

Add an example showing how to use the map with a custom type. Fill in
examples for methods in the hashmap file without ones.

Also move pop_equiv next to related public methods, to not create a
duplicate trait implementation in the docs.
Remove explicit rust code specifier. Unhide use HashMap.
Documentation examples for LruCache.
Cleanup LruCache doc.
Cleanup HashMap documentation.

Link to mentioned methods. Use `# Failure` tags to describe failure.
Make `pop_equiv`, `find_equiv` and `get_copy` standalone.
Document update and update_with_key in SmallIntMap.

Move update above for better docs progression.
Fix #15896

Fix ICE when there's an incorrect enum variant constructor in match arm.

Closes #15896.
auto merge of #15424 : TeXitoi/rust/relicense-shootout-threadring, r=brson

Everyone agreed.

Related to #14248, close #15328

@brson OK?
rustllvm: Don't require null terminators in files

Apparently the default getFile implementation for a memory buffer in LLVM ends
up requiring a null terminator at the end of the file. This isn't true a good
bit of the time apparently on OSX. There have been a number of failed
nightly/snapshot builds recently with this strange assertion.

This modifies the calls to MemoryBuffer::getFile to explicitly not ask for a
null terminator.
auto merge of #15779 : alexcrichton/rust/no-nul-terminator, r=pcwalton

Apparently the default getFile implementation for a memory buffer in LLVM ends
up requiring a null terminator at the end of the file. This isn't true a good
bit of the time apparently on OSX. There have been a number of failed
nightly/snapshot builds recently with this strange assertion.

This modifies the calls to MemoryBuffer::getFile to explicitly not ask for a
null terminator.
Fix display of `-NaN%` in borrock stats caused by div by zero
Remove obsolete Japanese translation for a while.

The translation is based on an early version of tutorial.md, thus most
of entries have been marked as fuzzy and actually they are incorrect.
Now tutorial.md is planed to be replaced with guide.md, so I'd suggest
removing translation files for a while.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
librustc: Make references to functions not have static lifetime.

This breaks code like:

    struct A<'a> {
        func: &'a fn() -> Option<int>
    }

    fn foo() -> Option<int> { ... }

    fn create() -> A<'static> {
        A {
            func: &foo
        }
    }

Change this code to not take functions by reference. For example:

    struct A {
        func: extern "Rust" fn() -> Option<int>
    }

    fn foo() -> Option<int> { ... }

    fn create() -> A {
        A {
            func: foo
        }
    }

Closes #13595.

[breaking-change]
auto merge of #15945 : treeman/rust/doc-smallint-update, r=alexcrichton

Forgot two methods, but @alexcrichton was a bit too quick to accept  #15943, so I made a new PR.
auto merge of #15951 : edwardw/rust/issue-15896, r=alexcrichton

Fix ICE when there's an incorrect enum variant constructor in match arm.

Closes #15896.
librustc: Stop desugaring `for` expressions and translate them directly.

This makes edge cases in which the `Iterator` trait was not in scope
and/or `Option` or its variants were not in scope work properly.

This breaks code that looks like:

    struct MyStruct { ... }

    impl MyStruct {
        fn next(&mut self) -> Option<int> { ... }
    }

    for x in MyStruct { ... } { ... }

Change ad-hoc `next` methods like the above to implementations of the
`Iterator` trait. For example:

    impl Iterator<int> for MyStruct {
        fn next(&mut self) -> Option<int> { ... }
    }

Closes #15392.

[breaking-change]
auto merge of #15809 : pcwalton/rust/dedesugar-for, r=pnkfelix

librustc: Stop desugaring `for` expressions and translate them directly.

This makes edge cases in which the `Iterator` trait was not in scope
and/or `Option` or its variants were not in scope work properly.

This breaks code that looks like:

    struct MyStruct { ... }

    impl MyStruct {
        fn next(&mut self) -> Option<int> { ... }
    }

    for x in MyStruct { ... } { ... }

Change ad-hoc `next` methods like the above to implementations of the
`Iterator` trait. For example:

    impl Iterator<int> for MyStruct {
        fn next(&mut self) -> Option<int> { ... }
    }

Closes #15392.

[breaking-change]
Add methods for obtaining iterators over the keys and values of a TreeMap