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_fatal` query modifier
32///
33/// A cycle error for this query aborting the compilation with a fatal error.
34pub(crate) struct cycle_fatal;
35
36/// # `cycle_stash` query modifier
37///
38/// A cycle error results in a stashed cycle error that can be unstashed and canceled later
39pub(crate) struct cycle_stash;
40
41/// # `depth_limit` query modifier
42///
43/// Whether the query has a call depth limit
44pub(crate) struct depth_limit;
45
46/// # `desc` query modifier
47///
48/// The description of the query. This modifier is required on every query.
49pub(crate) struct desc;
50
51/// # `eval_always` query modifier
52///
53/// Always evaluate the query, ignoring its dependencies
54pub(crate) struct eval_always;
55
56/// # `feedable` query modifier
57///
58/// Generate a `feed` method to set the query's value from another query.
59pub(crate) struct feedable;
60
61/// # `no_hash` query modifier
62///
63/// Don't hash the result, instead just mark a query red if it runs
64pub(crate) struct no_hash;
65
66/// # `return_result_from_ensure_ok` query modifier
67///
68/// When this query is called via `tcx.ensure_ok()`, it returns
69/// `Result<(), ErrorGuaranteed>` instead of `()`. If the query needs to
70/// be executed, and that execution returns an error, the error result is
71/// returned to the caller.
72///
73/// If execution is skipped, a synthetic `Ok(())` is returned, on the
74/// assumption that a query with all-green inputs must have succeeded.
75///
76/// Can only be applied to queries with a return value of
77/// `Result<_, ErrorGuaranteed>`.
78pub(crate) struct return_result_from_ensure_ok;
79
80/// # `separate_provide_extern` query modifier
81///
82/// Use a separate query provider for local and extern crates
83pub(crate) struct separate_provide_extern;
84
85// tidy-alphabetical-end