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`
This commit is contained in:
commit
d5fb8d2aef
1 changed files with 6 additions and 7 deletions
|
@ -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, ()>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue