]> git.lizzy.rs Git - rust.git/commit
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)
commit1bff1ff810dcfa8064c11e2b84473f053d1f69f1
tree17705fe81d6cf0a5365c0a870c1260b5e56a2403
parentd623a8bf3c530b900a69c059568079d5cbb4d6b8
parentc3ae64a5cff47edcbe73885bc00e715d082ef5ec
auto merge of #15356 : pcwalton/rust/wrong-implementor, r=alexcrichton

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