Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup

This commit is contained in:
Eduardo Broto
2020-10-23 22:16:59 +02:00
parent fcde7683fe
commit cdb555f4fc
74 changed files with 2147 additions and 593 deletions

View File

@@ -708,7 +708,7 @@ fn reindent_multiline_inner(s: &str, ignore_first: bool, indent: Option<usize>,
}
/// Gets the parent expression, if any - this is useful to constrain a lint.
pub fn get_parent_expr<'c>(cx: &'c LateContext<'_>, e: &Expr<'_>) -> Option<&'c Expr<'c>> {
pub fn get_parent_expr<'tcx>(cx: &LateContext<'tcx>, e: &Expr<'_>) -> Option<&'tcx Expr<'tcx>> {
let map = &cx.tcx.hir();
let hir_id = e.hir_id;
let parent_id = map.get_parent_node(hir_id);