Skip to content

Commit 3e7bb14

Browse files
committed
Avoid novis footnote in grammar.
1 parent 28e1cff commit 3e7bb14

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

src/items.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
> **<sup>Syntax:<sup>**\
44
> _Item_:\
5-
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> [_Visibility_]<sup>?</sup>\
5+
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup>\
6+
> &nbsp;&nbsp; &nbsp;&nbsp; _VisItem_\
7+
> &nbsp;&nbsp; | _MacroItem_
8+
>
9+
> _VisItem_:\
10+
> &nbsp;&nbsp; [_Visibility_]<sup>?</sup>\
611
> &nbsp;&nbsp; (\
712
> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; [_Module_]\
813
> &nbsp;&nbsp; &nbsp;&nbsp; | [_ExternCrate_]\
@@ -17,9 +22,12 @@
1722
> &nbsp;&nbsp; &nbsp;&nbsp; | [_Trait_]\
1823
> &nbsp;&nbsp; &nbsp;&nbsp; | [_Implementation_]\
1924
> &nbsp;&nbsp; &nbsp;&nbsp; | [_ExternBlock_]\
20-
> &nbsp;&nbsp; &nbsp;&nbsp; | [_MacroInvocationSemi_]&nbsp;[^novis]\
21-
> &nbsp;&nbsp; &nbsp;&nbsp; | [_MacroRulesDefinition_]&nbsp;[^novis]\
2225
> &nbsp;&nbsp; )
26+
>
27+
> _MacroItem_:\
28+
> &nbsp;&nbsp; &nbsp;&nbsp; [_MacroInvocationSemi_]\
29+
> &nbsp;&nbsp; | [_MacroRulesDefinition_]
30+
2331

2432
An _item_ is a component of a crate. Items are organized within a crate by a
2533
nested set of [modules]. Every crate has a single "outermost" anonymous module;
@@ -55,8 +63,6 @@ qualified by the name of the enclosing item, or is private to the enclosing
5563
item (in the case of functions). The grammar specifies the exact locations in
5664
which sub-item declarations may appear.
5765

58-
[^novis]: Macros may not start with a visibility modifier.
59-
6066
[_ConstantItem_]: items/constant-items.html
6167
[_Enumeration_]: items/enumerations.html
6268
[_ExternBlock_]: items/external-blocks.html

src/items/implementations.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
> &nbsp;&nbsp; `}`
1212
>
1313
> _InherentImplItem_ :\
14-
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup>\
15-
> &nbsp;&nbsp; [_Visibility_]<sup>?</sup>\
16-
> &nbsp;&nbsp; ( [_ConstantItem_] | [_Function_] | [_Method_] | [_MacroInvocationSemi_]&nbsp;[^novis] )
14+
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> (\
15+
> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; [_MacroInvocationSemi_]\
16+
> &nbsp;&nbsp; &nbsp;&nbsp; | ( [_Visibility_]<sup>?</sup> ( [_ConstantItem_] | [_Function_] | [_Method_] ) )\
17+
> &nbsp;&nbsp; )
1718
>
1819
> _TraitImpl_ :\
1920
> &nbsp;&nbsp; `unsafe`<sup>?</sup> `impl` [_Generics_] `!`<sup>?</sup>
@@ -25,9 +26,10 @@
2526
> &nbsp;&nbsp; `}`
2627
>
2728
> _TraitImplItem_ :\
28-
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup>\
29-
> &nbsp;&nbsp; [_Visibility_]<sup>?</sup>\
30-
> &nbsp;&nbsp; ( [_TypeAlias_] | [_ConstantItem_] | [_Function_] | [_Method_] | [_MacroInvocationSemi_]&nbsp;[^novis] )
29+
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> (\
30+
> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; [_MacroInvocationSemi_]\
31+
> &nbsp;&nbsp; &nbsp;&nbsp; | ( [_Visibility_]<sup>?</sup> ( [_TypeAlias_] | [_ConstantItem_] | [_Function_] | [_Method_] ) )\
32+
> &nbsp;&nbsp; )
3133
3234
An _implementation_ is an item that associates items with an _implementing type_.
3335
Implementations are defined with the keyword `impl` and contain functions
@@ -175,8 +177,6 @@ attributes must come before any associated items. That attributes that have
175177
meaning here are [`cfg`], [`deprecated`], [`doc`], and [the lint check
176178
attributes].
177179

178-
[^novis]: Macro invocations may not start with a visibility modifier.
179-
180180
[IDENTIFIER]: identifiers.html
181181
[_ConstantItem_]: items/constant-items.html
182182
[_Function_]: items/functions.html

0 commit comments

Comments
 (0)