about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-07-14 20:34:32 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-07-14 20:34:32 +0200
commit1caa593cb6bd9a33eb625ad313010d2b141dea5c (patch)
tree74ca5202065bd67f197b28dd42310704eae587cd
parenta59cf4e913f64c57377fcc0b9c173c51d492304a (diff)
downloadrust-1caa593cb6bd9a33eb625ad313010d2b141dea5c.tar.gz
rust-1caa593cb6bd9a33eb625ad313010d2b141dea5c.zip
Expose a self-referential object
-rw-r--r--src/librustc_codegen_llvm/back/write.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs
index 467782518f6..0ffb83ff337 100644
--- a/src/librustc_codegen_llvm/back/write.rs
+++ b/src/librustc_codegen_llvm/back/write.rs
@@ -399,6 +399,9 @@ impl CodegenContext {
 }
 
 struct DiagnosticHandlers<'a> {
+    #[allow(dead_code)]
+    // This value is not actually dead, llcx has pointers to it and needs these pointers to be alive
+    // until Drop is executed on this object
     inner: Box<(&'a CodegenContext, &'a Handler)>,
     llcx: ContextRef,
 }