about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2021-11-18 13:25:27 +0800
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2021-11-18 14:32:29 +0800
commit91e02177a1f41aa4f3260fef40caef1fdaf3cc20 (patch)
treeb8fb248ea69ebf05437613542bea6ee745b8454d /src/tools
parent6414e0b5b308d3ae27da83c6a25098cc8aadc1a9 (diff)
downloadrust-91e02177a1f41aa4f3260fef40caef1fdaf3cc20.tar.gz
rust-91e02177a1f41aa4f3260fef40caef1fdaf3cc20.zip
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.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/clippy/clippy_lints/src/types/borrowed_box.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/clippy/clippy_lints/src/types/borrowed_box.rs b/src/tools/clippy/clippy_lints/src/types/borrowed_box.rs
index bdeff035e5e..63ad65b8afd 100644
--- a/src/tools/clippy/clippy_lints/src/types/borrowed_box.rs
+++ b/src/tools/clippy/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 {