slighty simplify a few boolean expressions (clippy::nonminimal_bool)

This commit is contained in:
Matthias Krüger 2023-04-01 23:55:22 +02:00
parent 5a07e33d2c
commit 73bd953dea
4 changed files with 4 additions and 5 deletions

View file

@ -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",