@@ -4488,10 +4488,7 @@ functions are declared separately from types.";
44884488 self . parse_external_attribute ( start, end, attributes)
44894489 }
44904490 "target" => self . parse_target_attribute ( start, end, attributes) ,
4491- "deprecated" => {
4492- let _ = self . expect_one ( & Token :: LeftParen ) ?;
4493- self . parse_deprecated_attribute ( start, end, attributes)
4494- }
4491+ "deprecated" => self . parse_deprecated_attribute ( start, end, attributes) ,
44954492 "internal" => self . parse_internal_attribute ( start, end, attributes) ,
44964493 _ => parse_error ( ParseErrorType :: UnknownAttribute , SrcSpan { start, end } ) ,
44974494 } ?;
@@ -4553,6 +4550,10 @@ functions are declared separately from types.";
45534550 end : u32 ,
45544551 attributes : & mut Attributes ,
45554552 ) -> Result < u32 , ParseError > {
4553+ let _ = self . expect_one ( & Token :: LeftParen ) . map_err ( |_| ParseError {
4554+ error : ParseErrorType :: ExpectedDeprecationMessage ,
4555+ location : SrcSpan { start, end } ,
4556+ } ) ?;
45564557 if attributes. deprecated . is_deprecated ( ) {
45574558 return parse_error ( ParseErrorType :: DuplicateAttribute , SrcSpan :: new ( start, end) ) ;
45584559 }
0 commit comments