[−][src]Struct syntax::ext::base::DummyResult
Fill-in macro expansion result, to allow compilation to continue after hitting errors.
Methods
impl DummyResult
[src]
pub fn any(span: Span) -> Box<dyn MacResult + 'static>
[src]
Creates 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]
Creates 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]
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 Clone for DummyResult
[src]
fn clone(&self) -> DummyResult
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for DummyResult
[src]
Auto Trait Implementations
impl !Send for DummyResult
impl !Sync for DummyResult
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,