slighty simplify a few boolean expressions (clippy::nonminimal_bool)
This commit is contained in:
parent
5a07e33d2c
commit
73bd953dea
4 changed files with 4 additions and 5 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue