Skip to content

Commit

Permalink
Rollup merge of rust-lang#102592 - WaffleLapkin:less_lifetimes, r=cjg…
Browse files Browse the repository at this point in the history
…illot

Remove a couple lifetimes that can be infered

From the review: rust-lang#101986 (comment)

r? `@cjgillot`
  • Loading branch information
matthiaskrgr authored Oct 3, 2022
2 parents d679ec5 + 8cc8140 commit d5fb8d2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions compiler/rustc_middle/src/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, ()>,
Expand Down

0 comments on commit d5fb8d2

Please sign in to comment.