1
Fork 0

change thir to lazily create constants

This commit is contained in:
b-naber 2022-03-11 12:07:53 +01:00
parent 36748cf814
commit f713b5017c
17 changed files with 295 additions and 132 deletions

View file

@ -955,12 +955,17 @@ rustc_queries! {
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() }