Enum rustc_parse::parser::ty::RecoverReturnSign [−][src]
Signals whether parsing a type should recover ->.
More specifically, when parsing a function like:
fn foo() => u8 { 0 } fn bar(): u8 { 0 }
The compiler will try to recover interpreting foo() => u8 as foo() -> u8 when calling
parse_ty with anything except RecoverReturnSign::No, and it will try to recover bar(): u8
as bar() -> u8 when passing RecoverReturnSign::Yes to parse_ty
Variants
Implementations
impl RecoverReturnSign[src]
fn can_recover(self, token: &TokenKind) -> bool[src]
RecoverReturnSign::Yes allows for recovering fn foo() => u8 and fn foo(): u8,
RecoverReturnSign::OnlyFatArrow allows for recovering only fn foo() => u8 (recovering
colons can cause problems when parsing where clauses), and
RecoverReturnSign::No doesn’t allow for any recovery of the return type arrow
Trait Implementations
impl Clone for RecoverReturnSign[src]
fn clone(&self) -> RecoverReturnSign[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for RecoverReturnSign[src]
impl PartialEq<RecoverReturnSign> for RecoverReturnSign[src]
fn eq(&self, other: &RecoverReturnSign) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralPartialEq for RecoverReturnSign[src]
Auto Trait Implementations
impl RefUnwindSafe for RecoverReturnSign
impl Send for RecoverReturnSign
impl Sync for RecoverReturnSign
impl Unpin for RecoverReturnSign
impl UnwindSafe for RecoverReturnSign
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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.
pub 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>,