1
Fork 0

Don't delete any lifetimes with bounds

This commit is contained in:
trevyn 2024-01-20 02:30:58 +04:00
parent 0943a6b188
commit de2575f35d
2 changed files with 2 additions and 6 deletions

View file

@ -2567,8 +2567,9 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
debug!(?param.ident, ?param.ident.span, ?use_span);
let elidable = matches!(use_ctxt, LifetimeCtxt::Ref);
let deletion_span =
if param.bounds.is_empty() { deletion_span() } else { None };
let deletion_span = deletion_span();
self.r.lint_buffer.buffer_lint_with_diagnostic(
lint::builtin::SINGLE_USE_LIFETIMES,
param.id,