diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-04-02 10:08:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-02 10:08:35 +0200 |
| commit | 59f394bf8645729a1ffdcbf04745e5566ea045c1 (patch) | |
| tree | 5571ebcf2e98536af4f444f8d5882fc674877489 /compiler/rustc_const_eval/src | |
| parent | e2ffe151a3f7e58d8623e67ba7ce97c25c3ae414 (diff) | |
| parent | 73bd953dea25e0aa225eaf8844f2d06807691e3e (diff) | |
| download | rust-59f394bf8645729a1ffdcbf04745e5566ea045c1.tar.gz rust-59f394bf8645729a1ffdcbf04745e5566ea045c1.zip | |
Rollup merge of #109846 - matthiaskrgr:clippy2023_04_III, r=Nilstrieb
more clippy::complexity fixes (iter_kv_map, map_flatten, nonminimal_bool)
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/validate.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/transform/validate.rs b/compiler/rustc_const_eval/src/transform/validate.rs index cd5c92f7342..558253f727b 100644 --- a/compiler/rustc_const_eval/src/transform/validate.rs +++ b/compiler/rustc_const_eval/src/transform/validate.rs @@ -677,8 +677,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { ); } if let Rvalue::CopyForDeref(place) = rvalue { - if !place.ty(&self.body.local_decls, self.tcx).ty.builtin_deref(true).is_some() - { + if place.ty(&self.body.local_decls, self.tcx).ty.builtin_deref(true).is_none() { self.fail( location, "`CopyForDeref` should only be used for dereferenceable types", |
