rollup merge of #18965: cmr/master
This commit is contained in:
commit
f3fd09a6f5
1 changed files with 6 additions and 1 deletions
|
@ -455,7 +455,12 @@ pub fn llvm_type_name(cx: &CrateContext,
|
||||||
|
|
||||||
let base = ty::item_path_str(cx.tcx(), did);
|
let base = ty::item_path_str(cx.tcx(), did);
|
||||||
let strings: Vec<String> = tps.iter().map(|t| t.repr(cx.tcx())).collect();
|
let strings: Vec<String> = tps.iter().map(|t| t.repr(cx.tcx())).collect();
|
||||||
let tstr = format!("{}<{}>", base, strings);
|
let tstr = if strings.is_empty() {
|
||||||
|
base
|
||||||
|
} else {
|
||||||
|
format!("{}<{}>", base, strings)
|
||||||
|
};
|
||||||
|
|
||||||
if did.krate == 0 {
|
if did.krate == 0 {
|
||||||
format!("{}.{}", name, tstr)
|
format!("{}.{}", name, tstr)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue