1
Fork 0

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 6414e0b5b3
commit 91e02177a1
17 changed files with 37 additions and 163 deletions

View file

@ -290,9 +290,10 @@ fn suggest_restriction(
} else {
// Trivial case: `T` needs an extra bound: `T: Bound`.
let (sp, suggestion) = match (
generics.params.iter().find(|p| {
!matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. })
}),
generics
.params
.iter()
.find(|p| !matches!(p.kind, hir::GenericParamKind::Type { synthetic: true, .. })),
super_traits,
) {
(_, None) => predicate_constraint(