diff --git a/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs b/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs
index b7932f550e..fafcde25ae 100644
--- a/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs
+++ b/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs
@@ -16,7 +16,7 @@ struct Foo;
#[derive(Copy)]
struct Foo;
-impl < > core::marker::Copy for Foo< > where {}"#]],
+impl < > core::marker::Copy for Foo< > {}"#]],
);
}
@@ -41,7 +41,7 @@ macro Copy {}
#[derive(Copy)]
struct Foo;
-impl < > crate ::marker::Copy for Foo< > where {}"#]],
+impl < > crate ::marker::Copy for Foo< > {}"#]],
);
}
@@ -57,7 +57,7 @@ struct Foo;
#[derive(Copy)]
struct Foo;
-impl core::marker::Copy for Foo where {}"#]],
+impl core::marker::Copy for Foo {}"#]],
);
}
@@ -74,7 +74,7 @@ struct Foo;
#[derive(Copy)]
struct Foo;
-impl core::marker::Copy for Foo where {}"#]],
+impl core::marker::Copy for Foo {}"#]],
);
}
@@ -90,7 +90,7 @@ struct Foo;
#[derive(Clone)]
struct Foo;
-impl core::clone::Clone for Foo where {}"#]],
+impl core::clone::Clone for Foo {}"#]],
);
}
@@ -106,6 +106,6 @@ struct Foo(u32);
#[derive(Clone)]
struct Foo(u32);
-impl core::clone::Clone for Foo where u32: core::clone::Clone, {}"#]],
+impl core::clone::Clone for Foo {}"#]],
);
}
diff --git a/crates/hir-expand/src/builtin_derive_macro.rs b/crates/hir-expand/src/builtin_derive_macro.rs
index 2b874bffff..5c1a75132e 100644
--- a/crates/hir-expand/src/builtin_derive_macro.rs
+++ b/crates/hir-expand/src/builtin_derive_macro.rs
@@ -1,12 +1,11 @@
//! Builtin derives.
use base_db::{CrateOrigin, LangCrateOrigin};
-use either::Either;
use tracing::debug;
use crate::tt::{self, TokenId};
use syntax::{
- ast::{self, AstNode, HasGenericParams, HasModuleItem, HasName, HasTypeBounds},
+ ast::{self, AstNode, HasGenericParams, HasModuleItem, HasName},
match_ast,
};
@@ -61,11 +60,8 @@ pub fn find_builtin_derive(ident: &name::Name) -> Option
struct BasicAdtInfo {
name: tt::Ident,
- /// first field is the name, and
- /// second field is `Some(ty)` if it's a const param of type `ty`, `None` if it's a type param.
- /// third fields is where bounds, if any
- param_types: Vec<(tt::Subtree, Option, Option)>,
- field_types: Vec,
+ /// `Some(ty)` if it's a const param of type `ty`, `None` if it's a type param.
+ param_types: Vec