pub enum PreprocDiagnostic {
SelfInclusion {
file: PathBuf,
},
IncludeCycle {
members: Vec<String>,
},
NonUtf8CyclePath {
path: String,
},
NonUtf8IndirectInclude {
path: String,
},
NotPreprocessed {
file: PathBuf,
},
}Expand description
A non-fatal diagnostic produced while resolving the C/C++ include
graph in fix_includes.
Resolution is best-effort: self-inclusions, include cycles, paths
that cannot be decoded as UTF-8, and files referenced but never
preprocessed are all reported here rather than written to stderr,
so an embedder (e.g. bca-web) can capture, suppress, or surface
them as it sees fit. The CLI prints them to stderr.
Variants§
SelfInclusion
A file’s #include resolved back to the file itself; the
self-edge was skipped.
IncludeCycle
A strongly connected component (an include cycle) was collapsed into a single replacement node. Carries the member paths.
NonUtf8CyclePath
A path could not be decoded as UTF-8 and was skipped while collapsing an include cycle.
NonUtf8IndirectInclude
A path could not be decoded as UTF-8 and was skipped while recording indirect includes.
NotPreprocessed
A file appears in the include graph but was never preprocessed, so its own macros and includes are unknown.
Trait Implementations§
Source§impl Clone for PreprocDiagnostic
impl Clone for PreprocDiagnostic
Source§fn clone(&self) -> PreprocDiagnostic
fn clone(&self) -> PreprocDiagnostic
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PreprocDiagnostic
impl Debug for PreprocDiagnostic
Source§impl<'de> Deserialize<'de> for PreprocDiagnostic
impl<'de> Deserialize<'de> for PreprocDiagnostic
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for PreprocDiagnostic
impl Display for PreprocDiagnostic
impl Eq for PreprocDiagnostic
Source§impl PartialEq for PreprocDiagnostic
impl PartialEq for PreprocDiagnostic
Source§fn eq(&self, other: &PreprocDiagnostic) -> bool
fn eq(&self, other: &PreprocDiagnostic) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PreprocDiagnostic
impl Serialize for PreprocDiagnostic
impl StructuralPartialEq for PreprocDiagnostic
Auto Trait Implementations§
impl Freeze for PreprocDiagnostic
impl RefUnwindSafe for PreprocDiagnostic
impl Send for PreprocDiagnostic
impl Sync for PreprocDiagnostic
impl Unpin for PreprocDiagnostic
impl UnsafeUnpin for PreprocDiagnostic
impl UnwindSafe for PreprocDiagnostic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.