diff options
| author | bors <bors@rust-lang.org> | 2021-12-01 23:22:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-01 23:22:43 +0000 |
| commit | 76938d64a42304e4413842656c044e9b40a6041b (patch) | |
| tree | d361d767a2519c7fd14acb95efad519ee7f0292d /compiler/rustc_borrowck | |
| parent | 48a5999fceeea84a8971634355287faa349909d4 (diff) | |
| parent | aa2450f41bc49752c45b1b7d51a4b71098c0c9e8 (diff) | |
| download | rust-76938d64a42304e4413842656c044e9b40a6041b.tar.gz rust-76938d64a42304e4413842656c044e9b40a6041b.zip | |
Auto merge of #90446 - cjgillot:late-elided, r=jackh726
Lint elided lifetimes in path during lifetime resolution. The lifetime elision lint is known to be brittle and can be redundant with later lifetime resolution errors. This PR aims to remove the redundancy by performing the lint after lifetime resolution. This PR proposes to carry the information that an elision should be linted against by using a special `LifetimeName`. I am not certain this is the best solution, but it is certainly the easiest. Fixes https://github.com/rust-lang/rust/issues/60199 Fixes https://github.com/rust-lang/rust/issues/55768 Fixes https://github.com/rust-lang/rust/issues/63110 Fixes https://github.com/rust-lang/rust/issues/71957
Diffstat (limited to 'compiler/rustc_borrowck')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/region_name.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/region_name.rs b/compiler/rustc_borrowck/src/diagnostics/region_name.rs index 5edb52b0b65..64a7a25dc86 100644 --- a/compiler/rustc_borrowck/src/diagnostics/region_name.rs +++ b/compiler/rustc_borrowck/src/diagnostics/region_name.rs @@ -584,7 +584,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> { Some(RegionNameHighlight::MatchedAdtAndSegment(lifetime_span)) } - hir::LifetimeName::ImplicitObjectLifetimeDefault | hir::LifetimeName::Implicit => { + hir::LifetimeName::ImplicitObjectLifetimeDefault | hir::LifetimeName::Implicit(_) => { // In this case, the user left off the lifetime; so // they wrote something like: // |
