about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2018-10-12 17:08:36 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2018-10-15 21:00:17 +0200
commitc95ee9e91dce4fa56c4636e0b8b9cbc4e676b830 (patch)
tree6e33d05088b590332a034c7447026eff0b3bb601 /src/librustc_codegen_llvm
parentef3ece74446d964066a21c9b47fb945a9b04f3ef (diff)
downloadrust-c95ee9e91dce4fa56c4636e0b8b9cbc4e676b830.tar.gz
rust-c95ee9e91dce4fa56c4636e0b8b9cbc4e676b830.zip
Add comments to remind everyone to keep the `get_vtable` impls in sync
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/meth.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/meth.rs b/src/librustc_codegen_llvm/meth.rs
index db06b87f44e..29c2e71960c 100644
--- a/src/librustc_codegen_llvm/meth.rs
+++ b/src/librustc_codegen_llvm/meth.rs
@@ -94,6 +94,10 @@ pub fn get_vtable(
     });
 
     let (size, align) = cx.size_and_align_of(ty);
+    // /////////////////////////////////////////////////////////////////////////////////////////////
+    // If you touch this code, be sure to also make the corresponding changes to
+    // `get_vtable` in rust_mir/interpret/traits.rs
+    // /////////////////////////////////////////////////////////////////////////////////////////////
     let components: Vec<_> = [
         callee::get_fn(cx, monomorphize::resolve_drop_in_place(cx.tcx, ty)),
         C_usize(cx, size.bytes()),