diff options
| author | Joshua Nelson <jnelson@cloudflare.com> | 2022-09-01 20:43:12 -0500 |
|---|---|---|
| committer | Joshua Nelson <jnelson@cloudflare.com> | 2022-09-06 19:26:08 -0500 |
| commit | 4856affd90df68b0b56dee73c431e9d9cdfc977a (patch) | |
| tree | 795fc827d5100424319225253d154a923ccc6cfa /compiler/rustc_query_system/src/error.rs | |
| parent | 4e09a13bb848a64acf6bb20359f582e813e74764 (diff) | |
| download | rust-4856affd90df68b0b56dee73c431e9d9cdfc977a.tar.gz rust-4856affd90df68b0b56dee73c431e9d9cdfc977a.zip | |
Make `HandleCycleError` an enum instead of a macro-generated closure
- Add a `HandleCycleError` enum to rustc_query_system, along with a `handle_cycle_error` function - Move `Value` to rustc_query_system, so `handle_cycle_error` can use it - Move the `Value` impls from rustc_query_impl to rustc_middle. This is necessary due to orphan rules.
Diffstat (limited to 'compiler/rustc_query_system/src/error.rs')
| -rw-r--r-- | compiler/rustc_query_system/src/error.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_query_system/src/error.rs b/compiler/rustc_query_system/src/error.rs index 5f992ec9e21..3fb06cbedbd 100644 --- a/compiler/rustc_query_system/src/error.rs +++ b/compiler/rustc_query_system/src/error.rs @@ -12,6 +12,13 @@ impl AddSubdiagnostic for CycleStack { } } +#[derive(Copy, Clone)] +pub enum HandleCycleError { + Error, + Fatal, + DelayBug, +} + #[derive(SessionSubdiagnostic)] pub enum StackCount { #[note(query_system::cycle_stack_single)] |
