Merge commit '97a5daa659' into clippyup

This commit is contained in:
flip1995 2022-01-13 13:18:19 +01:00
parent dda2aef64f
commit fb0142ae41
223 changed files with 3261 additions and 1687 deletions

View file

@ -78,7 +78,7 @@ impl<'tcx> LateLintPass<'tcx> for UninitVec {
}
}
fn handle_uninit_vec_pair(
fn handle_uninit_vec_pair<'tcx>(
cx: &LateContext<'tcx>,
maybe_init_or_reserve: &'tcx Stmt<'tcx>,
maybe_set_len: &'tcx Expr<'tcx>,
@ -196,7 +196,7 @@ fn is_reserve(cx: &LateContext<'_>, path: &PathSegment<'_>, self_expr: &Expr<'_>
}
/// Returns self if the expression is `Vec::set_len()`
fn extract_set_len_self(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Option<(&'tcx Expr<'tcx>, Span)> {
fn extract_set_len_self<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Option<(&'tcx Expr<'tcx>, Span)> {
// peel unsafe blocks in `unsafe { vec.set_len() }`
let expr = peel_hir_expr_while(expr, |e| {
if let ExprKind::Block(block, _) = e.kind {