Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ dependencies of the local crate)
Note that what determines the crate that a query is targeting is not the *kind* of query, but the *key*.
For example, when you invoke `tcx.type_of(def_id)`, that could be a
local query or an external query, depending on what crate the `def_id`
is referring to (see the [`self::keys::Key`][Key] trait for more information on how that works).
is referring to (see the [`self::keys::QueryKey`][QueryKey] trait for more information on how that works).

Providers always have the same signature:

Expand Down Expand Up @@ -308,7 +308,7 @@ Let's go over these elements one by one:
Also used as the name of a struct (`ty::queries::type_of`) that will be generated to represent
this query.
- **Query key type:** the type of the argument to this query.
This type must implement the [`ty::query::keys::Key`][Key] trait, which
This type must implement the [`ty::query::keys::QueryKey`][QueryKey] trait, which
defines (for example) how to map it to a crate, and so forth.
- **Result type of query:** the type produced by this query.
This type should (a) not use `RefCell` or other interior mutability and (b) be
Expand All @@ -317,7 +317,7 @@ Let's go over these elements one by one:
- **Query modifiers:** various flags and options that customize how the
query is processed (mostly with respect to [incremental compilation][incrcomp]).

[Key]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/query/keys/trait.Key.html
[QueryKey]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/query/keys/trait.QueryKey.html
[incrcomp]: queries/incremental-compilation-in-detail.html#query-modifiers

So, to add a query:
Expand Down
Loading