use crate::closure::PartitionCargo;
use crate::token::{
CaptureBound, CaptureBuilder, LiteralReadCause, SpanHandle, SpanResolutionRefusal, TokenPath,
};
use proc_macro::Span;
#[path = "type_guard.rs"]
mod guard;
#[derive(Debug)]
pub struct Spans {
builder: CaptureBuilder<Span>,
}
#[must_use = "a capture refusal names what stopped the read and what it is a fact about"]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum CaptureError {
Unbounded {
bound: CaptureBound,
},
Unread {
cause: LiteralReadCause,
path: TokenPath,
at: SpanHandle,
},
}
#[must_use = "an emission refusal names the admitted literal the compiler host could not materialize"]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum EmissionError {
NumberRejected {
spelling: String,
},
NulTerminatedTextRejected,
SourceSpanRosterContradiction,
SourceSpanUnresolved(SpanResolutionRefusal),
}
pub trait Emittable {
fn cargos(&self) -> impl Iterator<Item = &PartitionCargo>;
}