Skip to content

Commit 28005ff

Browse files
committed
Fix the Attr grammar for unsafe attributes.
The _Attr_ production is used for `cfg_attr` attribute and the `meta` macro fragment specifier, and those need to accept the new `unsafe` syntax.
1 parent 98503e6 commit 28005ff

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/attributes.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33

44
> **<sup>Syntax</sup>**\
55
> _InnerAttribute_ :\
6-
> &nbsp;&nbsp; &nbsp;&nbsp; `#` `!` `[` _Attr_ `]`\
7-
> &nbsp;&nbsp; | `#` `!` `[` `unsafe` `(` _Attr_ `)` `]`
6+
> &nbsp;&nbsp; `#` `!` `[` _Attr_ `]`
87
>
98
> _OuterAttribute_ :\
10-
> &nbsp;&nbsp; &nbsp;&nbsp; `#` `[` _Attr_ `]`\
11-
> &nbsp;&nbsp; | `#` `[` `unsafe` `(` _Attr_ `)` `]`
9+
> &nbsp;&nbsp; `#` `[` _Attr_ `]`
1210
>
1311
> _Attr_ :\
14-
> &nbsp;&nbsp; [_SimplePath_] _AttrInput_<sup>?</sup>
12+
> &nbsp;&nbsp; &nbsp;&nbsp; [_SimplePath_] _AttrInput_<sup>?</sup>\
13+
> &nbsp;&nbsp; | `unsafe` `(` [_SimplePath_] _AttrInput_<sup>?</sup> `)`
1514
>
1615
> _AttrInput_ :\
1716
> &nbsp;&nbsp; &nbsp;&nbsp; [_DelimTokenTree_]\

0 commit comments

Comments
 (0)