about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/path.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-16 00:03:46 +0000
committerbors <bors@rust-lang.org>2024-02-16 00:03:46 +0000
commitcefa14bf2fc4cbc23a0f5e7d1daa04d258f8d62b (patch)
tree4afce272f4cc64bd5125481e2503988a4010d18a /compiler/rustc_parse/src/parser/path.rs
parenta4472498d7e88041f6206faf4503eb1f246fd427 (diff)
parent2a216bb53bc17cfc4474589accbc8f0f497764ca (diff)
downloadrust-cefa14bf2fc4cbc23a0f5e7d1daa04d258f8d62b.tar.gz
rust-cefa14bf2fc4cbc23a0f5e7d1daa04d258f8d62b.zip
Auto merge of #121169 - GuillaumeGomez:rollup-oxk5d5j, r=GuillaumeGomez
Rollup of 10 pull requests

Successful merges:

 - #120777 (Bump Unicode to version 15.1.0, regenerate tables)
 - #120971 (Fix comment in core/src/str/validations.rs)
 - #121095 (Add extra indent spaces for rust-playground link)
 - #121109 (Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2))
 - #121119 (Make `async Fn` trait kind errors better)
 - #121141 (Fix closure kind docs)
 - #121145 (Update aarch64 target feature docs to match LLVM)
 - #121146 (Only point out non-diverging arms for match suggestions)
 - #121147 (Avoid debug logging entire MIR body)
 - #121155 (doc: add note about panicking examples for strict_overflow_ops)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
-rw-r--r--compiler/rustc_parse/src/parser/path.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs
index e7cad74b4dd..681039999a6 100644
--- a/compiler/rustc_parse/src/parser/path.rs
+++ b/compiler/rustc_parse/src/parser/path.rs
@@ -678,8 +678,9 @@ impl<'a> Parser<'a> {
                 c.into()
             }
             Some(GenericArg::Lifetime(lt)) => {
-                self.dcx().emit_err(errors::AssocLifetime { span, lifetime: lt.ident.span });
-                self.mk_ty(span, ast::TyKind::Err).into()
+                let guar =
+                    self.dcx().emit_err(errors::AssocLifetime { span, lifetime: lt.ident.span });
+                self.mk_ty(span, ast::TyKind::Err(guar)).into()
             }
             None => {
                 let after_eq = eq.shrink_to_hi();
@@ -779,7 +780,7 @@ impl<'a> Parser<'a> {
                     // type to determine if error recovery has occurred and if the input is not a
                     // syntactically valid type after all.
                     if let ast::TyKind::Slice(inner_ty) | ast::TyKind::Array(inner_ty, _) = &ty.kind
-                        && let ast::TyKind::Err = inner_ty.kind
+                        && let ast::TyKind::Err(_) = inner_ty.kind
                         && let Some(snapshot) = snapshot
                         && let Some(expr) =
                             self.recover_unbraced_const_arg_that_can_begin_ty(snapshot)