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
//! **`include-not-found`**: an `#include` whose file is not there.
//!
//! ```cpp
//! #include <vectr> // no such header
//! #include "helpr.h" // no such file next to this one
//! ```
//!
//! The first thing that goes wrong in a translation unit, and the one a user can act on without knowing anything
//! about C++: the file is not where the directive says it is.
//!
//! # Why this is a check and not part of the reading
//!
//! The reading already knows. [`IncludeFact::resolved`](crate::IncludeFact::resolved) is `None` for a header the
//! resolver did not find, and its documentation says so in as many words — *"a header that did not resolve keeps
//! its spelling, because 'this project includes something we cannot find' is a fact a consumer wants to see rather
//! than a gap to hide"*. What was missing is a channel that shows it. **An index is not a complaint.**
//!
//! # The one form that is not reported, and why it is the whole of the care here
//!
//! [`IncludeForm::Macro`] — `#include BOOST_VERSION_HEADER` — is **not** checked, and that is not a gap. The
//! directive names a macro, so its target is not known until the macro is expanded, and a resolver that has not
//! expanded it has learned nothing. Reporting it would be reporting the *shape* of the directive ("this is not a
//! literal path") as if it were a fact about the file system. `Unknown` is the honest answer there, and this layer
//! reports nothing on `Unknown`.
//!
//! The other two forms are literals. The resolver looked for `vectr` on the system path and for `helpr.h` next to
//! the file, and did not find it. That is `Known::No`.
use crateIncludeForm;
use ;
/// **`include-not-found`** — see the module documentation.
;