about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-25 20:02:55 +0000
committerbors <bors@rust-lang.org>2022-07-25 20:02:55 +0000
commit6dbae3ad19309bb541d9e76638e6aa4b5449f29a (patch)
treea35d361e27036633b9422e60fae27c050e298ec8 /compiler/rustc_resolve/src/lib.rs
parentbdf520fd419cd4dea184332f57206f1cf5ca3e8f (diff)
parentb9bd65e2ca68342bdb8ab56134677ad330d786ba (diff)
downloadrust-6dbae3ad19309bb541d9e76638e6aa4b5449f29a.tar.gz
rust-6dbae3ad19309bb541d9e76638e6aa4b5449f29a.zip
Auto merge of #97313 - cjgillot:ast-lifetimes-anon, r=petrochenkov
Resolve function lifetime elision on the AST

~Based on https://github.com/rust-lang/rust/pull/97720~

Lifetime elision for functions is purely syntactic in nature, so can be resolved on the AST.
This PR replicates the elision logic and diagnostics on the AST, and replaces HIR-based resolution by a `delay_span_bug`.

This refactor allows for more consistent diagnostics, which don't have to guess the original code from HIR.

r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
-rw-r--r--compiler/rustc_resolve/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs
index 2fcbe1d4c14..6945306a691 100644
--- a/compiler/rustc_resolve/src/lib.rs
+++ b/compiler/rustc_resolve/src/lib.rs
@@ -11,6 +11,7 @@
 #![feature(drain_filter)]
 #![feature(if_let_guard)]
 #![cfg_attr(bootstrap, feature(let_chains))]
+#![feature(iter_intersperse)]
 #![feature(let_else)]
 #![feature(never_type)]
 #![recursion_limit = "256"]