From cb6268026206e6596b4754fdedf8f53a0e632273 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 18 Nov 2021 13:25:27 +0800 Subject: [PATCH] rustc: Remove `#[rustc_synthetic]` This function parameter attribute was introduced in https://github.com/rust-lang/rust/pull/44866 as an intermediate step in implementing `impl Trait`, it's not necessary or used anywhere by itself. --- clippy_lints/src/types/borrowed_box.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/clippy_lints/src/types/borrowed_box.rs b/clippy_lints/src/types/borrowed_box.rs index bdeff035e5e..63ad65b8afd 100644 --- a/clippy_lints/src/types/borrowed_box.rs +++ b/clippy_lints/src/types/borrowed_box.rs @@ -3,10 +3,8 @@ use clippy_utils::source::snippet; use clippy_utils::{match_def_path, paths}; use if_chain::if_chain; use rustc_errors::Applicability; -use rustc_hir::{ - self as hir, GenericArg, GenericBounds, GenericParamKind, HirId, Lifetime, MutTy, Mutability, Node, QPath, - SyntheticTyParamKind, TyKind, -}; +use rustc_hir::{self as hir, GenericArg, GenericBounds, GenericParamKind}; +use rustc_hir::{HirId, Lifetime, MutTy, Mutability, Node, QPath, TyKind}; use rustc_lint::LateContext; use super::BORROWED_BOX; @@ -105,7 +103,7 @@ fn get_bounds_if_impl_trait<'tcx>(cx: &LateContext<'tcx>, qpath: &QPath<'_>, id: if let Some(did) = cx.qpath_res(qpath, id).opt_def_id(); if let Some(Node::GenericParam(generic_param)) = cx.tcx.hir().get_if_local(did); if let GenericParamKind::Type { synthetic, .. } = generic_param.kind; - if synthetic == Some(SyntheticTyParamKind::ImplTrait); + if synthetic; then { Some(generic_param.bounds) } else {