From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_builtin_macros/src/deriving/generic/mod.rs | 8 ++++---- compiler/rustc_builtin_macros/src/deriving/generic/ty.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_builtin_macros/src/deriving/generic') diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs index aa1ce1b92..841cac781 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs @@ -467,7 +467,7 @@ impl<'a> TraitDef<'a> { match item { Annotatable::Item(item) => { let is_packed = item.attrs.iter().any(|attr| { - for r in attr::find_repr_attrs(&cx.sess, attr) { + for r in attr::find_repr_attrs(cx.sess, attr) { if let attr::ReprPacked(_) = r { return true; } @@ -478,7 +478,7 @@ impl<'a> TraitDef<'a> { let newitem = match &item.kind { ast::ItemKind::Struct(struct_def, generics) => self.expand_struct_def( cx, - &struct_def, + struct_def, item.ident, generics, from_scratch, @@ -496,7 +496,7 @@ impl<'a> TraitDef<'a> { if self.supports_unions { self.expand_struct_def( cx, - &struct_def, + struct_def, item.ident, generics, from_scratch, @@ -1485,7 +1485,7 @@ impl<'a> TraitDef<'a> { let struct_path = struct_path.clone(); match *struct_def { - VariantData::Struct(..) => { + VariantData::Struct { .. } => { let field_pats = pieces_iter .map(|(sp, ident, pat)| { if ident.is_none() { diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/ty.rs b/compiler/rustc_builtin_macros/src/deriving/generic/ty.rs index 2d5043112..1a45c3279 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/ty.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/ty.rs @@ -182,7 +182,7 @@ impl Bounds { let params = self .bounds .iter() - .map(|&(name, ref bounds)| mk_ty_param(cx, span, name, &bounds, self_ty, self_generics)) + .map(|&(name, ref bounds)| mk_ty_param(cx, span, name, bounds, self_ty, self_generics)) .collect(); Generics { -- cgit v1.2.3