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_item)]
111pub(crate) struct UnknownItem {
112 #[primary_span]
113 pub span: Span,
114 pub name: Symbol,
115}
116
117#[derive(Diagnostic)]
118#[diag(incremental_no_cfg)]
119pub(crate) struct NoCfg {
120 #[primary_span]
121 pub span: Span,
122}
123
124#[derive(Diagnostic)]
125#[diag(incremental_associated_value_expected_for)]
126pub(crate) struct AssociatedValueExpectedFor {
127 #[primary_span]
128 pub span: Span,
129 pub ident: Ident,
130}
131
132#[derive(Diagnostic)]
133#[diag(incremental_associated_value_expected)]
134pub(crate) struct AssociatedValueExpected {
135 #[primary_span]
136 pub span: Span,
137}
138
139#[derive(Diagnostic)]
140#[diag(incremental_unchecked_clean)]
141pub(crate) struct UncheckedClean {
142 #[primary_span]
143 pub span: Span,
144}
145
146#[derive(Diagnostic)]
147#[diag(incremental_delete_old)]
148pub(crate) struct DeleteOld<'a> {
149 pub name: &'a str,
150 pub path: PathBuf,
151 pub err: std::io::Error,
152}
153
154#[derive(Diagnostic)]
155#[diag(incremental_create_new)]
156pub(crate) struct CreateNew<'a> {
157 pub name: &'a str,
158 pub path: PathBuf,
159 pub err: std::io::Error,
160}
161
162#[derive(Diagnostic)]
163#[diag(incremental_write_new)]
164pub(crate) struct WriteNew<'a> {
165 pub name: &'a str,
166 pub path: PathBuf,
167 pub err: std::io::Error,
168}
169
170#[derive(Diagnostic)]
171#[diag(incremental_canonicalize_path)]
172pub(crate) struct CanonicalizePath {
173 pub path: PathBuf,
174 pub err: std::io::Error,
175}
176
177#[derive(Diagnostic)]
178#[diag(incremental_create_incr_comp_dir)]
179pub(crate) struct CreateIncrCompDir<'a> {
180 pub tag: &'a str,
181 pub path: &'a Path,
182 pub err: std::io::Error,
183}
184
185#[derive(Diagnostic)]
186#[diag(incremental_create_lock)]
187pub(crate) struct CreateLock<'a> {
188 pub lock_err: std::io::Error,
189 pub session_dir: &'a Path,
190 #[note(incremental_lock_unsupported)]
191 pub is_unsupported_lock: bool,
192 #[help(incremental_cargo_help_1)]
193 #[help(incremental_cargo_help_2)]
194 pub is_cargo: bool,
195}
196
197#[derive(Diagnostic)]
198#[diag(incremental_delete_lock)]
199pub(crate) struct DeleteLock<'a> {
200 pub path: &'a Path,
201 pub err: std::io::Error,
202}
203
204#[derive(Diagnostic)]
205#[diag(incremental_hard_link_failed)]
206pub(crate) struct HardLinkFailed<'a> {
207 pub path: &'a Path,
208}
209
210#[derive(Diagnostic)]
211#[diag(incremental_delete_partial)]
212pub(crate) struct DeletePartial<'a> {
213 pub path: &'a Path,
214 pub err: std::io::Error,
215}
216
217#[derive(Diagnostic)]
218#[diag(incremental_delete_full)]
219pub(crate) struct DeleteFull<'a> {
220 pub path: &'a Path,
221 pub err: std::io::Error,
222}
223
224#[derive(Diagnostic)]
225#[diag(incremental_finalize)]
226pub(crate) struct Finalize<'a> {
227 pub path: &'a Path,
228 pub err: std::io::Error,
229}
230
231#[derive(Diagnostic)]
232#[diag(incremental_invalid_gc_failed)]
233pub(crate) struct InvalidGcFailed<'a> {
234 pub path: &'a Path,
235 pub err: std::io::Error,
236}
237
238#[derive(Diagnostic)]
239#[diag(incremental_finalized_gc_failed)]
240pub(crate) struct FinalizedGcFailed<'a> {
241 pub path: &'a Path,
242 pub err: std::io::Error,
243}
244
245#[derive(Diagnostic)]
246#[diag(incremental_session_gc_failed)]
247pub(crate) struct SessionGcFailed<'a> {
248 pub path: &'a Path,
249 pub err: std::io::Error,
250}
251
252#[derive(Diagnostic)]
253#[diag(incremental_assert_not_loaded)]
254pub(crate) struct AssertNotLoaded;
255
256#[derive(Diagnostic)]
257#[diag(incremental_assert_loaded)]
258pub(crate) struct AssertLoaded;
259
260#[derive(Diagnostic)]
261#[diag(incremental_delete_incompatible)]
262pub(crate) struct DeleteIncompatible {
263 pub path: PathBuf,
264 pub err: std::io::Error,
265}
266
267#[derive(Diagnostic)]
268#[diag(incremental_load_dep_graph)]
269pub(crate) struct LoadDepGraph {
270 pub path: PathBuf,
271 pub err: std::io::Error,
272}
273
274#[derive(Diagnostic)]
275#[diag(incremental_move_dep_graph)]
276pub(crate) struct MoveDepGraph<'a> {
277 pub from: &'a Path,
278 pub to: &'a Path,
279 pub err: std::io::Error,
280}
281
282#[derive(Diagnostic)]
283#[diag(incremental_create_dep_graph)]
284pub(crate) struct CreateDepGraph<'a> {
285 pub path: &'a Path,
286 pub err: std::io::Error,
287}
288
289#[derive(Diagnostic)]
290#[diag(incremental_copy_workproduct_to_cache)]
291pub(crate) struct CopyWorkProductToCache<'a> {
292 pub from: &'a Path,
293 pub to: &'a Path,
294 pub err: std::io::Error,
295}
296
297#[derive(Diagnostic)]
298#[diag(incremental_delete_workproduct)]
299pub(crate) struct DeleteWorkProduct<'a> {
300 pub path: &'a Path,
301 pub err: std::io::Error,
302}
303
304#[derive(Diagnostic)]
305#[diag(incremental_corrupt_file)]
306pub(crate) struct CorruptFile<'a> {
307 pub path: &'a Path,
308}