1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
//! The diagnostic home's declarations: one diagnostic, the typed parts of its one summary line, the registries a refusal reads its vocabulary off, and the trait a refusing step implements.
//!
//! Declarations only.
//! Every road that reaches a private field lives in `type_guard.rs`, this file's own child, so the seats a caller may not write have exactly one way in.
use crate;
use crate;
use crate;
pub use intrinsic_diagnostic;
/// Owner-declared repairs one diagnostic may carry.
pub const REPAIR_LIMIT: usize = 8;
/// Identities one diagnostic's related set may carry.
///
/// A step may establish a wider body, so a body that outruns this is a case the road meets rather than one the bounds rule out.
pub const RELATED_ISSUE_LIMIT: usize = 64;
// ---------------------------------------------------------------------------
// The families.
//
// A family here is one refusal's issue space, and its name is what keeps two
// spaces' identical bytes from deriving one identity. The name is namespaced
// like an identity stem — the declarer's own name ahead of the space's — so an
// adopter declares its families in its own crate and two crates' spaces cannot
// collide without one wearing the other's name. A name is preimage material:
// renaming a family renames every related identity derived in it.
// ---------------------------------------------------------------------------
/// One refusal's issue space, named by its declarer.
;
/// One adopter-declared diagnostic vocabulary name.
///
/// The spelling is lowercase ASCII kebab-case by construction, so an adopter-defined refusal class or observation cannot publish a name outside the contract both rosters state.
;
/// How declaring one diagnostic vocabulary name refuses.
/// Planning a projection.
pub const PLANNING_FAMILY: Family = declared;
/// Proving a rendering closes over its plan.
pub const CLOSURE_FAMILY: Family = declared;
/// Covering a kind's questions with an explanation.
pub const EXPLANATION_FAMILY: Family = declared;
/// Materializing a planned member.
pub const RENDERING_FAMILY: Family = declared;
/// Sealing a plan, a closure, and an explanation as one expansion.
pub const BINDING_FAMILY: Family = declared;
/// Composing closed outputs into one carrier.
pub const ASSEMBLY_FAMILY: Family = declared;
/// Rendering the carrier shell itself.
pub const SHELL_FAMILY: Family = declared;
/// The carrier's own declaration vocabulary.
pub const DECLARATION_FAMILY: Family = declared;
/// The support home's own declaration vocabulary, which is not the descriptor's however alike the two read.
pub const SUPPORT_DECLARATION_FAMILY: Family = declared;
/// The trial helper's captured grammar.
pub const FIRST_HELPER_FAMILY: Family = declared;
/// The mutation helper's captured grammar.
pub const SECOND_HELPER_FAMILY: Family = declared;
/// The bench helper's captured grammar.
pub const BENCH_HELPER_FAMILY: Family = declared;
/// The shadow face's captured grammar.
pub const SHADOW_HELPER_FAMILY: Family = declared;
/// The network declaration's captured grammar.
pub const NETWORK_HELPER_FAMILY: Family = declared;
/// The concurrency declaration's captured grammar.
pub const CONCURRENCY_HELPER_FAMILY: Family = declared;
/// Reading a declared input into a captured surface.
pub const CAPTURE_FAMILY: Family = declared;
/// A codec shape's own declaration vocabulary.
pub const CODEC_DECLARATION_FAMILY: Family = declared;
/// Which step of the road was running when the disagreement was observed.
///
/// Declared in the order the steps run.
/// Which class of refusal one composed line is about.
///
/// The class is the second clause of every line and is READ off this roster rather than written at the seam that refused, so two seams reporting one class do not read as two.
/// How what was observed differs from the contract that was expected.
///
/// A typed classification, never a sentence: the sentence is a projection of this.
/// One declared magnitude a rendering can pass, and the thing it governs.
///
/// The prose belongs to the magnitude rather than to whichever refusal named it; the number belongs to the home that declares the bound, so a refusal carries it and this roster never restates it.
/// What one composed line is a summary OF.
///
/// A single-cause refusal establishes one cause and enumerates nothing: there is no remainder to count and no bound anything could have been capped at, so a line reporting "and 0 further issues, complete" would answer a question never asked of it.
/// The typed parts one compiler line is composed from.
///
/// They travel as one value because they are one line: a class handed to [`composed`](crate::diagnostic::composed) beside another refusal's first established issue composes a sentence that is well formed, complete-looking, and about nothing in particular.
/// Whether a composed line says where the refusal sits.
///
/// Not an option: a whole-declaration refusal is a STATED posture and not a site somebody forgot to supply, and adding a position to its line would send a reader to an arbitrary spot inside a declaration the refusal is not about.
/// Where one diagnostic's token sits, or why the producer's table could not say.
///
/// A seat that cannot be furnished states the posture rather than being filled with a stand-in: a coordinate written where a table did not reach would read exactly like a coordinate the table resolved, and the reader has no third value to compare it against.
/// Where one diagnostic points.
///
/// A diagnostic about a CAPTURED declaration names the offending token in the producer's own span table, so the producer can put a compiler error on exactly that token rather than on the declaration's first one.
/// A diagnostic established BEFORE any capture has no token to name — no table was built and no handle was issued — and carries the byte it was born at instead.
/// A diagnostic about the declaration AS A WHOLE has nowhere narrower to point, and says exactly that: the whole-declaration arm carries no token and no coordinate, because any it carried would send a reader to a spot the refusal is not about.
///
/// # Nonclaims
///
/// **The pre-capture and whole-declaration arms mint no handle, and that is the substitution this sum removes.**
/// A required handle seat forces handle zero onto an observation that issued none, and handle zero reads exactly like an honest answer pointing at the declaration's first token.
/// One identity a related set carries, at the level it is about.
///
/// The two levels are two types rather than two positions, because position is not a fact a reader can check and because one subject over two levels collides by construction: the body's preimage is the framing of its issues, so an issue whose own material happened to be that framing would derive the byte-for-byte identity of the body it aliased.
/// One diagnostic's related set: the identities it carries, married to how it was capped.
///
/// A capping that can be carried away from its set is a claim that can be told about a different one, so the set-building road is the only road in and the seats are private.
///
/// # Ordering
///
/// The body rides first, and a reader does not depend on that: an identity states its own level.
/// One repair the owner declared, projected for a person to read.
///
/// The citation is the load-bearing member.
/// The text is a projection of it, and nothing here ever composes a repair the owner did not declare.
/// How to reach the same observation again.
///
/// The road is the callable entry point the door names, which needs no proc macro anywhere in the path.
/// Where one projected refusal sits.
///
/// A refusal about the DECLARATION has nowhere narrower to point, and a line naming a position inside it would send a reader to an arbitrary spot; a refusal about one CLAUSE of an authored attribute has exactly one place, and the reader is sent there.
/// One diagnostic.
///
/// Every seat is required and every one of them is readable: a diagnostic that could omit its phase, its site, its expected contract, or its observed classification would be one that sometimes says less than it knows.
/// The seats a caller reads after deciding what refused ride behind one pointer, so every `Result` that answers with a diagnostic stays small on its passing side.
/// The seats one diagnostic carries behind its pointer.
/// How one step of the road says no.
///
/// A step refuses in the vocabulary of the home that owns it and implements this to say how that vocabulary reads; [`Diagnostic::refused`] projects caller-placed refusals, while intrinsically placed refusal types expose their own typed diagnostic road.
/// The two associated constants are facts about the error's TYPE and not about a call site, for the reason this home's README gives.
/// How a crate-owned refusal whose site is intrinsic carries that site into its diagnostic.
///
/// The refusal home's private projection implements this trait, so no caller supplies a second placement that can disagree with the refusal's own coordinate.
pub