librustc: Pass the correct type when adding cleanups.
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.
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.
Renamed Option::map_default and mutate_default to map_or and mutate_or_set
Changed parameter order of map_or and mutate_or_set to be true to the
function name.