pub(crate) struct EarlyParsedState {
cfg_trace: ThinVec<(CfgEntry, Span)>,
cfg_attr_trace: bool,
}Expand description
This struct contains the state necessary to convert early parsed attributes to hir attributes The only conversion that really happens here is that multiple early parsed attributes are merged into a single hir attribute, representing their combined state. FIXME: We should make this a nice and extendable system if this is going to be used more often
Fields§
§cfg_trace: ThinVec<(CfgEntry, Span)>Attribute state for #[cfg] trace attributes
cfg_attr_trace: boolAttribute state for #[cfg_attr] trace attributes
The arguments of these attributes is no longer relevant for any later passes, only their presence.
So we discard the arguments here.
Implementations§
Source§impl EarlyParsedState
impl EarlyParsedState
pub(crate) fn accept_early_parsed_attribute( &mut self, attr_span: Span, lower_span: impl Copy + Fn(Span) -> Span, parsed: &EarlyParsedAttribute, )
pub(crate) fn finalize_early_parsed_attributes( self, attributes: &mut Vec<Attribute>, )
Trait Implementations§
Source§impl Default for EarlyParsedState
impl Default for EarlyParsedState
Source§fn default() -> EarlyParsedState
fn default() -> EarlyParsedState
Auto Trait Implementations§
impl DynSend for EarlyParsedState
impl DynSync for EarlyParsedState
impl Freeze for EarlyParsedState
impl RefUnwindSafe for EarlyParsedState
impl Send for EarlyParsedState
impl Sync for EarlyParsedState
impl Unpin for EarlyParsedState
impl UnwindSafe for EarlyParsedState
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes