@@ -20,10 +20,10 @@ pub(crate) struct Options<A: AllowedOptions> {
20
20
/// If this is `Some`, the value is the `no_eq` identifier.
21
21
pub no_eq : Option < syn:: Ident > ,
22
22
23
- /// Signal we should not generate a `Debug` impl.
23
+ /// Signal we should generate a `Debug` impl.
24
24
///
25
- /// If this is `Some`, the value is the `no_debug ` identifier.
26
- pub no_debug : Option < syn:: Ident > ,
25
+ /// If this is `Some`, the value is the `debug ` identifier.
26
+ pub debug : Option < syn:: Ident > ,
27
27
28
28
/// Signal we should not include the `'db` lifetime.
29
29
///
@@ -93,7 +93,7 @@ impl<A: AllowedOptions> Default for Options<A> {
93
93
return_ref : Default :: default ( ) ,
94
94
specify : Default :: default ( ) ,
95
95
no_eq : Default :: default ( ) ,
96
- no_debug : Default :: default ( ) ,
96
+ debug : Default :: default ( ) ,
97
97
no_lifetime : Default :: default ( ) ,
98
98
no_clone : Default :: default ( ) ,
99
99
db_path : Default :: default ( ) ,
@@ -114,7 +114,7 @@ pub(crate) trait AllowedOptions {
114
114
const RETURN_REF : bool ;
115
115
const SPECIFY : bool ;
116
116
const NO_EQ : bool ;
117
- const NO_DEBUG : bool ;
117
+ const DEBUG : bool ;
118
118
const NO_LIFETIME : bool ;
119
119
const NO_CLONE : bool ;
120
120
const SINGLETON : bool ;
@@ -161,18 +161,15 @@ impl<A: AllowedOptions> syn::parse::Parse for Options<A> {
161
161
"`no_eq` option not allowed here" ,
162
162
) ) ;
163
163
}
164
- } else if ident == "no_debug" {
165
- if A :: NO_DEBUG {
166
- if let Some ( old) = options. no_debug . replace ( ident) {
167
- return Err ( syn:: Error :: new (
168
- old. span ( ) ,
169
- "option `no_debug` provided twice" ,
170
- ) ) ;
164
+ } else if ident == "debug" {
165
+ if A :: DEBUG {
166
+ if let Some ( old) = options. debug . replace ( ident) {
167
+ return Err ( syn:: Error :: new ( old. span ( ) , "option `debug` provided twice" ) ) ;
171
168
}
172
169
} else {
173
170
return Err ( syn:: Error :: new (
174
171
ident. span ( ) ,
175
- "`no_debug ` option not allowed here" ,
172
+ "`debug ` option not allowed here" ,
176
173
) ) ;
177
174
}
178
175
} else if ident == "no_lifetime" {
0 commit comments