about summary refs log tree commit diff
path: root/compiler/rustc_const_eval
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-04-01 23:55:22 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2023-04-01 23:55:22 +0200
commit73bd953dea25e0aa225eaf8844f2d06807691e3e (patch)
treee2ef4fb8c6385adb394fd6c98d51a581dce698b5 /compiler/rustc_const_eval
parent5a07e33d2cc57d929bbd50a22cad703d4c666fc2 (diff)
downloadrust-73bd953dea25e0aa225eaf8844f2d06807691e3e.tar.gz
rust-73bd953dea25e0aa225eaf8844f2d06807691e3e.zip
slighty simplify a few boolean expressions (clippy::nonminimal_bool)
Diffstat (limited to 'compiler/rustc_const_eval')
-rw-r--r--compiler/rustc_const_eval/src/transform/validate.rs3
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",