X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_parse%2Fsrc%2Fparser%2Fdiagnostics.rs;h=3352e0a6c69d63e1bc0d4ea13e44295e718d3688;hb=6b7ca2fcf2ebbba705f7a98c00bd56b5348ee9d7;hp=c609aa93da3a75b0d9cb50637ef85e18dce8bfe5;hpb=ff118a84cc7cfc3cc5048528de9a54cd752c7559;p=rust.git diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index c609aa93da3..3352e0a6c69 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -65,7 +65,7 @@ pub(super) fn dummy_arg(ident: Ident) -> Param { pub(super) trait RecoverQPath: Sized + 'static { const PATH_STYLE: PathStyle = PathStyle::Expr; fn to_ty(&self) -> Option
>;
- fn recovered(qself: Option >, path: ast::Path) -> Self;
}
impl RecoverQPath for Ty {
@@ -73,7 +73,7 @@ impl RecoverQPath for Ty {
fn to_ty(&self) -> Option > {
Some(P(self.clone()))
}
- fn recovered(qself: Option >, path: ast::Path) -> Self {
Self {
span: path.span,
kind: TyKind::Path(qself, path),
@@ -87,7 +87,7 @@ impl RecoverQPath for Pat {
fn to_ty(&self) -> Option > {
self.to_ty()
}
- fn recovered(qself: Option >, path: ast::Path) -> Self {
Self {
span: path.span,
kind: PatKind::Path(qself, path),
@@ -101,7 +101,7 @@ impl RecoverQPath for Expr {
fn to_ty(&self) -> Option > {
self.to_ty()
}
- fn recovered(qself: Option >, path: ast::Path) -> Self {
Self {
span: path.span,
kind: ExprKind::Path(qself, path),
@@ -1437,7 +1437,7 @@ pub(super) fn maybe_recover_from_bad_qpath_stage_2