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