about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@gmail>2013-06-20 09:55:03 +0200
committerMichael Woerister <michaelwoerister@gmail>2013-06-20 11:50:09 +0200
commit60474f395c1736773fdd1d86d053dc380b2dad8c (patch)
tree63e1d0a237ebef0d7840a2b143ea9bcb82919a55
parent38743f51ade64148be396438b1f6fe4639336ab3 (diff)
downloadrust-60474f395c1736773fdd1d86d053dc380b2dad8c.tar.gz
rust-60474f395c1736773fdd1d86d053dc380b2dad8c.zip
debuginfo.rs: Explained why a function is called although one could think it should not be.
-rw-r--r--src/librustc/middle/trans/debuginfo.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs
index 52fee4be781..69e631a348b 100644
--- a/src/librustc/middle/trans/debuginfo.rs
+++ b/src/librustc/middle/trans/debuginfo.rs
@@ -464,6 +464,9 @@ fn create_basic_type(cx: @mut CrateContext, t: ty::t, _span: span) -> DIType {
                 size * 8 as u64, align * 8 as u64, encoding as c_uint)
         }};
 
+    // One could think that this call is not necessary, as the create_ty() function will insert the
+    // type descriptor into the cache anyway. Mind, however, that create_basic_type() is also called
+    // directly from other functions (e.g. create_boxed_type()).
     dbg_cx(cx).created_types.insert(ty_id, ty_md);
     return ty_md;
 }