]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #10355 : huonw/rust/deriving-field-spans, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 8 Nov 2013 16:36:08 +0000 (08:36 -0800)
committerbors <bors@rust-lang.org>
Fri, 8 Nov 2013 16:36:08 +0000 (08:36 -0800)
This rearranges the deriving code so that #[deriving] a trait on a field
that doesn't implement that trait will point to the field in question,
e.g.

    struct NotEq; // doesn't implement Eq

    #[deriving(Eq)]
    struct Foo {
        ok: int,
        also_ok: ~str,
        bad: NotEq // error points here.
    }

Unfortunately, this means the error is disconnected from the `deriving`
itself but there's no current way to pass that information through to
rustc except via the spans, at the moment.

Fixes #7724.


Trivial merge