Skip to content

Commit cb62680

Browse files
committed
rustc: Remove #[rustc_synthetic]
This function parameter attribute was introduced in rust-lang/rust#44866 as an intermediate step in implementing `impl Trait`, it's not necessary or used anywhere by itself.
1 parent 3b6b1ab commit cb62680

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clippy_lints/src/types/borrowed_box.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ use clippy_utils::source::snippet;
33
use clippy_utils::{match_def_path, paths};
44
use if_chain::if_chain;
55
use rustc_errors::Applicability;
6-
use rustc_hir::{
7-
self as hir, GenericArg, GenericBounds, GenericParamKind, HirId, Lifetime, MutTy, Mutability, Node, QPath,
8-
SyntheticTyParamKind, TyKind,
9-
};
6+
use rustc_hir::{self as hir, GenericArg, GenericBounds, GenericParamKind};
7+
use rustc_hir::{HirId, Lifetime, MutTy, Mutability, Node, QPath, TyKind};
108
use rustc_lint::LateContext;
119

1210
use super::BORROWED_BOX;
@@ -105,7 +103,7 @@ fn get_bounds_if_impl_trait<'tcx>(cx: &LateContext<'tcx>, qpath: &QPath<'_>, id:
105103
if let Some(did) = cx.qpath_res(qpath, id).opt_def_id();
106104
if let Some(Node::GenericParam(generic_param)) = cx.tcx.hir().get_if_local(did);
107105
if let GenericParamKind::Type { synthetic, .. } = generic_param.kind;
108-
if synthetic == Some(SyntheticTyParamKind::ImplTrait);
106+
if synthetic;
109107
then {
110108
Some(generic_param.bounds)
111109
} else {

0 commit comments

Comments
 (0)