-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pass inputs to cycle recovery functions
- Loading branch information
Showing
8 changed files
with
55 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
10 changes: 6 additions & 4 deletions
10
components/salsa-macro-rules/src/unexpected_cycle_recovery.rs
This file contains 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 |
---|---|---|
@@ -1,18 +1,20 @@ | ||
// Macro that generates the body of the cycle recovery function | ||
// for the case where no cycle recovery is possible. Must be a macro | ||
// because the signature types must match the particular tracked function. | ||
// for the case where no cycle recovery is possible. This has to be | ||
// a macro because it can take a variadic number of arguments. | ||
#[macro_export] | ||
macro_rules! unexpected_cycle_recovery { | ||
($db:ident, $value:ident, $count:ident) => {{ | ||
($db:ident, $value:ident, $count:ident, $($other_inputs:ident),*) => {{ | ||
std::mem::drop($db); | ||
std::mem::drop(($($other_inputs),*)); | ||
panic!("cannot recover from cycle") | ||
}}; | ||
} | ||
|
||
#[macro_export] | ||
macro_rules! unexpected_cycle_initial { | ||
($db:ident) => {{ | ||
($db:ident, $($other_inputs:ident),*) => {{ | ||
std::mem::drop($db); | ||
std::mem::drop(($($other_inputs),*)); | ||
panic!("no cycle initial value") | ||
}}; | ||
} |
This file contains 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 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 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 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 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 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