diff options
| author | Michael Goulet <michael@errs.io> | 2023-10-26 17:30:53 +0000 | 
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-10-26 17:58:02 +0000 | 
| commit | 1836c1fbbdf0d6902da9a2d2473dbc72f371eb2e (patch) | |
| tree | 65993066515084f35f49bf7c5349687a1f46f0cb /compiler/rustc_macros/src/query.rs | |
| parent | cf226e93dcb0e21e2daa7c26aca0c5b46ff1b646 (diff) | |
| download | rust-1836c1fbbdf0d6902da9a2d2473dbc72f371eb2e.tar.gz rust-1836c1fbbdf0d6902da9a2d2473dbc72f371eb2e.zip | |
Stash and cancel cycle errors for auto trait leakage in opaques
Diffstat (limited to 'compiler/rustc_macros/src/query.rs')
| -rw-r--r-- | compiler/rustc_macros/src/query.rs | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/compiler/rustc_macros/src/query.rs b/compiler/rustc_macros/src/query.rs index d8a695b131b..ad1980136f3 100644 --- a/compiler/rustc_macros/src/query.rs +++ b/compiler/rustc_macros/src/query.rs @@ -97,6 +97,9 @@ struct QueryModifiers { /// A cycle error results in a delay_bug call cycle_delay_bug: Option<Ident>, + /// A cycle error results in a stashed cycle error that can be unstashed and canceled later + cycle_stash: Option<Ident>, + /// Don't hash the result, instead just mark a query red if it runs no_hash: Option<Ident>, @@ -127,6 +130,7 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> { let mut desc = None; let mut fatal_cycle = None; let mut cycle_delay_bug = None; + let mut cycle_stash = None; let mut no_hash = None; let mut anon = None; let mut eval_always = None; @@ -181,6 +185,8 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> { try_insert!(fatal_cycle = modifier); } else if modifier == "cycle_delay_bug" { try_insert!(cycle_delay_bug = modifier); + } else if modifier == "cycle_stash" { + try_insert!(cycle_stash = modifier); } else if modifier == "no_hash" { try_insert!(no_hash = modifier); } else if modifier == "anon" { @@ -208,6 +214,7 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> { desc, fatal_cycle, cycle_delay_bug, + cycle_stash, no_hash, anon, eval_always, @@ -329,6 +336,7 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream { fatal_cycle, arena_cache, cycle_delay_bug, + cycle_stash, no_hash, anon, eval_always, | 
