]> git.lizzy.rs Git - rust.git/commitdiff
debuginfo.rs: Explained why a function is called although one could think it should...
authorMichael Woerister <michaelwoerister@gmail>
Thu, 20 Jun 2013 07:55:03 +0000 (09:55 +0200)
committerMichael Woerister <michaelwoerister@gmail>
Thu, 20 Jun 2013 09:50:09 +0000 (11:50 +0200)
src/librustc/middle/trans/debuginfo.rs

index 52fee4be781ef50be865ade4084298fdfecc19a4..69e631a348bf7dcd2baec2bfe4fd7e94ea9849ae 100644 (file)
@@ -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;
 }