about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2019-07-03 16:53:42 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2019-07-08 11:51:39 +0200
commitb56080162bc45e1cfd561b0a21e50b827c9df679 (patch)
treea071403bb95a4910651d72f8bd8433dab7cc7dc8 /src/test/ui/thinlto
parent36777f157b1f30f208e913c0ec04f9ac6b567a4e (diff)
downloadrust-b56080162bc45e1cfd561b0a21e50b827c9df679.tar.gz
rust-b56080162bc45e1cfd561b0a21e50b827c9df679.zip
Rewrite with future-compat lint for indirect pattern omitting
`#[structural_match]`.

Outline of changes:

 * Recur as deeply as necessary when searching for `#[structural_match]`.

 * `#[structural_match]`: handle case of `const A: & &Wrap(NoDerive)`
   by including the fields of an ADT during traversal of input
   type. (We continue to not traverse the substs of an ADT, though, so
   that we continue to handle `PhantomData<NoDerive>` and `*NoDerive`
   properly.)

 * Refactored code to use `match` instead of `if let`. This ends up
   *with less* right-ward drift by moving the handling of the main
   *`ty::Adt` case *outside* the match.

 * Using lint (rather than hard error) mmeans we need to check that
   type is `PartialEq` to avoid ICE'ing the compiler in scneario where
   MIR codegen dispatches to `PartialEq::eq`. Added said check, and
   fatal error in that case.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions