Add Imenu support for rust-mode.

+ Delete trailing whitespace.
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.
auto merge of #10831 : luqmana/rust/9382, r=nikomatsakis

Fixes #9382.

r? @nikomatsakis
auto merge of #10844 : huonw/rust/deriving-expn-info, r=alexcrichton

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.

(includes some cleanup/preparation; the commit view might be nicer, to filter out the noise of the first one.)
Fix the linked targets for rustc

Right now multiple targets/hosts is broken because the libdir passed for all of
the LLVM libraries is for the wrong architecture. By using the right arch
(target, not host), everything is linked and assembled just fine.
auto merge of #10850 : alexcrichton/rust/fix-target, r=pcwalton

Right now multiple targets/hosts is broken because the libdir passed for all of
the LLVM libraries is for the wrong architecture. By using the right arch
(target, not host), everything is linked and assembled just fine.
encode trait lifetime params in metadata to allow cross-crate usage