about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/diagnostics
diff options
context:
space:
mode:
authorJack Huey <31162821+jackh726@users.noreply.github.com>2022-09-16 17:43:45 -0400
committerJack Huey <31162821+jackh726@users.noreply.github.com>2022-09-16 17:47:53 -0400
commite09242d5b82953652b5a898257d7c8f249d34bea (patch)
treea0546767565f42fce9a57cf9c9f896c08f35c796 /compiler/rustc_borrowck/src/diagnostics
parentf1767dbb42374646fd5331d4946dc233e68d0ed5 (diff)
downloadrust-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.rs5
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);
             }
             _ => {}