]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/errors.rs
Compute lifetimes in scope at diagnostic time.
[rust.git] / compiler / rustc_typeck / src / errors.rs
index d9c9f2920b07911719bd6813d8b1cdd4c51ef5d8..a7f736fed14a330ad4a16559cb8218916858f27f 100644 (file)
@@ -277,7 +277,7 @@ fn into_diagnostic(self, sess: &'a ParseSess) -> DiagnosticBuilder<'a, ErrorGuar
                 .join(", "),
         );
 
-        err.span_label(self.def_span, rustc_errors::fluent::typeck::missing_type_params_label);
+        err.span_label(self.def_span, rustc_errors::fluent::typeck::label);
 
         let mut suggested = false;
         if let (Ok(snippet), true) = (
@@ -295,7 +295,7 @@ fn into_diagnostic(self, sess: &'a ParseSess) -> DiagnosticBuilder<'a, ErrorGuar
                 // least we can clue them to the correct syntax `Iterator<Type>`.
                 err.span_suggestion(
                     self.span,
-                    rustc_errors::fluent::typeck::missing_type_params_suggestion,
+                    rustc_errors::fluent::typeck::suggestion,
                     format!("{}<{}>", snippet, self.missing_type_params.join(", ")),
                     Applicability::HasPlaceholders,
                 );
@@ -303,13 +303,10 @@ fn into_diagnostic(self, sess: &'a ParseSess) -> DiagnosticBuilder<'a, ErrorGuar
             }
         }
         if !suggested {
-            err.span_label(
-                self.span,
-                rustc_errors::fluent::typeck::missing_type_params_no_suggestion_label,
-            );
+            err.span_label(self.span, rustc_errors::fluent::typeck::no_suggestion_label);
         }
 
-        err.note(rustc_errors::fluent::typeck::missing_type_params_note);
+        err.note(rustc_errors::fluent::typeck::note);
         err
     }
 }