Flatten ifs in rustc_codegen_ssa
This commit is contained in:
@@ -555,11 +555,9 @@ pub fn compute_debuginfo_vtable_name<'tcx>(
|
||||
|
||||
pub fn push_item_name(tcx: TyCtxt<'_>, def_id: DefId, qualified: bool, output: &mut String) {
|
||||
let def_key = tcx.def_key(def_id);
|
||||
if qualified {
|
||||
if let Some(parent) = def_key.parent {
|
||||
push_item_name(tcx, DefId { krate: def_id.krate, index: parent }, true, output);
|
||||
output.push_str("::");
|
||||
}
|
||||
if qualified && let Some(parent) = def_key.parent {
|
||||
push_item_name(tcx, DefId { krate: def_id.krate, index: parent }, true, output);
|
||||
output.push_str("::");
|
||||
}
|
||||
|
||||
push_unqualified_item_name(tcx, def_id, def_key.disambiguated_data, output);
|
||||
|
||||
Reference in New Issue
Block a user