-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Change query proc macro to be more rust-analyzer friendly #152422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Zoxc
wants to merge
1
commit into
rust-lang:main
Choose a base branch
from
Zoxc:query-macro-tweaks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+203
−37
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| //! This contains documentation which is linked from query modifiers used in the `rustc_queries!` proc macro. | ||
Zalathar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #![allow(unused, non_camel_case_types)] | ||
| // FIXME: Update and clarify documentation for these modifiers. | ||
|
|
||
| /// # `desc` query modifier | ||
| /// | ||
| /// The description of the query. This modifier is required on every query. | ||
| pub struct desc; | ||
|
|
||
| /// # `arena_cache` query modifier | ||
| /// | ||
| /// Use this type for the in-memory cache. | ||
| pub struct arena_cache; | ||
|
|
||
| /// # `cache_on_disk_if` query modifier | ||
| /// | ||
| /// Cache the query to disk if the `Block` returns true. | ||
| pub struct cache_on_disk_if; | ||
|
|
||
| /// # `cycle_fatal` query modifier | ||
| /// | ||
| /// A cycle error for this query aborting the compilation with a fatal error. | ||
| pub struct cycle_fatal; | ||
|
|
||
| /// # `cycle_delay_bug` query modifier | ||
| /// | ||
| /// A cycle error results in a delay_bug call | ||
| pub struct cycle_delay_bug; | ||
|
|
||
| /// # `cycle_stash` query modifier | ||
| /// | ||
| /// A cycle error results in a stashed cycle error that can be unstashed and canceled later | ||
| pub struct cycle_stash; | ||
|
|
||
| /// # `no_hash` query modifier | ||
| /// | ||
| /// Don't hash the result, instead just mark a query red if it runs | ||
| pub struct no_hash; | ||
|
|
||
| /// # `anon` query modifier | ||
| /// | ||
| /// Generate a dep node based on the dependencies of the query | ||
| pub struct anon; | ||
|
|
||
| /// # `eval_always` query modifier | ||
| /// | ||
| /// Always evaluate the query, ignoring its dependencies | ||
| pub struct eval_always; | ||
|
|
||
| /// # `depth_limit` query modifier | ||
| /// | ||
| /// Whether the query has a call depth limit | ||
| pub struct depth_limit; | ||
|
|
||
| /// # `separate_provide_extern` query modifier | ||
| /// | ||
| /// Use a separate query provider for local and extern crates | ||
| pub struct separate_provide_extern; | ||
|
|
||
| /// # `feedable` query modifier | ||
| /// | ||
| /// Generate a `feed` method to set the query's value from another query. | ||
| pub struct feedable; | ||
|
|
||
| /// # `return_result_from_ensure_ok` query modifier | ||
| /// | ||
| /// When this query is called via `tcx.ensure_ok()`, it returns | ||
| /// `Result<(), ErrorGuaranteed>` instead of `()`. If the query needs to | ||
| /// be executed, and that execution returns an error, the error result is | ||
| /// returned to the caller. | ||
| /// | ||
| /// If execution is skipped, a synthetic `Ok(())` is returned, on the | ||
| /// assumption that a query with all-green inputs must have succeeded. | ||
| /// | ||
| /// Can only be applied to queries with a return value of | ||
| /// `Result<_, ErrorGuaranteed>`. | ||
| pub struct return_result_from_ensure_ok; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.