Files
rust/src/libstd
Patrick Walton 21df9c805f librustc: Give trait methods accessible via fewer autoderefs priority
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]
2014-09-26 13:02:47 -07:00
..
2014-09-16 14:37:48 -07:00
2014-09-16 14:37:48 -07:00
2014-09-04 07:38:53 -07:00
2014-06-30 22:49:18 -07:00
2014-07-11 14:25:15 -07:00
2014-09-21 21:05:05 -07:00
2014-07-21 09:54:52 -07:00