pub enum DiagnosticCode {
Show 23 variants
InvalidProof,
MalformedExport,
UnsupportedExportVersion,
UnsupportedToolchain,
UnknownRecordKind,
UnknownField,
UnresolvedMetavariable,
MissingDeclaration,
DuplicateDeclaration,
MissingModule,
ImportCycle,
LeanRejected,
LeanAcceptanceNotObserved,
UnsupportedFeature,
RecheckRefused,
AuditIncomplete,
DisallowedAssumption,
AssumptionDisagreement,
ResourceLimit,
Infrastructure,
InternalInconsistency,
Usage,
Unclassified,
}Expand description
Why the reader (or the intake around it) refused. Stable across releases: the wire name is
DiagnosticCode::as_str, and a renamed wire name is a protocol break.
Variants§
InvalidProof
Well-formed input whose mathematics the kernel refutes: an ill-typed body, a type mismatch, a positivity violation.
MalformedExport
The export itself is malformed: bad JSON, a dangling index, a missing mandatory field.
UnsupportedExportVersion
The export declares a format version this reader does not implement.
UnsupportedToolchain
The export or project was produced by a Lean or exporter outside the pinned profile.
UnknownRecordKind
A record, expression or declaration kind the pinned export format does not define.
UnknownField
A field the pinned export format does not define for its record.
UnresolvedMetavariable
A metavariable or free variable: the declaration was never fully elaborated.
MissingDeclaration
A declaration the input names but never declares, or a target that is not there.
DuplicateDeclaration
A declaration declared twice.
MissingModule
A Lean project imports a module that is neither in the project nor in Lean core.
ImportCycle
A Lean project’s modules import each other in a cycle.
LeanRejected
Lean itself rejected the project’s source (syntax or elaboration), at Lean’s location.
LeanAcceptanceNotObserved
The input is a pre-exported artifact: this run did not observe Lean accepting its source.
UnsupportedFeature
Valid Lean that LOGOS does not yet express faithfully; declined, never approximated.
RecheckRefused
The independent re-checker did not confirm what the primary kernel accepted.
AuditIncomplete
The transitive assumption audit could not be completed.
DisallowedAssumption
The declaration depends on an assumption the policy does not allow.
AssumptionDisagreement
Lean’s #print axioms and the LOGOS audit disagree on a declaration’s assumptions.
ResourceLimit
A declared resource budget was exhausted before a decision.
Infrastructure
The environment failed: a file could not be read, a tool is absent, a thread could not be reserved.
InternalInconsistency
LOGOS’s own artifact — the emitted document, the assembled package, its fresh replay — failed its self-verification after every check of the user’s input passed. The fault is ours, never the user’s mathematics.
Usage
The command was invoked wrongly; nothing ran.
Unclassified
Not yet classified. lean_diagnostic_code_lock drives the number of such sites to zero.
Implementations§
Source§impl DiagnosticCode
impl DiagnosticCode
pub const ALL: [DiagnosticCode; 23]
pub fn as_str(self) -> &'static str
Sourcepub fn from_wire(wire: &str) -> Option<DiagnosticCode>
pub fn from_wire(wire: &str) -> Option<DiagnosticCode>
The code a wire name names.
Sourcepub fn outcome(self) -> Option<Outcome>
pub fn outcome(self) -> Option<Outcome>
The result outcome this code decides. Usage precedes any result; Unclassified carries no
category of its own (see Outcome::of_refusal).
Trait Implementations§
Source§impl Clone for DiagnosticCode
impl Clone for DiagnosticCode
Source§fn clone(&self) -> DiagnosticCode
fn clone(&self) -> DiagnosticCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DiagnosticCode
impl Debug for DiagnosticCode
Source§impl Display for DiagnosticCode
impl Display for DiagnosticCode
Source§impl Hash for DiagnosticCode
impl Hash for DiagnosticCode
Source§impl Ord for DiagnosticCode
impl Ord for DiagnosticCode
Source§fn cmp(&self, other: &DiagnosticCode) -> Ordering
fn cmp(&self, other: &DiagnosticCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DiagnosticCode
impl PartialEq for DiagnosticCode
Source§impl PartialOrd for DiagnosticCode
impl PartialOrd for DiagnosticCode
impl Copy for DiagnosticCode
impl Eq for DiagnosticCode
impl StructuralPartialEq for DiagnosticCode
Auto Trait Implementations§
impl Freeze for DiagnosticCode
impl RefUnwindSafe for DiagnosticCode
impl Send for DiagnosticCode
impl Sync for DiagnosticCode
impl Unpin for DiagnosticCode
impl UnsafeUnpin for DiagnosticCode
impl UnwindSafe for DiagnosticCode
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.