X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_middle%2Fsrc%2Fquery%2Fmod.rs;h=3244c237b4794ecfa29067a67d1fc9ec45e7362b;hb=f713b5017c7ded572933605c08233b5d429d121d;hp=2acfede87aed01877b4885fc100585f4adc8bfd5;hpb=f103b2969b0088953873dc1ac92eb3387c753596;p=rust.git diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 2acfede87ae..3244c237b47 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -252,7 +252,9 @@ } /// Fetch the THIR for a given body. If typeck for that body failed, returns an empty `Thir`. - query thir_body(key: ty::WithOptConstParam) -> (&'tcx Steal>, thir::ExprId) { + query thir_body(key: ty::WithOptConstParam) + -> Result<(&'tcx Steal>, thir::ExprId), ErrorGuaranteed> + { // Perf tests revealed that hashing THIR is inefficient (see #85729). no_hash desc { |tcx| "building THIR for `{}`", tcx.def_path_str(key.did.to_def_id()) } @@ -953,12 +955,17 @@ 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, LitToConstError> { desc { "converting literal to const" } } + query lit_to_constant(key: LitToConstInput<'tcx>) -> Result, 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() } @@ -1035,6 +1042,11 @@ separate_provide_extern } + /// Determines whether an item is annotated with `doc(hidden)`. + query is_doc_hidden(def_id: DefId) -> bool { + desc { |tcx| "checking whether `{}` is `doc(hidden)`", tcx.def_path_str(def_id) } + } + query item_attrs(def_id: DefId) -> &'tcx [ast::Attribute] { desc { |tcx| "collecting attributes of `{}`", tcx.def_path_str(def_id) } separate_provide_extern