diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-10-03 08:00:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-03 08:00:48 +0200 |
| commit | d5fb8d2aef0cb54fd2f40d1727031681f34ab628 (patch) | |
| tree | 5d160b40c40dc53aa818232dcd86470f7800f43f | |
| parent | d679ec5e2fbcccd8d680ecda47a232b87ba00161 (diff) | |
| parent | 8cc81407757e68e309924c03ed1815a01469d026 (diff) | |
Rollup merge of #102592 - WaffleLapkin:less_lifetimes, r=cjgillot
Remove a couple lifetimes that can be infered From the review: https://github.com/rust-lang/rust/pull/101986#discussion_r974497497 r? `@cjgillot`
| -rw-r--r-- | compiler/rustc_middle/src/lint.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index f3e4f1faeb0..7b0054a96d3 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -274,29 +274,28 @@ pub fn explain_lint_level_source( } } -pub fn struct_lint_level<'s, 'd>( - sess: &'s Session, +pub fn struct_lint_level( + sess: &Session, lint: &'static Lint, level: Level, src: LintLevelSource, span: Option<MultiSpan>, msg: impl Into<DiagnosticMessage>, - decorate: impl 'd - + for<'a, 'b> FnOnce( + decorate: impl for<'a, 'b> FnOnce( &'b mut DiagnosticBuilder<'a, ()>, ) -> &'b mut DiagnosticBuilder<'a, ()>, ) { // Avoid codegen bloat from monomorphization by immediately doing dyn dispatch of `decorate` to // the "real" work. - fn struct_lint_level_impl<'s, 'd>( - sess: &'s Session, + fn struct_lint_level_impl( + sess: &Session, lint: &'static Lint, level: Level, src: LintLevelSource, span: Option<MultiSpan>, msg: impl Into<DiagnosticMessage>, decorate: Box< - dyn 'd + dyn '_ + for<'a, 'b> FnOnce( &'b mut DiagnosticBuilder<'a, ()>, ) -> &'b mut DiagnosticBuilder<'a, ()>, |
