]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/query/mod.rs
change thir to lazily create constants
[rust.git] / compiler / rustc_middle / src / query / mod.rs
index e07b174bc6aaa3cec64da30129f898697391da03..3244c237b4794ecfa29067a67d1fc9ec45e7362b 100644 (file)
         desc { "get a &core::panic::Location referring to a span" }
     }
 
+    // FIXME get rid of this with valtrees
     query lit_to_const(
         key: LitToConstInput<'tcx>
     ) -> Result<ty::Const<'tcx>, LitToConstError> {
         desc { "converting literal to const" }
     }
 
+    query lit_to_constant(key: LitToConstInput<'tcx>) -> Result<mir::ConstantKind<'tcx>, LitToConstError> {
+        desc { "converting literal to mir constant"}
+    }
+
     query check_match(key: DefId) {
         desc { |tcx| "match-checking `{}`", tcx.def_path_str(key) }
         cache_on_disk_if { key.is_local() }