Skip to content

Commit

Permalink
rustc: Remove #[rustc_synthetic]
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petrochenkov committed Nov 18, 2021
1 parent 3b6b1ab commit cb62680
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions clippy_lints/src/types/borrowed_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit cb62680

Please sign in to comment.