about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-09-26 21:47:47 +0000
committerbors <bors@rust-lang.org>2014-09-26 21:47:47 +0000
commitd64b4103d688f38c2e9e2daf966d50beeb383f1e (patch)
tree5242f7c1eae334e68e7709667a0f63b850e9beaf /src/rustllvm/PassWrapper.cpp
parent5d653c17a656e8fe1572c7a695e33b188eda0597 (diff)
parent21df9c805f6e0101cff7a04391c6c5fcff8056df (diff)
downloadrust-d64b4103d688f38c2e9e2daf966d50beeb383f1e.tar.gz
rust-d64b4103d688f38c2e9e2daf966d50beeb383f1e.zip
auto merge of #17464 : pcwalton/rust/inherent-methods-on-equal-footing, r=nikomatsakis
over inherent methods accessible via more autoderefs.

This simplifies the trait matching algorithm. It breaks code like:

    impl Foo {
        fn foo(self) {
            // before this change, this will be called
        }
    }

    impl<'a,'b,'c> Trait for &'a &'b &'c Foo {
        fn foo(self) {
            // after this change, this will be called
        }
    }

    fn main() {
        let x = &(&(&Foo));
        x.foo();
    }

To explicitly indicate that you wish to call the inherent method, perform
explicit dereferences. For example:

    fn main() {
        let x = &(&(&Foo));
        (***x).foo();
    }

Part of #17282.

[breaking-change]

r? @nikomatsakis
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions