use let chains in ast, borrowck, codegen, const_eval

This commit is contained in:
Kivooeo
2025-07-26 06:21:22 +05:00
parent a955f1cd09
commit 43725ed819
26 changed files with 422 additions and 454 deletions

View File

@@ -496,17 +496,15 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
)
.with_note("Rustc requires this item to have a specific mangled name.")
.with_span_label(tcx.def_span(did), "should be the internal language item");
if let Some(lang_item) = lang_item {
if let Some(link_name) = lang_item.link_name() {
err = err
.with_note("If you are trying to prevent mangling to ease debugging, many")
.with_note(format!(
"debuggers support a command such as `rbreak {link_name}` to"
))
.with_note(format!(
"match `.*{link_name}.*` instead of `break {link_name}` on a specific name"
))
}
if let Some(lang_item) = lang_item
&& let Some(link_name) = lang_item.link_name()
{
err = err
.with_note("If you are trying to prevent mangling to ease debugging, many")
.with_note(format!("debuggers support a command such as `rbreak {link_name}` to"))
.with_note(format!(
"match `.*{link_name}.*` instead of `break {link_name}` on a specific name"
))
}
err.emit();
}