From 73bd953dea25e0aa225eaf8844f2d06807691e3e Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sat, 1 Apr 2023 23:55:22 +0200 Subject: slighty simplify a few boolean expressions (clippy::nonminimal_bool) --- compiler/rustc_const_eval/src/transform/validate.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/rustc_const_eval/src') 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", -- cgit 1.4.1-3-g733a5