Skip to content

Commit 60474f3

Browse files
debuginfo.rs: Explained why a function is called although one could think it should not be.
1 parent 38743f5 commit 60474f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc/middle/trans/debuginfo.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,9 @@ fn create_basic_type(cx: @mut CrateContext, t: ty::t, _span: span) -> DIType {
464464
size * 8 as u64, align * 8 as u64, encoding as c_uint)
465465
}};
466466

467+
// One could think that this call is not necessary, as the create_ty() function will insert the
468+
// type descriptor into the cache anyway. Mind, however, that create_basic_type() is also called
469+
// directly from other functions (e.g. create_boxed_type()).
467470
dbg_cx(cx).created_types.insert(ty_id, ty_md);
468471
return ty_md;
469472
}

0 commit comments

Comments
 (0)