pub enum DiagnosticReading {
Cooked,
}Expand description
Which reading answered a file’s diagnostics — see Session::diagnostics.
Variants§
Cooked
The text a compiler parses: the file’s bytes with its translation unit’s macros expanded and the branches nobody takes left out.
There was a Raw variant beside this one and it is gone. It meant “the file’s own bytes, unexpanded —
what a reader editing the file sees, macros and untaken branches included”, and it was reachable: a file the
index held no cooked reading for was answered from its own text. That answer was not a lesser one, it was an
untrue one — an untaken branch is not compiled, so an error reported inside one is an error about a
program that does not exist. Measured on the fixture below: the same #if 0 branch produced 1 error as the
file’s text and 0 once cooked.
A caller that needs diagnostics for an unexpanded file has nothing to read: it asks
Session::diagnostics, gets None, and comes back — the same deferral Session::view answers with, and
for the same reason. The variant is deleted rather than left reachable-but-unused because a variant nothing
produces is an invitation to match on it.
Trait Implementations§
Source§impl Clone for DiagnosticReading
impl Clone for DiagnosticReading
impl Copy for DiagnosticReading
Source§impl Debug for DiagnosticReading
impl Debug for DiagnosticReading
impl Eq for DiagnosticReading
Source§impl PartialEq for DiagnosticReading
impl PartialEq for DiagnosticReading
impl StructuralPartialEq for DiagnosticReading
Auto Trait Implementations§
impl Forget for DiagnosticReading
impl Freeze for DiagnosticReading
impl RefUnwindSafe for DiagnosticReading
impl Send for DiagnosticReading
impl Sync for DiagnosticReading
impl Unpin for DiagnosticReading
impl UnsafeUnpin for DiagnosticReading
impl UnwindSafe for DiagnosticReading
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,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more