auto merge of #10721 : osa1/rust/intermediatestr, r=brson

as recommended by @huonw on this PR https://github.com/mozilla/rust/pull/10711 , I removed intermediate step that generates a string instead of directly writing to Writer without generating intermediate string.
Use a macro in lang_items to remove duplication.

This should make maintenance of lang items simpler and also reduces the
line count by about 201 lines.
auto merge of #10758 : alexcrichton/rust/upgrade-llvm, r=alexcrichton

This upgrades LLVM in order to make progress on #10708, and it's also been awhile since we last upgraded!

The contentious point of this upgrade is that all JIT support has been removed because LLVM is changing it and we're not keeping up with it.
Check crate root for docs in missing_doc lint.

Because the root module isn't actually an item, we need to do some hackish
handling of it.

Closes #10656.
auto merge of #10665 : cmr/rust/doc_lint, r=alexcrichton

Because the root module isn't actually an item, we need to do some hackish
handling of it.

Closes #10656.
auto merge of #10832 : chris-morgan/rust/let's-lop-lang-item-line-count, r=alexcrichton

This should make maintenance of lang items simpler and also reduces the
line count by about 201 lines.
librustc: Pass the correct type when adding cleanups.
Made Results API more composable
syntax::deriving: add the cx and span to the TraitDef to reduce duplication.
syntax: print expansion info from #[attribute] macros in the correct
format.

Previously, any attempt to use this information from inside something
like #[deriving(Foo)] would result in it printing like `deriving(Foo)!`.
syntax::deriving: indicate from which trait type errors (etc) arise
using the expansion info.

Previously something like

    struct NotEq;

    #[deriving(Eq)]
    struct Error {
        foo: NotEq
    }

would just point to the `foo` field, with no mention of the
`deriving(Eq)`. With this patch, the compiler creates a note saying "in
expansion of #[deriving(Eq)]" pointing to the Eq.
std::str: Add examples to the StrSlice trait.

Fixes #10819.
Link rustllvm statically, and distribute a static snapshot

In order to keep up to date with changes to the libraries that `llvm-config`
spits out, the dependencies to the LLVM are a dynamically generated rust file.
This file is now automatically updated whenever LLVM is updated to get kept
up-to-date.

At the same time, this cleans out some old cruft which isn't necessary in the
makefiles in terms of dependencies.

Closes #10745
Closes #10744
auto merge of #10809 : alexcrichton/rust/static-snapshot, r=alexcrichton

Now that we have the necessary logic in rustc for windows, this is possible to land.
auto merge of #10364 : Kimundi/rust/result_compose, r=alexcrichton

This implements parts of the changes to `Result` and `Option` I proposed and discussed in this thread: https://mail.mozilla.org/pipermail/rust-dev/2013-November/006254.html

This PR includes:
- Adding `ok()` and `err()` option adapters for both `Result` variants.
- Removing `get_ref`, `expect` and iterator constructors for `Result`, as they are reachable with the variant adapters.
- Removing `Result`s `ToStr` bound on the error type because of composability issues. (See https://mail.mozilla.org/pipermail/rust-dev/2013-November/006283.html)
- Some warning cleanups
auto merge of #10797 : pradeep90/rust/rust-mode-changes, r=brson

+ Delete trailing whitespace.
auto merge of #10824 : huonw/rust/str-doc, r=alexcrichton

Fixes #10819.
std::rand: move normal and exponential to their own file.
std::rand: implement the log-normal distribution.
auto merge of #10831 : luqmana/rust/9382, r=nikomatsakis

Fixes #9382.

r? @nikomatsakis