about summary refs log tree commit diff
path: root/src/test/compile-fail/dup-struct-enum-struct-variant.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-07-02 15:38:20 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-07-02 15:40:09 -0700
commitc3ae64a5cff47edcbe73885bc00e715d082ef5ec (patch)
tree4005174e5b7ecba5556c18d742eb220852a99724 /src/test/compile-fail/dup-struct-enum-struct-variant.rs
parent169c988d09a9d4e46de2b7fead9489e94964c7c7 (diff)
downloadrust-c3ae64a5cff47edcbe73885bc00e715d082ef5ec.tar.gz
rust-c3ae64a5cff47edcbe73885bc00e715d082ef5ec.zip
librustc: Take the parameter space into account when combining type
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]
Diffstat (limited to 'src/test/compile-fail/dup-struct-enum-struct-variant.rs')
0 files changed, 0 insertions, 0 deletions