rustc_incremental/
errors.rs
1use std::path::{Path, PathBuf};
2
3use rustc_macros::Diagnostic;
4use rustc_span::{Ident, Span, Symbol};
5
6#[derive(Diagnostic)]
7#[diag(incremental_unrecognized_depnode)]
8pub(crate) struct UnrecognizedDepNode {
9 #[primary_span]
10 pub span: Span,
11 pub name: Symbol,
12}
13
14#[derive(Diagnostic)]
15#[diag(incremental_missing_depnode)]
16pub(crate) struct MissingDepNode {
17 #[primary_span]
18 pub span: Span,
19}
20
21#[derive(Diagnostic)]
22#[diag(incremental_missing_if_this_changed)]
23pub(crate) struct MissingIfThisChanged {
24 #[primary_span]
25 pub span: Span,
26}
27
28#[derive(Diagnostic)]
29#[diag(incremental_ok)]
30pub(crate) struct Ok {
31 #[primary_span]
32 pub span: Span,
33}
34
35#[derive(Diagnostic)]
36#[diag(incremental_no_path)]
37pub(crate) struct NoPath {
38 #[primary_span]
39 pub span: Span,
40 pub target: Symbol,
41 pub source: String,
42}
43
44#[derive(Diagnostic)]
45#[diag(incremental_assertion_auto)]
46pub(crate) struct AssertionAuto<'a> {
47 #[primary_span]
48 pub span: Span,
49 pub name: &'a str,
50 pub e: &'a str,
51}
52
53#[derive(Diagnostic)]
54#[diag(incremental_undefined_clean_dirty_assertions_item)]
55pub(crate) struct UndefinedCleanDirtyItem {
56 #[primary_span]
57 pub span: Span,
58 pub kind: String,
59}
60
61#[derive(Diagnostic)]
62#[diag(incremental_undefined_clean_dirty_assertions)]
63pub(crate) struct UndefinedCleanDirty {
64 #[primary_span]
65 pub span: Span,
66 pub kind: String,
67}
68
69#[derive(Diagnostic)]
70#[diag(incremental_repeated_depnode_label)]
71pub(crate) struct RepeatedDepNodeLabel<'a> {
72 #[primary_span]
73 pub span: Span,
74 pub label: &'a str,
75}
76
77#[derive(Diagnostic)]
78#[diag(incremental_unrecognized_depnode_label)]
79pub(crate) struct UnrecognizedDepNodeLabel<'a> {
80 #[primary_span]
81 pub span: Span,
82 pub label: &'a str,
83}
84
85#[derive(Diagnostic)]
86#[diag(incremental_not_dirty)]
87pub(crate) struct NotDirty<'a> {
88 #[primary_span]
89 pub span: Span,
90 pub dep_node_str: &'a str,
91}
92
93#[derive(Diagnostic)]
94#[diag(incremental_not_clean)]
95pub(crate) struct NotClean<'a> {
96 #[primary_span]
97 pub span: Span,
98 pub dep_node_str: &'a str,
99}
100
101#[derive(Diagnostic)]
102#[diag(incremental_not_loaded)]
103pub(crate) struct NotLoaded<'a> {
104 #[primary_span]
105 pub span: Span,
106 pub dep_node_str: &'a str,
107}
108
109#[derive(Diagnostic)]
110#[diag(incremental_unknown_rustc_clean_argument)]
111pub(crate) struct UnknownRustcCleanArgument {
112 #[primary_span]
113 pub span: Span,
114}
115
116#[derive(Diagnostic)]
117#[diag(incremental_no_cfg)]
118pub(crate) struct NoCfg {
119 #[primary_span]
120 pub span: Span,
121}
122
123#[derive(Diagnostic)]
124#[diag(incremental_associated_value_expected_for)]
125pub(crate) struct AssociatedValueExpectedFor {
126 #[primary_span]
127 pub span: Span,
128 pub ident: Ident,
129}
130
131#[derive(Diagnostic)]
132#[diag(incremental_associated_value_expected)]
133pub(crate) struct AssociatedValueExpected {
134 #[primary_span]
135 pub span: Span,
136}
137
138#[derive(Diagnostic)]
139#[diag(incremental_unchecked_clean)]
140pub(crate) struct UncheckedClean {
141 #[primary_span]
142 pub span: Span,
143}
144
145#[derive(Diagnostic)]
146#[diag(incremental_delete_old)]
147pub(crate) struct DeleteOld<'a> {
148 pub name: &'a str,
149 pub path: PathBuf,
150 pub err: std::io::Error,
151}
152
153#[derive(Diagnostic)]
154#[diag(incremental_create_new)]
155pub(crate) struct CreateNew<'a> {
156 pub name: &'a str,
157 pub path: PathBuf,
158 pub err: std::io::Error,
159}
160
161#[derive(Diagnostic)]
162#[diag(incremental_write_new)]
163pub(crate) struct WriteNew<'a> {
164 pub name: &'a str,
165 pub path: PathBuf,
166 pub err: std::io::Error,
167}
168
169#[derive(Diagnostic)]
170#[diag(incremental_canonicalize_path)]
171pub(crate) struct CanonicalizePath {
172 pub path: PathBuf,
173 pub err: std::io::Error,
174}
175
176#[derive(Diagnostic)]
177#[diag(incremental_create_incr_comp_dir)]
178pub(crate) struct CreateIncrCompDir<'a> {
179 pub tag: &'a str,
180 pub path: &'a Path,
181 pub err: std::io::Error,
182}
183
184#[derive(Diagnostic)]
185#[diag(incremental_create_lock)]
186pub(crate) struct CreateLock<'a> {
187 pub lock_err: std::io::Error,
188 pub session_dir: &'a Path,
189 #[note(incremental_lock_unsupported)]
190 pub is_unsupported_lock: bool,
191 #[help(incremental_cargo_help_1)]
192 #[help(incremental_cargo_help_2)]
193 pub is_cargo: bool,
194}
195
196#[derive(Diagnostic)]
197#[diag(incremental_delete_lock)]
198pub(crate) struct DeleteLock<'a> {
199 pub path: &'a Path,
200 pub err: std::io::Error,
201}
202
203#[derive(Diagnostic)]
204#[diag(incremental_hard_link_failed)]
205pub(crate) struct HardLinkFailed<'a> {
206 pub path: &'a Path,
207}
208
209#[derive(Diagnostic)]
210#[diag(incremental_delete_partial)]
211pub(crate) struct DeletePartial<'a> {
212 pub path: &'a Path,
213 pub err: std::io::Error,
214}
215
216#[derive(Diagnostic)]
217#[diag(incremental_delete_full)]
218pub(crate) struct DeleteFull<'a> {
219 pub path: &'a Path,
220 pub err: std::io::Error,
221}
222
223#[derive(Diagnostic)]
224#[diag(incremental_finalize)]
225pub(crate) struct Finalize<'a> {
226 pub path: &'a Path,
227 pub err: std::io::Error,
228}
229
230#[derive(Diagnostic)]
231#[diag(incremental_invalid_gc_failed)]
232pub(crate) struct InvalidGcFailed<'a> {
233 pub path: &'a Path,
234 pub err: std::io::Error,
235}
236
237#[derive(Diagnostic)]
238#[diag(incremental_finalized_gc_failed)]
239pub(crate) struct FinalizedGcFailed<'a> {
240 pub path: &'a Path,
241 pub err: std::io::Error,
242}
243
244#[derive(Diagnostic)]
245#[diag(incremental_session_gc_failed)]
246pub(crate) struct SessionGcFailed<'a> {
247 pub path: &'a Path,
248 pub err: std::io::Error,
249}
250
251#[derive(Diagnostic)]
252#[diag(incremental_assert_not_loaded)]
253pub(crate) struct AssertNotLoaded;
254
255#[derive(Diagnostic)]
256#[diag(incremental_assert_loaded)]
257pub(crate) struct AssertLoaded;
258
259#[derive(Diagnostic)]
260#[diag(incremental_delete_incompatible)]
261pub(crate) struct DeleteIncompatible {
262 pub path: PathBuf,
263 pub err: std::io::Error,
264}
265
266#[derive(Diagnostic)]
267#[diag(incremental_load_dep_graph)]
268pub(crate) struct LoadDepGraph {
269 pub path: PathBuf,
270 pub err: std::io::Error,
271}
272
273#[derive(Diagnostic)]
274#[diag(incremental_move_dep_graph)]
275pub(crate) struct MoveDepGraph<'a> {
276 pub from: &'a Path,
277 pub to: &'a Path,
278 pub err: std::io::Error,
279}
280
281#[derive(Diagnostic)]
282#[diag(incremental_create_dep_graph)]
283pub(crate) struct CreateDepGraph<'a> {
284 pub path: &'a Path,
285 pub err: std::io::Error,
286}
287
288#[derive(Diagnostic)]
289#[diag(incremental_copy_workproduct_to_cache)]
290pub(crate) struct CopyWorkProductToCache<'a> {
291 pub from: &'a Path,
292 pub to: &'a Path,
293 pub err: std::io::Error,
294}
295
296#[derive(Diagnostic)]
297#[diag(incremental_delete_workproduct)]
298pub(crate) struct DeleteWorkProduct<'a> {
299 pub path: &'a Path,
300 pub err: std::io::Error,
301}
302
303#[derive(Diagnostic)]
304#[diag(incremental_corrupt_file)]
305pub(crate) struct CorruptFile<'a> {
306 pub path: &'a Path,
307}