]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #15356 : pcwalton/rust/wrong-implementor, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 4 Jul 2014 04:56:16 +0000 (04:56 +0000)
committerbors <bors@rust-lang.org>
Fri, 4 Jul 2014 04:56:16 +0000 (04:56 +0000)
parameters.

This can break code that mistakenly used type parameters in place of
`Self`. For example, this will break:

    trait Foo {
        fn bar<X>(u: X) -> Self {
            u
        }
    }

Change this code to not contain a type error. For example:

    trait Foo {
        fn bar<X>(_: X) -> Self {
            self
        }
    }

Closes #15172.

[breaking-change]

r? @alexcrichton


Trivial merge