Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a41be90

Browse files
committedMar 20, 2025
Auto merge of rust-lang#138746 - oli-obk:push-tzszzuonznky, r=<try>
Guard a query invocation out of perf reasons Should fix the perf regression from rust-lang#138674
2 parents 87e60a7 + 2a31e68 commit a41be90

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,10 @@ fn build_generic_type_param_di_nodes<'ll, 'tcx>(
13141314
ty: Ty<'tcx>,
13151315
) -> SmallVec<Option<&'ll DIType>> {
13161316
if let ty::Adt(def, args) = *ty.kind() {
1317-
let generics = cx.tcx.generics_of(def.did());
1318-
return get_template_parameters(cx, generics, args);
1317+
if args.types().next().is_some() {
1318+
let generics = cx.tcx.generics_of(def.did());
1319+
return get_template_parameters(cx, generics, args);
1320+
}
13191321
}
13201322

13211323
return smallvec![];

0 commit comments

Comments
 (0)
Failed to load comments.