summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_builtin_macros/src/deriving/generic
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_builtin_macros/src/deriving/generic')
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/generic/mod.rs8
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/generic/ty.rs2
2 files changed, 5 insertions, 5 deletions
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 {