diff options
| author | klensy <klensy@users.noreply.github.com> | 2025-06-17 13:59:53 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2025-06-17 13:59:53 +0300 |
| commit | 8c83935cdf87d4e3c0d9e7796fc810fb54ecbf39 (patch) | |
| tree | b1c85aae31c3fcadcb2f0be6457f7cf87c494e23 /compiler/rustc_ty_utils/src | |
| parent | 55d436467c351b56253deeba209ae2553d1c243f (diff) | |
| download | rust-8c83935cdf87d4e3c0d9e7796fc810fb54ecbf39.tar.gz rust-8c83935cdf87d4e3c0d9e7796fc810fb54ecbf39.zip | |
apply clippy::or_fun_call
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/layout.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs index 9774263e4c9..d5222822461 100644 --- a/compiler/rustc_ty_utils/src/layout.rs +++ b/compiler/rustc_ty_utils/src/layout.rs @@ -896,10 +896,9 @@ fn variant_info_for_coroutine<'tcx>( variant_size = variant_size.max(offset + field_layout.size); FieldInfo { kind: FieldKind::CoroutineLocal, - name: field_name.unwrap_or(Symbol::intern(&format!( - ".coroutine_field{}", - local.as_usize() - ))), + name: field_name.unwrap_or_else(|| { + Symbol::intern(&format!(".coroutine_field{}", local.as_usize())) + }), offset: offset.bytes(), size: field_layout.size.bytes(), align: field_layout.align.abi.bytes(), |
