@@ -17,6 +17,7 @@ mod diagnostics;
1717mod extension;
1818mod hash_stable;
1919mod lift;
20+ mod noop_type_traversable;
2021mod query;
2122mod serialize;
2223mod symbols;
@@ -81,27 +82,9 @@ decl_derive!([TyDecodable] => serialize::type_decodable_derive);
8182decl_derive ! ( [ TyEncodable ] => serialize:: type_encodable_derive) ;
8283decl_derive ! ( [ MetadataDecodable ] => serialize:: meta_decodable_derive) ;
8384decl_derive ! ( [ MetadataEncodable ] => serialize:: meta_encodable_derive) ;
84- decl_derive ! (
85- [ TypeFoldable , attributes( type_foldable) ] =>
86- /// Derives `TypeFoldable` for the annotated `struct` or `enum` (`union` is not supported).
87- ///
88- /// The fold will produce a value of the same struct or enum variant as the input, with
89- /// each field respectively folded using the `TypeFoldable` implementation for its type.
90- /// However, if a field of a struct or an enum variant is annotated with
91- /// `#[type_foldable(identity)]` then that field will retain its incumbent value (and its
92- /// type is not required to implement `TypeFoldable`).
93- type_foldable:: type_foldable_derive
94- ) ;
95- decl_derive ! (
96- [ TypeVisitable , attributes( type_visitable) ] =>
97- /// Derives `TypeVisitable` for the annotated `struct` or `enum` (`union` is not supported).
98- ///
99- /// Each field of the struct or enum variant will be visited in definition order, using the
100- /// `TypeVisitable` implementation for its type. However, if a field of a struct or an enum
101- /// variant is annotated with `#[type_visitable(ignore)]` then that field will not be
102- /// visited (and its type is not required to implement `TypeVisitable`).
103- type_visitable:: type_visitable_derive
104- ) ;
85+ decl_derive ! ( [ NoopTypeTraversable ] => noop_type_traversable:: noop_type_traversable_derive) ;
86+ decl_derive ! ( [ TypeVisitable ] => type_visitable:: type_visitable_derive) ;
87+ decl_derive ! ( [ TypeFoldable ] => type_foldable:: type_foldable_derive) ;
10588decl_derive ! ( [ Lift , attributes( lift) ] => lift:: lift_derive) ;
10689decl_derive ! (
10790 [ Diagnostic , attributes(
0 commit comments