Use Option::is_some_and
and Result::is_ok_and
in the compiler
This commit is contained in:
parent
70db836922
commit
fb0f74a8c9
87 changed files with 148 additions and 158 deletions
|
@ -1031,7 +1031,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
});
|
||||
|
||||
let needs_location =
|
||||
instance.map_or(false, |i| i.def.requires_caller_location(self.cx.tcx()));
|
||||
instance.is_some_and(|i| i.def.requires_caller_location(self.cx.tcx()));
|
||||
if needs_location {
|
||||
let mir_args = if let Some(num_untupled) = num_untupled {
|
||||
first_args.len() + num_untupled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue