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.
This commit is contained in:
Vadim Petrochenkov 2021-11-18 13:25:27 +08:00
parent 3b6b1ab0ec
commit cb62680262

View File

@ -3,10 +3,8 @@
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 {