rustc_middle/query/modifiers.rs
1//! This contains documentation which is linked from query modifiers used in the `rustc_queries!` proc macro.
2//!
3//! The dummy items in this module are used to enable hover documentation for
4//! modifier names in the query list, and to allow find-all-references to list
5//! all queries that use a particular modifier.
6#![allow(unused, non_camel_case_types)]
7// FIXME: Update and clarify documentation for these modifiers.
8
9// tidy-alphabetical-start
10//
11/// # `anon` query modifier
12///
13/// Generate a dep node based on the dependencies of the query
14pub(crate) struct anon;
15
16/// # `arena_cache` query modifier
17///
18/// Use this type for the in-memory cache.
19pub(crate) struct arena_cache;
20
21/// # `cache_on_disk_if` query modifier
22///
23/// Cache the query to disk if the `Block` returns true.
24pub(crate) struct cache_on_disk_if;
25
26/// # `cycle_delay_bug` query modifier
27///
28/// A cycle error results in a delay_bug call
29pub(crate) struct cycle_delay_bug;
30
31/// # `cycle_stash` query modifier
32///
33/// A cycle error results in a stashed cycle error that can be unstashed and canceled later
34pub(crate) struct cycle_stash;
35
36/// # `depth_limit` query modifier
37///
38/// Whether the query has a call depth limit
39pub(crate) struct depth_limit;
40
41/// # `desc` query modifier
42///
43/// The description of the query. This modifier is required on every query.
44pub(crate) struct desc;
45
46/// # `eval_always` query modifier
47///
48/// Always evaluate the query, ignoring its dependencies
49pub(crate) struct eval_always;
50
51/// # `feedable` query modifier
52///
53/// Generate a `feed` method to set the query's value from another query.
54pub(crate) struct feedable;
55
56/// # `no_hash` query modifier
57///
58/// Don't hash the result, instead just mark a query red if it runs
59pub(crate) struct no_hash;
60
61/// # `return_result_from_ensure_ok` query modifier
62///
63/// When this query is called via `tcx.ensure_ok()`, it returns
64/// `Result<(), ErrorGuaranteed>` instead of `()`. If the query needs to
65/// be executed, and that execution returns an error, the error result is
66/// returned to the caller.
67///
68/// If execution is skipped, a synthetic `Ok(())` is returned, on the
69/// assumption that a query with all-green inputs must have succeeded.
70///
71/// Can only be applied to queries with a return value of
72/// `Result<_, ErrorGuaranteed>`.
73pub(crate) struct return_result_from_ensure_ok;
74
75/// # `separate_provide_extern` query modifier
76///
77/// Use a separate query provider for local and extern crates
78pub(crate) struct separate_provide_extern;
79
80// tidy-alphabetical-end