@@ -143,20 +143,6 @@ impl ItemAttributes {
143
143
144
144
let mut errors = Error :: accumulator ( ) ;
145
145
146
- // TODO (@Techassi): Make the field or variant 'note' optional, because
147
- // in the future, the macro will generate parts of the deprecation note
148
- // automatically. The user-provided note will then be appended to the
149
- // auto-generated one.
150
-
151
- if let Some ( deprecated) = & self . deprecated {
152
- if deprecated. note . is_empty ( ) {
153
- errors. push (
154
- Error :: custom ( "deprecation note must not be empty" )
155
- . with_span ( & deprecated. note . span ( ) ) ,
156
- ) ;
157
- }
158
- }
159
-
160
146
// Semantic validation
161
147
errors. handle ( self . validate_action_combinations ( item_ident, item_type) ) ;
162
148
errors. handle ( self . validate_action_order ( item_ident, item_type) ) ;
@@ -348,9 +334,10 @@ pub(crate) struct ChangedAttributes {
348
334
/// For the deprecated() action
349
335
///
350
336
/// Example usage:
337
+ /// - `deprecated(since = "...")`
351
338
/// - `deprecated(since = "...", note = "...")`
352
339
#[ derive( Clone , Debug , FromMeta ) ]
353
340
pub ( crate ) struct DeprecatedAttributes {
354
341
pub ( crate ) since : SpannedValue < Version > ,
355
- pub ( crate ) note : SpannedValue < String > ,
342
+ pub ( crate ) note : Option < SpannedValue < String > > ,
356
343
}
0 commit comments