rustc_parse::parser::diagnostics

Trait RecoverQPath

Source
pub(super) trait RecoverQPath: Sized + 'static {
    const PATH_STYLE: PathStyle = PathStyle::Expr;

    // Required methods
    fn to_ty(&self) -> Option<P<Ty>>;
    fn recovered(qself: Option<P<QSelf>>, path: Path) -> Self;
}

Provided Associated Constants§

Source

const PATH_STYLE: PathStyle = PathStyle::Expr

Required Methods§

Source

fn to_ty(&self) -> Option<P<Ty>>

Source

fn recovered(qself: Option<P<QSelf>>, path: Path) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl RecoverQPath for Expr

Source§

fn to_ty(&self) -> Option<P<Ty>>

Source§

fn recovered(qself: Option<P<QSelf>>, path: Path) -> Self

Source§

impl RecoverQPath for Pat

Source§

const PATH_STYLE: PathStyle = PathStyle::Pat

Source§

fn to_ty(&self) -> Option<P<Ty>>

Source§

fn recovered(qself: Option<P<QSelf>>, path: Path) -> Self

Source§

impl RecoverQPath for Ty

Source§

const PATH_STYLE: PathStyle = PathStyle::Type

Source§

fn to_ty(&self) -> Option<P<Ty>>

Source§

fn recovered(qself: Option<P<QSelf>>, path: Path) -> Self

Implementors§