]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/lint.rs
Auto merge of #92130 - Kobzol:stable-hash-str, r=cjgillot
[rust.git] / compiler / rustc_middle / src / lint.rs
index a6432b301743a292b63ee6aab566dd0e7ec8a114..eef10356ed25e2fa3dcc367fb5dd211a24e03f91 100644 (file)
@@ -212,7 +212,7 @@ pub fn struct_lint_level<'s, 'd>(
 ) {
     // Avoid codegen bloat from monomorphization by immediately doing dyn dispatch of `decorate` to
     // the "real" work.
-    fn struct_lint_level_impl(
+    fn struct_lint_level_impl<'s, 'd>(
         sess: &'s Session,
         lint: &'static Lint,
         level: Level,
@@ -319,7 +319,7 @@ fn struct_lint_level_impl(
             }
             LintLevelSource::Node(lint_attr_name, src, reason) => {
                 if let Some(rationale) = reason {
-                    err.note(&rationale.as_str());
+                    err.note(rationale.as_str());
                 }
                 sess.diag_span_note_once(
                     &mut err,