]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/query/mod.rs
Turn tcx.vtable_allocation() into a query.
[rust.git] / compiler / rustc_middle / src / query / mod.rs
index b4f7a9fa8e9d6584afb69e4201a9ba3fe8281db5..40d049eb72c035f1f7c2b61717dd2b3db411af18 100644 (file)
             key.1, key.0 }
     }
 
+    query vtable_allocation(key: (Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>)) -> mir::interpret::AllocId {
+        desc { |tcx| "vtable const allocation for <{} as {}>",
+            key.0,
+            key.1.map(|trait_ref| format!("{}", trait_ref)).unwrap_or("_".to_owned())
+        }
+    }
+
     query codegen_fulfill_obligation(
         key: (ty::ParamEnv<'tcx>, ty::PolyTraitRef<'tcx>)
     ) -> Result<ImplSource<'tcx, ()>, ErrorReported> {