]> git.lizzy.rs Git - rust.git/commit
std: Remove #[old_orphan_check] from PartialEq
authorAlex Crichton <alex@alexcrichton.com>
Wed, 11 Mar 2015 00:59:23 +0000 (17:59 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 31 Mar 2015 20:39:14 +0000 (13:39 -0700)
commit5cf126ae2f6af1cdac901f6995e3c2bab35e587f
treef7e9a256438a06caa8bdc0f881e0f4bbb5a7e4de
parent80bf31dd514055177b22c3dc66836d39eb5b1648
std: Remove #[old_orphan_check] from PartialEq

This is a deprecated attribute that is slated for removal, and it also affects
all implementors of the trait. This commit removes the attribute and fixes up
implementors accordingly. The primary implementation which was lost was the
ability to compare `&[T]` and `Vec<T>` (in that order).

This change also modifies the `assert_eq!` macro to not consider both directions
of equality, only the one given in the left/right forms to the macro. This
modification is motivated due to the fact that `&[T] == Vec<T>` no longer
compiles, causing hundreds of errors in unit tests in the standard library (and
likely throughout the community as well).

cc #19470
[breaking-change]
19 files changed:
src/doc/trpl/macros.md
src/libcollections/linked_list.rs
src/libcollections/vec.rs
src/libcollectionstest/enum_set.rs
src/libcollectionstest/str.rs
src/libcollectionstest/vec_deque.rs
src/libcore/cmp.rs
src/libcore/cmp_macros.rs
src/libcore/iter.rs
src/libcore/macros.rs
src/libcoretest/mem.rs
src/libfmt_macros/lib.rs
src/librustc_driver/test.rs
src/libstd/collections/hash/set.rs
src/libstd/old_io/buffered.rs
src/libstd/old_io/util.rs
src/libstd/old_path/posix.rs
src/libsyntax/util/small_vector.rs
src/test/run-fail/assert-eq-macro-panic.rs