diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-09-16 17:43:45 -0400 |
|---|---|---|
| committer | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-09-16 17:47:53 -0400 |
| commit | e09242d5b82953652b5a898257d7c8f249d34bea (patch) | |
| tree | a0546767565f42fce9a57cf9c9f896c08f35c796 /compiler/rustc_borrowck/src/diagnostics | |
| parent | f1767dbb42374646fd5331d4946dc233e68d0ed5 (diff) | |
| download | rust-e09242d5b82953652b5a898257d7c8f249d34bea.tar.gz rust-e09242d5b82953652b5a898257d7c8f249d34bea.zip | |
Final bits
Diffstat (limited to 'compiler/rustc_borrowck/src/diagnostics')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs b/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs index afcd2d73958..1c01e78abd4 100644 --- a/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs +++ b/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs @@ -272,9 +272,12 @@ impl<'tcx> BorrowExplanation<'tcx> { for extra in extra_info { match extra { - _ => {} + ExtraConstraintInfo::PlaceholderFromPredicate(span) => { + err.span_note(*span, format!("due to current limitations in the borrow checker, this implies a `'static` lifetime")); + } } } + self.add_lifetime_bound_suggestion_to_diagnostic(err, &category, span, region_name); } _ => {} |
