@@ -97,29 +97,6 @@ The `cfg` and `cfg_attr` attributes are dynamic. The `test` attribute is inert
97
97
when compiling for tests and dynamic otherwise. Attribute macros are dynamic.
98
98
All other attributes are inert.
99
99
100
- ## Attribute resolution
101
-
102
- On all things except for items, attribute resolution is straightforward. The
103
- ` cfg ` and ` cfg_attr ` attributes are applied and only inert attributes are
104
- allowed. Each of those inert attributes then resolve to either a built-in
105
- attribute or a derive mode helper attribute. If the attribute cannot resolve to
106
- either, it is an error.
107
-
108
- For items, attribute resolution is a bit more involved. First off, if there are
109
- any ` cfg ` , ` cfg_attr ` , or ` test ` attributes when not compiling tests, they are
110
- resolved first, and removed from the item. Then, each attribute is checked in
111
- the order they are written. If the attribute resolves to an inert attribute,
112
- check the next attribute. If the attribute resolves to a dynamic attribute, then
113
- perform its dynamic behavior. This will effectively replace the item with a new
114
- set of items that must go through attribute resolution from the beginning. If
115
- the attribute resolves to a macro that is not an attribute macro, it is an
116
- error. Otherwise, the attriute is not current resolveable. In this case, wait
117
- until another item brings the attribute into scope, and then recheck it. If all
118
- other items have their attributes resolved or are also waiting for attribute or
119
- derive mode resolution, it is an error. If all of the attributes are inert, then
120
- the item is finalized. If the item defines a new path for a macro, it is now
121
- available for other items.
122
-
123
100
---
124
101
125
102
The rest of this page describes or links to descriptions of which attribute
0 commit comments