diff options
| author | Michael Goulet <michael@errs.io> | 2023-11-25 17:12:15 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-11-25 18:47:16 +0000 |
| commit | 079a2e865fbe8d3a0050afdfcd5498c075611e36 (patch) | |
| tree | 2429762abd37b7e23e07f3211995c3f180be85ee /compiler/rustc_mir_dataflow | |
| parent | fe3038f263349190f02491d7467198e17ffb0858 (diff) | |
is_{some,ok}_and
Diffstat (limited to 'compiler/rustc_mir_dataflow')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/value_analysis.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs index 9dcd5f22a2d..071024a0fa3 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -823,7 +823,7 @@ impl Map { ) { // Allocate a value slot if it doesn't have one, and the user requested one. assert!(self.places[place].value_index.is_none()); - if tcx.layout_of(param_env.and(ty)).map_or(false, |layout| layout.abi.is_scalar()) { + if tcx.layout_of(param_env.and(ty)).is_ok_and(|layout| layout.abi.is_scalar()) { self.places[place].value_index = Some(self.value_count.into()); self.value_count += 1; } |
