summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorAria Beingessner <a.beingessner@gmail.com>2022-03-22 16:21:33 -0400
committerAria Beingessner <a.beingessner@gmail.com>2022-03-29 20:18:27 -0400
commit68643603ad00900d6a91a0dae90bb2ebb4f0db48 (patch)
treebf21a67cd25c9c41b81008c68e77b8c9a8d67624 /compiler/rustc_codegen_ssa
parentc7de289e1c8d24bd55aaa33813e509920a00c364 (diff)
downloadrust-68643603ad00900d6a91a0dae90bb2ebb4f0db48.tar.gz
rust-68643603ad00900d6a91a0dae90bb2ebb4f0db48.zip
Make some rustc code conform to strict provenance.
There's some really bad stuff around `ty` and pointer tagging stuff that
was too much work to handle here.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/lib.rs1
-rw-r--r--compiler/rustc_codegen_ssa/src/mono_item.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs
index 25e27f565ea..6cf6be79a86 100644
--- a/compiler/rustc_codegen_ssa/src/lib.rs
+++ b/compiler/rustc_codegen_ssa/src/lib.rs
@@ -6,6 +6,7 @@
 #![feature(once_cell)]
 #![feature(nll)]
 #![feature(associated_type_bounds)]
+#![feature(strict_provenance)]
 #![recursion_limit = "256"]
 #![allow(rustc::potential_query_instability)]
 
diff --git a/compiler/rustc_codegen_ssa/src/mono_item.rs b/compiler/rustc_codegen_ssa/src/mono_item.rs
index 5f0f50ae2df..5414c619dcb 100644
--- a/compiler/rustc_codegen_ssa/src/mono_item.rs
+++ b/compiler/rustc_codegen_ssa/src/mono_item.rs
@@ -116,7 +116,7 @@ impl<'a, 'tcx: 'a> MonoItemExt<'a, 'tcx> for MonoItem<'tcx> {
     fn to_raw_string(&self) -> String {
         match *self {
             MonoItem::Fn(instance) => {
-                format!("Fn({:?}, {})", instance.def, instance.substs.as_ptr() as usize)
+                format!("Fn({:?}, {})", instance.def, instance.substs.as_ptr().addr())
             }
             MonoItem::Static(id) => format!("Static({:?})", id),
             MonoItem::GlobalAsm(id) => format!("GlobalAsm({:?})", id),