Also fix if in else
This commit is contained in:
@@ -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() });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user