[−][src]Struct syntax::ext::base::DummyResult
Fill-in macro expansion result, to allow compilation to continue after hitting errors.
Methods
impl DummyResult
[src]
impl DummyResult
pub fn any(span: Span) -> Box<dyn MacResult + 'static> | [src] |
Create a default MacResult that can be anything.
Use this as a return value after hitting any errors and
calling span_err
.
pub fn any_valid(span: Span) -> Box<dyn MacResult + 'static> | [src] |
Same as any
, but must be a valid fragment, not error.
pub fn expr(span: Span) -> Box<dyn MacResult + 'static> | [src] |
Create a default MacResult that can only be an expression.
Use this for macros that must expand to an expression, so even if an error is encountered internally, the user will receive an error that they also used it in the wrong place.
pub fn raw_expr(sp: Span, is_error: bool) -> P<Expr> | [src] |
A plain dummy expression.
pub fn raw_pat(sp: Span) -> Pat | [src] |
A plain dummy pattern.
pub fn raw_ty(sp: Span, is_error: bool) -> P<Ty> | [src] |
A plain dummy type.
Trait Implementations
impl MacResult for DummyResult
[src]
impl MacResult for DummyResult
fn make_expr(self: Box<DummyResult>) -> Option<P<Expr>> | [src] |
fn make_pat(self: Box<DummyResult>) -> Option<P<Pat>> | [src] |
fn make_items(self: Box<DummyResult>) -> Option<SmallVec<[P<Item>; 1]>> | [src] |
fn make_impl_items(self: Box<DummyResult>) -> Option<SmallVec<[ImplItem; 1]>> | [src] |
fn make_trait_items(self: Box<DummyResult>) -> Option<SmallVec<[TraitItem; 1]>> | [src] |
fn make_foreign_items(self: Box<Self>) -> Option<SmallVec<[ForeignItem; 1]>> | [src] |
fn make_stmts(self: Box<DummyResult>) -> Option<SmallVec<[Stmt; 1]>> | [src] |
fn make_ty(self: Box<DummyResult>) -> Option<P<Ty>> | [src] |
impl Copy for DummyResult
[src]
impl Copy for DummyResult
impl Clone for DummyResult
[src]
impl Clone for DummyResult
fn clone(&self) -> DummyResult | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !Send for DummyResult
impl !Send for DummyResult
impl !Sync for DummyResult
impl !Sync for DummyResult
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T