diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-11 17:23:56 -0400 | 
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-11 17:24:01 -0400 | 
| commit | af8d911d63d6b38ea2da36a330b035dd2e6f89a7 (patch) | |
| tree | ad39949e1071a021f16e808ecf00f6148dd0d488 /compiler/rustc_incremental/src | |
| parent | 954419aab01264707f116899e77be682b02764ea (diff) | |
| download | rust-af8d911d63d6b38ea2da36a330b035dd2e6f89a7.tar.gz rust-af8d911d63d6b38ea2da36a330b035dd2e6f89a7.zip | |
Also fix if in else
Diffstat (limited to 'compiler/rustc_incremental/src')
| -rw-r--r-- | compiler/rustc_incremental/src/persist/dirty_clean.rs | 8 | 
1 files changed, 3 insertions, 5 deletions
| diff --git a/compiler/rustc_incremental/src/persist/dirty_clean.rs b/compiler/rustc_incremental/src/persist/dirty_clean.rs index 88cb82f0f37..cef0b23143d 100644 --- a/compiler/rustc_incremental/src/persist/dirty_clean.rs +++ b/compiler/rustc_incremental/src/persist/dirty_clean.rs @@ -417,12 +417,10 @@ fn check_config(tcx: TyCtxt<'_>, attr: &Attribute) -> bool { fn expect_associated_value(tcx: TyCtxt<'_>, item: &NestedMetaItem) -> Symbol { if let Some(value) = item.value_str() { value + } else if let Some(ident) = item.ident() { + tcx.dcx().emit_fatal(errors::AssociatedValueExpectedFor { span: item.span(), ident }); } else { - if let Some(ident) = item.ident() { - tcx.dcx().emit_fatal(errors::AssociatedValueExpectedFor { span: item.span(), ident }); - } else { - tcx.dcx().emit_fatal(errors::AssociatedValueExpected { span: item.span() }); - } + tcx.dcx().emit_fatal(errors::AssociatedValueExpected { span: item.span() }); } } | 
