]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #55837 - Centril:spökdata-skall-vara-strukturellt-matchbar, r=eddyb
authorkennytm <kennytm@gmail.com>
Tue, 13 Nov 2018 05:03:10 +0000 (13:03 +0800)
committerkennytm <kennytm@gmail.com>
Tue, 13 Nov 2018 11:20:30 +0000 (19:20 +0800)
commitf73df10c3912a82849b05a6338a94a10732a4882
treed780064adeecab75e4d44a2959e318d84a19bb15
parent98bc7d63fbc78643532853db3cb289bacc86167c
parent5e7b7f2ae6f29e66c99b6c38d7041fb71e8a36fd
Rollup merge of #55837 - Centril:spökdata-skall-vara-strukturellt-matchbar, r=eddyb

Make PhantomData #[structural_match]

fixes https://github.com/rust-lang/rust/issues/55028

This makes `PhantomData<T>` structurally matchable, irrespective of whether `T` is, per the discussion on this week's language team meeting (the general consensus was that this was a bug-fix).

All types containing `PhantomData<T>` and which used `#[derive(PartialEq, Eq)]` and were previously not `#[structural_match]` only because of `PhantomData<T>` will now be `#[structural_match]`.

r? @nikomatsakis
src/libcore/lib.rs