Struct rustc_ast::ast_like::AstLikeWrapper
source · [−]pub struct AstLikeWrapper<Wrapped, Tag> {
pub wrapped: Wrapped,
pub tag: PhantomData<Tag>,
}Expand description
A newtype around an AstLike node that implements AstLike itself.
Fields
wrapped: Wrappedtag: PhantomData<Tag>Implementations
sourceimpl<Wrapped, Tag> AstLikeWrapper<Wrapped, Tag>
impl<Wrapped, Tag> AstLikeWrapper<Wrapped, Tag>
pub fn new(wrapped: Wrapped, _tag: Tag) -> AstLikeWrapper<Wrapped, Tag>
Trait Implementations
sourceimpl<Wrapped: AstLike, Tag> AstLike for AstLikeWrapper<Wrapped, Tag>
impl<Wrapped: AstLike, Tag> AstLike for AstLikeWrapper<Wrapped, Tag>
sourceconst SUPPORTS_CUSTOM_INNER_ATTRS: bool
const SUPPORTS_CUSTOM_INNER_ATTRS: bool
This is true if this AstLike might support ‘custom’ (proc-macro) inner
attributes. Attributes like #![cfg] and #![cfg_attr] are not
considered ‘custom’ attributes Read more
fn attrs(&self) -> &[Attribute]
fn visit_attrs(&mut self, f: impl FnOnce(&mut Vec<Attribute>))
fn tokens_mut(&mut self) -> Option<&mut Option<LazyTokenStream>>
Auto Trait Implementations
impl<Wrapped, Tag> RefUnwindSafe for AstLikeWrapper<Wrapped, Tag> where
Tag: RefUnwindSafe,
Wrapped: RefUnwindSafe,
impl<Wrapped, Tag> Send for AstLikeWrapper<Wrapped, Tag> where
Tag: Send,
Wrapped: Send,
impl<Wrapped, Tag> Sync for AstLikeWrapper<Wrapped, Tag> where
Tag: Sync,
Wrapped: Sync,
impl<Wrapped, Tag> Unpin for AstLikeWrapper<Wrapped, Tag> where
Tag: Unpin,
Wrapped: Unpin,
impl<Wrapped, Tag> UnwindSafe for AstLikeWrapper<Wrapped, Tag> where
Tag: UnwindSafe,
Wrapped: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.