Skip to content

Commit 682e8c9

Browse files
committed
Mark all uses of the attributes template
It's helpful to know when a section follows a particular template and to be able to quickly search for all uses of that template. Let's label all uses of the attributes template.
1 parent a27746f commit 682e8c9

File tree

10 files changed

+15
-0
lines changed

10 files changed

+15
-0
lines changed

docs/attribute-template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ When an attribute (or a new attribute position in the grammar) is added, be sure
66

77
----
88

9+
<!-- template:attributes -->
910
r[PARENT.example]
1011
## The `example` attribute
1112

src/attributes/codegen.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ The [`track_caller`](#the-track_caller-attribute) attribute cannot be applied to
8282
r[attributes.codegen.naked.testing]
8383
The [testing attributes](testing.md) cannot be applied to a naked function.
8484

85+
<!-- template:attributes -->
8586
r[attributes.codegen.no_builtins]
8687
## The `no_builtins` attribute
8788

src/attributes/derive.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- template:attributes -->
12
r[attributes.derive]
23
# Derive
34

@@ -63,6 +64,7 @@ The built-in derives include the [`automatically_derived` attribute][attributes.
6364
r[attributes.derive.behavior]
6465
During macro expansion, for each element in the list of derives, the corresponding derive macro expands to zero or more [items].
6566
67+
<!-- template:attributes -->
6668
r[attributes.derive.automatically_derived]
6769
## The `automatically_derived` attribute
6870

src/attributes/limits.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ a!{}
4040
(|_: &u8| {})(&&&1);
4141
```
4242

43+
<!-- template:attributes -->
4344
r[attributes.limits.type_length_limit]
4445
## The `type_length_limit` attribute
4546

src/attributes/testing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tests. Compiling a crate in "test" mode enables building the test functions
66
along with a test harness for executing the tests. Enabling the test mode also
77
enables the [`test` conditional compilation option].
88

9+
<!-- template:attributes -->
910
r[attributes.testing.test]
1011
## The `test` attribute
1112

@@ -71,6 +72,7 @@ In particular:
7172
> }
7273
> ```
7374
75+
<!-- template:attributes -->
7476
r[attributes.testing.ignore]
7577
## The `ignore` attribute
7678
@@ -119,6 +121,7 @@ Only the first instance of `ignore` on a function is honored.
119121
r[attributes.testing.ignore.behavior]
120122
Ignored tests are still compiled when in test mode, but they are not executed.
121123
124+
<!-- template:attributes -->
122125
r[attributes.testing.should_panic]
123126
## The `should_panic` attribute
124127

src/conditional-compilation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ Example values:
315315

316316
## Forms of conditional compilation
317317

318+
<!-- template:attributes -->
318319
r[cfg.attr]
319320
### The `cfg` attribute
320321

@@ -388,6 +389,7 @@ When a crate-level `cfg` has a false predicate, the crate itself still exists. A
388389
> pub fn example() {}
389390
> ```
390391
392+
<!-- template:attributes -->
391393
r[cfg.cfg_attr]
392394
### The `cfg_attr` attribute
393395

src/items/extern-crates.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ r[items.extern-crate.underscore.macro_use]
7373
The [`macro_use` attribute] works as usual and imports the macro names
7474
into the [`macro_use` prelude].
7575

76+
<!-- template:attributes -->
7677
r[items.extern-crate.no_link]
7778
## The `no_link` attribute
7879

src/items/external-blocks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ r[items.extern.attributes.link.import_name_type.platform-specific]
391391
The `import_name_type` key is only supported on x86 Windows. Using it when
392392
targeting other platforms will result in a compiler error.
393393

394+
<!-- template:attributes -->
394395
r[items.extern.attributes.link_name]
395396
### The `link_name` attribute
396397

src/procedural-macros.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ position, which includes [statements], [expressions], [patterns], [type
130130
expressions], [item] positions, including items in [`extern` blocks], inherent
131131
and trait [implementations], and [trait definitions].
132132

133+
<!-- template:attributes -->
133134
r[macro.proc.derive]
134135
## The `proc_macro_derive` attribute
135136

src/runtime.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ r[runtime]
33

44
This section documents features that define some aspects of the Rust runtime.
55

6+
<!-- template:attributes -->
67
r[runtime.global_allocator]
78
## The `global_allocator` attribute
89

@@ -44,6 +45,7 @@ The `global_allocator` attribute may only be used once in the crate graph.
4445
r[runtime.global_allocator.stdlib]
4546
The `global_allocator` attribute is exported from the [standard library prelude][core::prelude::v1].
4647
48+
<!-- template:attributes -->
4749
r[runtime.windows_subsystem]
4850
## The `windows_subsystem` attribute
4951

0 commit comments

Comments
 (0)